Haxe on Raspberry Pi

684 views
Skip to first unread message

Christopher Kaster

unread,
Dec 4, 2012, 2:41:41 PM12/4/12
to haxe...@googlegroups.com
Hey,

is there someone who got Haxe running on the RaspberryPi? I tried this guide http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=18457 but it just gives me an error message:

Fatal error: exception Failure("Failed ot load std@unserialize:2")

greetings 

Cauê Waneck

unread,
Dec 4, 2012, 4:41:08 PM12/4/12
to haxe...@googlegroups.com
Hi!

Very nice seeing Haxe on RPi. It's something I was looking forward to do when mine finally arrives ;)

try adding /usr/local/neko to your LD_LIBRARY_PATH environment variable and see if it works ;)

Cheers!
Cauê


2012/12/4 Christopher Kaster <ika...@googlemail.com>

Christopher Kaster

unread,
Dec 4, 2012, 6:24:43 PM12/4/12
to haxe...@googlegroups.com
Hey,

it's better but it still won't work. When i use haxelib or try to compile something i always get this error message:

Uncaught exception - module.c(124) : Builtin not found : fasthash

And yeah the best thing to do with my Raspberry Pi is probably Haxe ;).

cheers

Jan_Flanders

unread,
Dec 4, 2012, 6:45:14 PM12/4/12
to haxe...@googlegroups.com


On Wednesday, December 5, 2012 12:24:43 AM UTC+1, Christopher Kaster wrote:
Hey,
it's better but it still won't work. When i use haxelib or try to compile something i always get this error message:
Uncaught exception - module.c(124) : Builtin not found : fasthash


You need Neko 1.8.2 for fasthash. (instead of Neko 1.8.1 or older)

Best,

Jan

PS: There are also some builds here: http://builds.haxer.be/neko/rpi/

John Plsek

unread,
Dec 4, 2012, 8:53:40 PM12/4/12
to haxe...@googlegroups.com
Unfortunately, the Raspberry Pi forum is littered with people who know enough about linux to not fall for the rm -rf / trap, but that's about all they know. So, as with everything on that forum, those instructions are close enough to look plausible at first glance, but wrong enough to be almost totally useless.

I've successfully installed installed haxe on my pi (just last night actually). Here's a script I just knocked up that works (assuming attachments work)

John

--
install_haxe_pi.sh

John Plsek

unread,
Dec 4, 2012, 9:10:51 PM12/4/12
to haxe...@googlegroups.com
That should be run as root - i.e. sudo install_haxe_pi.sh
Message has been deleted

Samuel Batista

unread,
Dec 4, 2012, 11:18:20 PM12/4/12
to haxe...@googlegroups.com
Hi all, a while ago I thought to try this out myself and after much pain I wrote a pretty comprehensive guide on how to get Haxe to run on the Rasperry Pi. Noone responded so I forgot about it, but here you go!


Unfortunately NME hasn't been ported to run on the Pi yet, which is hugely limiting (and enough for me to lose interest in Haxe + Rapberry Pi).

Let me know if you run into issues.

John Plsek

unread,
Dec 4, 2012, 11:48:11 PM12/4/12
to haxe...@googlegroups.com
Yeah, that's the link in the original question - following the guide to the letter just does not work. However, it is close enough so that anyone with a little bit of Linux knowledge can fix up the glaring errors. Unfortunately, for those who are new to *nix, (i.e. 90% of the Raspberry Pi "community"), that guide is more likely to scare people away from Haxe


As for NME on Pi ... would the Pi even have enough grunt to bother with NME on it?


John

--

Samuel Batista

unread,
Dec 4, 2012, 11:59:45 PM12/4/12
to haxe...@googlegroups.com
Oh wow, I didn't see you posted a super sweet awesome script that installs Haxe without much effort! Forget all I said, use this mans script :-P

Christopher Kaster

unread,
Dec 7, 2012, 11:49:37 AM12/7/12
to haxe...@googlegroups.com
Hey,

thanks to your script i was able to install haxe, which now seems to work fine but there are still problems with compiling to C++ (Javascript seems to work):

haxelib run hxcpp Build.xml haxe -Dcpp -Dhaxe_207 -Dhaxe_208 -Dhaxe_209 -Dhaxe_210 -Dhaxe_211 -Dsys -Dtrue
Creating obj/linux//__pch/haxe/hxcpp.h.gch...
g++ -Iinclude -c -fvisibility=hidden -O2 -fpic -fPIC -DHX_LINUX -DHXCPP_VISIT_ALLOCS -Dhaxe_210 -m32 -I/home/kasoki/.haxe/dev/hxcpp//include -frtti -o obj/linux//__pch/haxe/hxcpp.h.gch /home/kasoki/.haxe/dev/hxcpp//include/hxcpp.h
cc1plus: error: unrecognized command line option â-m32â
Called from ? line 1
Called from BuildTool.hx line 1342
Called from BuildTool.hx line 591
Called from a C function
Called from BuildTool.hx line 626
Called from BuildTool.hx line 760
Called from BuildTool.hx line 791
Called from BuildTool.hx line 174
Uncaught exception - Error creating pch: 1 - build cancelled
Error : Build failed

I'm currently trying to remove the "-m32" statement. (Well still don't know where to remove this flag :>)

Christopher Kaster

unread,
Dec 7, 2012, 12:47:47 PM12/7/12
to haxe...@googlegroups.com
Okay found the parameter in hxcpp/build-tools/linux-toolchain.xml

hrhr

Daniel Uranga

unread,
Dec 7, 2012, 2:15:11 PM12/7/12
to haxe...@googlegroups.com
Remember to recompile hxcpp + nme after modifying
hxcpp/build-tools/linux-toolchain.xml.

2012/12/7 Christopher Kaster <ika...@gmail.com>:

Daniel Uranga

unread,
Dec 7, 2012, 2:16:04 PM12/7/12
to haxe...@googlegroups.com
Or only hxcpp if you are not using nme XD

2012/12/7 Daniel Uranga <daniel...@gmail.com>:

John Plsek

unread,
Dec 16, 2012, 7:18:07 AM12/16/12
to haxe...@googlegroups.com
Seems the prebuilt haxe/neko images are no longer available - what gives?

Christopher Kaster

unread,
Dec 16, 2012, 8:00:55 AM12/16/12
to haxe...@googlegroups.com
Hmm.... We should get Haxe and Neko into the Raspbian repos 

John Plsek

unread,
Jan 4, 2013, 9:12:30 PM1/4/13
to haxe...@googlegroups.com
well http://builds.haxer.be/haxe/rpi_wheezy/ is up again

However, I notice that while there's plenty of supposed versions of haxe on there, since r5316, every release downloaded from http://builds.haxer.be/haxe/rpi_wheezy/ is in fact r5316 - so, somethings gone horribly wrong with his build process

J


Jan_Flanders

unread,
Jan 5, 2013, 10:30:39 PM1/5/13
to haxe...@googlegroups.com


On Saturday, January 5, 2013 3:12:30 AM UTC+1, jaromanda wrote:
well http://builds.haxer.be/haxe/rpi_wheezy/ is up again

However, I notice that while there's plenty of supposed versions of haxe on there, since r5316, every release downloaded from http://builds.haxer.be/haxe/rpi_wheezy/ is in fact r5316 - so, somethings gone horribly wrong with his build process

J
 
The build process is broken due to an outdated install.ml file. Although it fails, the rev number is still being changed and then the last succesful (very old) version is being uploaded every time. I only have access to the haxer.be server but this build is being done from another computer which I have no access to. I have notified BernardV about this issue and he will fix it (some time in the future)

Best,

Jan

John Plsek

unread,
Apr 11, 2013, 12:20:44 AM4/11/13
to haxe...@googlegroups.com
3 months later - and nothing. It's amazing that someone would set up an automated system that's failed since 21 August 2012, yet it keeps running, spewing out over 100 useless versions


--

John Plsek

unread,
Apr 11, 2013, 12:21:26 AM4/11/13
to haxe...@googlegroups.com
Of course, by 100 useless versions, I mean 1100 useless versions

tecteun

unread,
Apr 17, 2013, 1:23:13 PM4/17/13
to haxe...@googlegroups.com
Last time I built Haxe on an ARM5 I only had to install ocaml, and change the following lines in install.ml,

let bytecode = true
let native = false

To run haxe through ocaml bytecode (not as fast as native)
- this is due to, I believe, ocamlopt not being available for ARM arch.

Jamie Bliss

unread,
Apr 19, 2013, 12:19:32 AM4/19/13
to haxe...@googlegroups.com
tl;dr http://www.raspberrypi.org/phpBB3/viewtopic.php?f=34&t=18457 works again, but the tarballs are not automatically updating. See bottom of post for links to some lovingly hand-built tarballs.

I have been able to compile Haxe and NekoVM on my Raspberry Pi (armhf). Those builds are now available on the autobuild server (thanks, Jan_Flanders).

The build instructions using install.ml work just fine, with the previously mentioned change to use bytecode and not native (because OCaml doesn't have a native Arm compiler yet). You don't need the package 'apache2' to build NekoVM, so you can omit it if you don't plan on playing with mod_neko.

Otherwise, the Ubuntu/Debian instructions work more-or-less on Raspbian.

During the Neko build, it will ask for an include path to search for libmysqlclient_r.a. Use the path `/usr/lib/arm-linux-gnueabihf` (I don't know why it does this. I assume that there's some misconfiguration in the linker).

For reference, the links to the Raspberry Pi builds are:
* Haxe: http://builds.haxer.be/haxe/rpi_wheezy/haxe-r6457.tar.gz
* NekoVM: http://builds.haxer.be/neko/rpi/neko-r1947.tar.gz

I don't have an extra Pi to dedicate to automatic builds at this point in time.

For completeness, I'm using hexxeh's distribution of Raspbian, but I doubt it makes much difference.

Jamie Bliss

unread,
Apr 19, 2013, 1:57:03 AM4/19/13
to haxe...@googlegroups.com
Nevermind. Don't use these builds. As far as I can tell, they're horribly, cripplingly bugged, and I haven't the foggiest idea what I did wrong.

Jamie Bliss

unread,
Apr 20, 2013, 12:23:24 AM4/20/13
to haxe...@googlegroups.com
So, I have been able to compile Haxe using install.ml and GNU make, to the same results.

Haxe, however, refuses to compile anything. Instead it produces errors like http://pastebin.com/BDH9D8zi (from compiling the unit test suite).

Since I don't know much about Haxe, I don't really know what to make of this.

To compile with make, i wrote a wrapper for ocamlc so that it can call ocamlopt[1], since the Makefiles only compile native right now.

The .hxml file I'm using[2] compiles the unit tests just for NekoVM. This lets me test my compiled haxe compiler against known-good code.

[1] http://astro73.com/rpi/ocamlopt
Reply all
Reply to author
Forward
0 new messages