[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaJIT 2 vs. C modules built for Lua
- From: Alexander Gladysh <agladysh@...>
- Date: Tue, 10 Nov 2009 11:48:55 +0300
>> Any standard way to workaround this issue on 64-bit Linux? I need to
>> keep both Lua and LuaJIT working.
> You could use 32 bit Lua, too, even on 64 bit.
Yes, this would suit me.
>> I think that LuaRocks compiles Lua modules into 64-bits.
> I bet this can be changed with something as simple as adding -m32
> to the compiler and linker lines.
If I'm to go that way, I need LuaRocks to do this automatically for
any module without me remembering this. I hope it has an option to do
this somewhere. Time to dig into the docs. :-)
>> It seems that I have to keep *manually* two separate module trees, and
>> to change LUA_CPATH before I launch Lua or LuaJIT. Is there a better
>> solution?
> You could install either one into a different tree and change the
> compiled-in module path. With LuaJIT that's pretty easy:
> make clean
> make PREFIX=/opt/lj2
> make install PREFIX=/opt/lj2
> Then the binary modules end up in /opt/lj2/lib/lua/5.1. You could
> symlink the Lua module path together, i.e.:
> rmdir /opt/lj2/share/lua/5.1
> ln -s /usr/local/share/lua/5.1 /opt/lj2/share/lua/5.1
> You don't need (or should) set LUA_CPATH then.
Thanks, this looks like what I need.
Alexander.