lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alexander Gladysh wrote:
> 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.

> 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.

> 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.

--Mike