luvit/luvit

LuaJIT doesn't compile as-is on OSX

Closed this issue · 4 comments

Qard commented

Just for reference, LuaJIT doesn't compile as-is on OSX. You can read about the issue here;

http://lua-users.org/lists/lua-l/2011-06/msg00491.html

Basically, add this to your make line for LuaJIT; TARGET_CC="gcc-4.2"

I might pull some changes tomorrow if I can find the time to figure out some other issues I'm getting in the compile. For one, -lrt doesn't work, since OSX doesn't use librt. If I remove it though, I get this;

Undefined symbols for architecture x86_64:
"_AbsoluteToNanoseconds", referenced from:
_uv_hrtime in uv.a(darwin.o)
ld: symbol(s) not found for architecture x86_64

I'll see if I can figure out where to find that on OSX.

Cool thanks. I don't have a mac to develop on so I'm a bit slower testing these kinds of things since I have to borrow a machine.

FWIW, I got it to compile by making these changes:

https://gist.github.com/1308155

Perhaps this is just an indication that using a configuration system like gyp (that seems to be what libuv is using) is in order :-/.

I went ahead and uploaded this to github so you can pull it:

brimworks@daffef7

master now compiles on OSX, though it does force 32 bit which I would like to fix eventually.