Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
n1tehawk opened this issue Jun 5, 2016 · 1 comment
Open

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

n1tehawk opened this issue Jun 5, 2016 · 1 comment

Comments

@n1tehawk
Copy link

n1tehawk commented Jun 5, 2016

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

@shorile
Copy link

shorile commented Feb 10, 2021

thanks , for nginx.lua, see the error message "unknown luaJIT command or jit.* modules not installed", I got the solution to the problem from your content

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants