lua-users home
lua-l archive

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


On Mon, May 19, 2008 at 4:07 AM, Mike Pall <mikelu-0805@mike.de> wrote:
> Alexander Gladysh wrote:
>  > This works with plain Lua, but doesn't with LuaJIT. In LuaJIT that
>  > require() call returns true instead of my module's table. Am I missing
>  > something?
>
>  This is not LuaJIT's fault. You're simply not building the module
>  the right way.
>
>  According to the Makefile you provided, you're linking the module
>  _itself_ against whatever liblua is found in /opt/local/lib. This
>  makes a forward reference to this library (or a copy of it for a
>  static library). In your case this is probably the shared library
>  of an installed copy of Lua (and not LuaJIT).

<Helpful detailed explanation skipped>

Oh. I knew there is something wrong with my makefile. :-(

Sorry for the noise. I just wish that there would be a way to force
such mislinked modules to just don't work (crash, whatever) instead of
erratic behaviour. I understand, that is not a LuaJIT or Lua problem,
but (as I see from list archives) a lot of people have to deal with
it.

Thank you,
Alexander.