haXe + NME on Ubuntu 64-bit (11.10)

363 views
Skip to first unread message

Joshua Harlan Lifton

unread,
Jan 24, 2012, 1:00:44 AM1/24/12
to haxe...@googlegroups.com
Hi all,

Short version: What is the recommended way to install haXe and NME on
a 64-bit Linux system (Ubuntu 11.10)?

Long version:
Last year, I successfully used haXe and NME on a 32-bit Linux system
(Ubuntu 10.04). Now, I'm trying to do the same on a 64-bit Linux
system (Ubuntu 11.10), but I'm running into problems. I installed haXe
using the installer from http://haxe.org/download. In order for
"haxelib setup" to even run I had to install the libgc1c2:i386 package
rather than the libgc1c2 package. Then I installed NME via "haxelib
install nme". However, when I tried "haxelib run nme build
MyProject.nmml flash" I get:

Called from nme/utils/ByteArray.hx line 88
Called from nme/Loader.hx line 107
Called from nme/Loader.hx line 117
Called from nme/Loader.hx line 71
Called from C:\Motion-Twin\haxe/std/neko/Lib.hx line 33
Uncaught exception - load.c(232) : Failed to load library :
/usr/lib/haxe/lib/nme/3,1,1/ndll/Linux/nme.ndll (libGL.so.1: cannot
open shared object file: No such file or directory)

I tried symlinking /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 to
/usr/lib/libGL.so.1, but then I get:

Uncaught exception - load.c(232) : Failed to load library :
/usr/lib/haxe/lib/nme/3,1,1/ndll/Linux/nme.ndll (libGL.so.1: wrong ELF
class: ELFCLASS64)

I also tried the obvious "sudo apt-get install haxe", which seemed to
work, but when I ran "haxelib setup" I got:

root@computer:~# haxelib setup
Please enter haxelib repository path with write access
Hit enter for default (/usr/lib/haxe/lib)
Path :
Failed to create directory '/usr/lib/haxe/lib' (std@sys_create_dir),
maybe you need appropriate user rights
root@computer:~#

I found http://haxe.1354130.n2.nabble.com/64bits-and-compiling-from-sources-td4933927.html
regarding this error, but didn't see a resolution.

Thanks in advance,
Josh

Joshua Granick

unread,
Jan 24, 2012, 2:29:14 AM1/24/12
to haxe...@googlegroups.com
Try the "automated installer" script at haxenme.org --
http://www.haxenme.org/developers/get-started

If you feel nervous about running it, feel free to open it up and see what
it does.

Basically, it consists of installing haxe through the official installer
(so you have haxe 2.08), then removing neko, and adding it again from the
Ubuntu repositories. It is a version back, but it works just fine.

Once you have the 64-bit version of Neko installed, you recompile haxelib
and copy the result back to /usr/lib/haxe so that haxelib works correctly.
It's also handy to set /usr/lib/haxe/lib to be owned by you (or to have
global read/write) so you don't have to sudo every time you want to
install or update through haxelib.

If you need help for 32-bit compiling (which is used by NME by default for
Linux), "nme setup linux" will install the packages you need

Let me know how it goes!

Jiri Musil

unread,
Jan 24, 2012, 4:12:51 AM1/24/12
to haxe...@googlegroups.com
Hey jhl,

I've just installed haxe/nme on my fresh Ubuntu 11.10 on 64 bit laptop and everything works fine. You should be fine with apt version, although things evolve here pretty quickly so I went for manual build :


From what you write, you should not run haxelib setup as a root, just create the library dir as a root, described here : 


Regards

Jiri
Reply all
Reply to author
Forward
0 new messages