Skip to content

LuaJIT won't find its JIT library (jit.* modules) #22

Description

@n1tehawk

This project currently installs the LuaJIT interpreter with only a standard search path for Lua modules, based on /usr/local. .travis/setenv_lua.sh then arranges for an updated LUA_PATH including the LuaRocks directories, but also ignores the LUA_HOME_DIR where LuaJIT actually got installed.

This isn't a problem for "normal" Lua[JIT] use, unless you start requiring the jit.* modules (directly or indirectly). For example, requesting a bytecode listing with luajit -bl mysource.lua causes an error
luajit: unknown luaJIT command or jit.* modules not installed.

I've been experimenting a bit, and it seems there actually is a trivial solution to this.
Simply changing the line .travis/setup_lua.sh#L56 from
make && make install PREFIX="$LUA_HOME_DIR"
to
make PREFIX="$LUA_HOME_DIR" && make install PREFIX="$LUA_HOME_DIR"
will modify the (builtin) search path in a way that includes the LuaJIT destination directory, which I consider more suitable for the Travis CI installation. With this change applied, the jit.* modules are found without problems.

Regards, NiteHawk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions