Raspberry Pi 2 anyone?


#164

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


#165

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


#166

Thank you, I’ll try it out tomorrow :smiley:


#167

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.


#168

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


#169

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


#170

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.


#171

raspisolidstable :heart_exclamation:

sometimes haxe+lime+openfl will be “like window-manager” on raspi-kawaii :sunflower:
(like kimo i3 with X)


#172

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

Woot.:champagne:


#174

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 :

[email protected]:~/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.


#175

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


#176

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


#177

@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


#178

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


#179

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.


#180

that’s exactly what i have but still no luck with sdl renderer :frowning:


#181

Can you post the exact error?


#182
[email protected]:~/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]
[email protected]:~/Development/HelloWorld $ lime
_/\\\\\\______________________________________________
_\////\\\______________________________________________
_____\/\\\_____/\\\_____________________________________
______\/\\\____\///_____/\\\\\__/\\\\\_______/\\\\\\\\___
_______\/\\\_____/\\\__/\\\///\\\\\///\\\___/\\\/////\\\__
________\/\\\____\/\\\_\/\\\_\//\\\__\/\\\__/\\\\\\\\\\\___
_________\/\\\____\/\\\_\/\\\__\/\\\__\/\\\_\//\\///////____
________/\\\\\\\\\_\/\\\_\/\\\__\/\\\__\/\\\__\//\\\\\\\\\\__
________\/////////__\///__\///___\///___\///____\//////////___

Lime Command-Line Tools (5.0.3)
Use lime setup to configure platforms or lime help for more commands
[email protected]:~/Development/HelloWorld $ cd ../
[email protected]:~/Development $ ls
haxe  HelloWorld  intall_haxe_rasp.sh  LAB  openfl
[email protected]:~/Development $ cd openfl/
[email protected]:~/Development/openfl $ ls
openfl-samples-raspberrypi  PiratePig
[email protected]:~/Development/openfl $ cd openfl-samples-raspberrypi/
[email protected]:~/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
[email protected]:~/Development/openfl/openfl-samples-raspberrypi $ cd AddingAnimation/
[email protected]:~/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
[email protected]:~/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
[email protected]:~/Development/openfl/openfl-samples-raspberrypi/AddingAnimation $ 

#183

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!


#184

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

[email protected]:~/Development/haxe/dev/lime/ndll/RPi $ mv lime.ndll [email protected]:~/Development/haxe/dev/lime/ndll/RPi $ mv ~/Development/lime.ndll lime.ndll
[email protected]:~/Development/haxe/dev/lime/ndll/RPi $ cd ~/Development/
[email protected]:~/Development $ cd HelloWorld/
[email protected]:~/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
[email protected]:~/Development/HelloWorld $