-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Configuration isn't checking whether the LuaJIT libraries exist in the given paths on Linux #1661
Comments
Hello,
I think this line is misleading:
|
i solved it by specifying LUAJIT_LIB and LUAJIT_INC explicitly in the config file (at the variable initialisation)
and it installed |
What's the path going to be on Debian / Ubuntu? Sad this is still open and not yet resolved. |
this worked for me as well |
I share your frustration; I think some developers either retarded or they don't care. It seems when we download the https://github.com/openresty/luajit2, the lib and include folder don't exist. So again, no idea how to set |
Please refer to the installation guide: https://github.com/openresty/lua-nginx-module?tab=readme-ov-file#installation |
I'm trying to configure and build ngx_lua with
./configure --with-compat --add-dynamic-module=../lua-nginx-module-0.10.16rc4/
, but it is unable to automatically find LuaJIT, and fails the LuaJIT 2.x check witherror: unsupported LuaJIT version; ngx_http_lua_module requires LuaJIT 2.x.
.It seems like it's not running any of the "auto-discovery" checks, which I believe is because $ngx_found is still "yes" from the previous check. This can be fixed by removing the if statement around the first check in that else block, "LuaJIT library in /usr/local/", or explicitly setting $ngx_found to no.
Even with that change, it passes the first check, even though LuaJIT is installed in
/usr/
, not/usr/local/
. I don't think it ever checks if the LuaJIT libraries exist in the paths. This is true whenLUAJIT_LIB
andLUAJIT_INC
were provided explicitly as well, with paths that do not exist:or compiling as a standard (not dynamic) module with
LUAJIT_INC=/asdfdsf LUAJIT_LIB=/dkfjd ./configure --with-ld-opt="-Wl,-rpath,/usr/lib" --add-module=../lua-nginx-module-0.10.16rc4/
:I fixed this by changing line 7 from
ngx_feature_incs=
tongx_feature_incs="#include <lauxlib.h>"
, which I believe was removed in a96e99a and added it back like it is now in 315330a.Looking at the ngx_feature_libs in the explicit section, it also appears that the ones in the auto discovery section should have
-L/usr/local/include/luajit-2.0
/-L/usr/include/luajit-2.0
instead of-L/usr/local/lib
/-L/usr/lib
It also doesn't automatically check for LuaJIT 2.1 at all.
Build Environment:
ngx_lua v0.10.16rc4
nginx 1.17.9
luajit 2.0.5-2 (I have also tried luajit 2.1 0ad60cc and openresty/luajit2@38cb695, with the same results)
gcc 9.2.1 20200130
The text was updated successfully, but these errors were encountered: