Raspberry Pi 2 anyone?

This commit changed something that has to do with drop events, it seems to be related with my error.

Ok just confirmed that the latest commit breaks the lime rebuild process

At the moment I have to keep my changes to SDL in my own repository because it is linked to the lime repo as a submodule. But my raspbery-pi specific changes to Lime can not be incorporated into the Lime repo because they break the build process on the build server. So for every commit to lime that has changes in the sdl-submodule I will have to update my SDL repo manually. I guess I need some more Git-knowledge because I feel there should be an easier way.

I will try and update my SDL repo as soon as possible,
but in the mean time you could try and get the previous commit of lime. (Iā€™ll update my blogpost as well)
So delete the lime dir and clone lime again

git clone --recursive https://github.com/openfl/lime.git
cd lime
git reset --hard 3a7d8b80e56579648a9364cac60f95806fa524c5

and then follow my guide again, so:
make the changes to project/build.xml again and clone my SDL repo etc.

Thanks for persevering Mathew

1 Like

Thank you, Iā€™ll try it out tomorrow :smiley:

I found that in the latest lime commit the Build.xml had changed too. So the Patch from my blog and the Gist donā€™t work anymore with that commit.
I have updated my blog post.
You should manually edit the exisiting Build.xml file and not use the patch or GIST Entry.

1 Like

Alright it works :smiley: I just had to disable experimental GL drivers. Thanks again!

1 Like

Great! Happy It works for you. I really hope the Raspberry Pi can be a supported platorm in the future.
So every success story will help!. Hopefully youā€™ll be able to post a demo of your own.

Cheers

Just a side note. I have just prepped an sd-card with ubuntu mate 15.10.3.
And the openfl demos I built on raspbian run without problems.
I just copied the bin folder and started the apps.

No notable differences.

So maybe I will try to install haxe and openfl as well and see if I can compile stuff.

raspisolidstable :heart_exclamation:

sometimes haxe+lime+openfl will be ā€œlike window-managerā€ on raspi-kawaii :sunflower:
(like kimo i3 with X)

I can confirm that my instructions for building haxe / openfl /piratepig ALSO work on the latest ubuntu mate 15.10.3.

Woot.:champagne:

hello all hello @gepatto.
I tried compilling some openfl on RaspBerry P3 B with no luck.
i used @gepattoā€™s gist and succeeded to compile haxe 3.2 and neko 2. Both run well so far. But each time i try to compile some openFl with openfl test linux or openfl test html. I get some errors i cannot resolve by myself like :

pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi/AddingAnimation $ openfl test linux -rpi
Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -I/home/pi/Development/haxe/lib/hxcpp/3,4,64/include ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
Link: ApplicationMain

this one or sometime SDL window creation errors.

could someone give a hand on this ?

thx.

Hey @postite,

Did you use this gist?

Itā€™s is not enough to compile just haxe and neko.
You should also rebuild lime for the Raspberry Pi.
If you are getting SDL warnings that means that lime isnā€™t compiled properly,
and itā€™s trying to use OpenGL instead of the special opengles library that is needed for the Pi.

Are you using a recent version of Raspbian, because thatā€™s what the gist was tested on?

Kind Regards
Gepatto

hi @gepato.
hi did used that gist. and iā€™m using raspberry pi 3b with raspian (pixel ) installed. iā€™ll investigate on Lime to see if it is correctly installed .
is there something to check if lime is well installed ?
do i need to install those dependencies like explained in Lime github repo ?:

On a Windows machine, you should have Microsoft Visual Studio C++ (Express is just fine) installed. You will need Xcode on a Mac. To build on a Linux machine, you may need the following packages (or similar):

sudo apt-get install libgl1-mesa-dev libglu1-mesa-dev g++ g+Ā±multilib gcc-multilib libasound2-dev libx11-dev libxext-dev libxi-dev libxrandr-dev libxinerama-dev

thx

@gepato
when i rebuild Lime i get :

Using compile threads: 4
Using compiler cache: /home/pi/Development/.hxcpp_compilecache
Cache: removed 0/1701 files, leaving 84MB, in 1.34627389907837 seconds

Ignoring compiler cache for lime because of possible missing dependencies
Ignoring compiler cache for native-toolkit-cairo because of possible missing dependencies
Compiler version: g++ (Raspbian 4.9.2-10) 4.9.2 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 
Ignoring compiler cache for native-toolkit-jpeg because of possible missing dependencies
Ignoring compiler cache for native-toolkit-harfbuzz because of possible missing dependencies
Ignoring compiler cache for native-toolkit-lzma because of possible missing dependencies
Ignoring compiler cache for native-toolkit-ogg because of possible missing dependencies
Ignoring compiler cache for native-toolkit-openal because of possible missing dependencies
Ignoring compiler cache for native-toolkit-pixman because of possible missing dependencies
Ignoring compiler cache for native-toolkit-png because of possible missing dependencies
Ignoring compiler cache for native-toolkit-tinyfiledialogs because of possible missing dependencies
Ignoring compiler cache for native-toolkit-vorbis because of possible missing dependencies
Ignoring compiler cache for native-toolkit-zlib because of possible missing dependencies
 - Link: ../ndll/RPi/lime.ndll: g++ -o ../ndll/RPi/lime.ndll -shared -fpic -fPIC -Xlinker --no-undefined @obj/linux-rpi-hfp/all_objs /home/pi/Development/haxe/lib/hxcpp/3,4,64/lib/RPi/liblinuxcompat.a -lpthread -lrt -lbcm_host -ldl -lm -lGLESv2 -lEGL -L/opt/vc/lib -ldl
 - Running command: strip -d ../ndll/RPi/lime.ndll
 generated dll=/home/pi/Development/haxe/dev/lime/project/../ndll/RPi/lime.ndll

Warning: Source path "/home/pi/Development/haxe/dev/lime/ndll/Linux/lime.ndll" does not exist
Warning: Source path "/home/pi/Development/haxe/dev/lime/ndll/Linux64/lime.ndll" does not exist

any advice?
thx

@gepatto in fact lime.ndll is present in the RPI folder.

The last 2 lines are just a warning, you can ignore those.
I am only compiling on the Raspberry Pi FOR the Raspberry Pi.
Iā€™m not targeting other systems. So compiling for native cpp for Mac, windows, iOS, android wonā€™t work.
Native cpp for Raspi, html5 and swf should work though.

If you used the install script you should have working lime version.
Make sure that haxelib is targeting this lime version. Check that itā€™s pointing to the directory where the lime git repo was cloned. Use:

haxelib list

you should see something like: (x.x.x wil be a version number)

lime: x.x.x [dev:/home/pi/Development/haxe/dev/lime]

now run:

lime

you should see

Lime Command-Line Tools (x.x.x)
Use lime setup to configure platforms or lime help for more commands

now create a simple project or use one of the slightly modified examples from my repo:

These samples have a standard stage eventlistener for KeyDown so you can quit the program with the ESC key.
On Raspberry Pi all openfl apps are windowless so you canā€™t close a window.

thatā€™s exactly what i have but still no luck with sdl renderer :frowning:

Can you post the exact error?

pi@raspberrypi:~/Development/HelloWorld $ haxelib list
actuate: [1.8.7]
box2d: [1.2.3]
format: [3.3.0]
hxcpp: [3.4.64]
layout: [1.2.1]
lime-samples: [4.0.1]
lime: 5.0.3 [dev:/home/pi/Development/haxe/dev/lime]
openfl-samples: [4.9.0]
openfl: [5.1.2]
pi@raspberrypi:~/Development/HelloWorld $ lime
_/\\\\\\______________________________________________
_\////\\\______________________________________________
_____\/\\\_____/\\\_____________________________________
______\/\\\____\///_____/\\\\\__/\\\\\_______/\\\\\\\\___
_______\/\\\_____/\\\__/\\\///\\\\\///\\\___/\\\/////\\\__
________\/\\\____\/\\\_\/\\\_\//\\\__\/\\\__/\\\\\\\\\\\___
_________\/\\\____\/\\\_\/\\\__\/\\\__\/\\\_\//\\///////____
________/\\\\\\\\\_\/\\\_\/\\\__\/\\\__\/\\\__\//\\\\\\\\\\__
________\/////////__\///__\///___\///___\///____\//////////___

Lime Command-Line Tools (5.0.3)
Use lime setup to configure platforms or lime help for more commands
pi@raspberrypi:~/Development/HelloWorld $ cd ../
pi@raspberrypi:~/Development $ ls
haxe  HelloWorld  intall_haxe_rasp.sh  LAB  openfl
pi@raspberrypi:~/Development $ cd openfl/
pi@raspberrypi:~/Development/openfl $ ls
openfl-samples-raspberrypi  PiratePig
pi@raspberrypi:~/Development/openfl $ cd openfl-samples-raspberrypi/
pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi $ ls
ActuateExample     CustomPreloader    _install_scripts     PlayingSound      Stage3DCamera
AddingAnimation    DisplayingABitmap  JoystickInput        README.md         Stage3DMipmap
BunnyMark          DrawingShapes      _lime_modifications  SimpleBox2D       TextAlignment
CompareBitmapData  HelloTriangle      NyanCat              SimpleOpenGLView  TextMetrics
CreatingAMainLoop  HerokuShaders      PiratePig            SimpleSWFLayout   UsingBitmapData
pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi $ cd AddingAnimation/
pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi/AddingAnimation $ lime test linux

Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -I/home/pi/Development/haxe/lib/hxcpp/3,4,64/include ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
Link: ApplicationMain
Could not initialize SDL: .
Could not create SDL window: .
Could not create SDL renderer: Invalid window.
^C
pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi/AddingAnimation $ openfl test linux

Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -I/home/pi/Development/haxe/lib/hxcpp/3,4,64/include ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
Link: ApplicationMain
Could not initialize SDL: .
Could not create SDL window: .
Could not create SDL renderer: Invalid window.
Error : Invalid field:b
terminate called after throwing an instance of 'Dynamic'
Aborted
pi@raspberrypi:~/Development/openfl/openfl-samples-raspberrypi/AddingAnimation $ 

Can you try to replace the lime.ndll with the one you can download here:
[ link removed]

To see if it might be something other than lime.

OW and you shouldnā€™t have enabled the experimental OPENGL driver!

thx for the help
with your lime.ndll , i got that :

pi@raspberrypi:~/Development/haxe/dev/lime/ndll/RPi $ mv lime.ndll lime_old.ndllpi@raspberrypi:~/Development/haxe/dev/lime/ndll/RPi $ mv ~/Development/lime.ndll lime.ndll
pi@raspberrypi:~/Development/haxe/dev/lime/ndll/RPi $ cd ~/Development/
pi@raspberrypi:~/Development $ cd HelloWorld/
pi@raspberrypi:~/Development/HelloWorld $ lime test linux

Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DRASPBERRYPI=RASPBERRYPI -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_API_LEVEL=331(haxe) -I/home/pi/Development/haxe/lib/hxcpp/3,4,64/include ... tags=[haxe,static]
 - src/lime/utils/AssetCache.cpp  [haxe,release]
 - src/ApplicationMain.cpp 
Link: ApplicationMain
Could not find primitive lime_clipboard_event_manager_register__prime.
Segmentation fault
pi@raspberrypi:~/Development/HelloWorld $