http {
init_by_lua '
require "resty.core"
';
...
}I got warning message.
nginx: [warn] [lua] base.lua:27: use of lua-resty-core with LuaJIT 2.0 is not recommended; use LuaJIT 2.1+ instead
How can I fix the warning?
Thank you.
Regards,
jsunamHello!
On Thu, Apr 24, 2014 at 4:13 PM, Soojin Nam wrote:
> I have installed OpenResty 1.5.12.1 RC3 and initiated lua-resty-core in
> nginx.conf.
>
[...]
> I got warning message.
>
> nginx: [warn] [lua] base.lua:27: use of lua-resty-core with LuaJIT 2.0 is
> not recommended; use LuaJIT 2.1+ instead
No. The expected behavior should be always using the bundled one
unless the user specifies --with-luajit=PATH to point to another
LuaJIT installation location.
It seems like your -L/usr/ocal/lib overrides ngx_lua's -L option set
from the LUAJIT_LIB environment (set by OpenResty's ./configure).
Will you try applying the patch at the end of this mail to your
bundle/ngx_lua-*/ and try it again (from ./configure)
./configure --with-cc-opt="-I/usr/local/include" --with-ld-opt="-L/usr/local/lib"
make
make installnginx: [warn] [lua] base.lua:27: use of lua-resty-core with LuaJIT 2.0 is not recommended; use LuaJIT 2.1+ insteadI tried omitting the --with-ld-opt="-L/usr/local/lib" but that leads to a compile error:
Undefined symbols for architecture x86_64:
"_pcre_free_study", referenced from:
_ngx_http_lua_ngx_re_gmatch in ngx_http_lua_regex.o
_ngx_http_lua_ffi_compile_regex in ngx_http_lua_regex.o
_ngx_http_lua_ffi_destroy_regex in ngx_http_lua_regex.o
_ngx_http_lua_ngx_re_sub_helper in ngx_http_lua_regex.o
_ngx_http_lua_ngx_re_gmatch_gc in ngx_http_lua_regex.o
_ngx_http_lua_ngx_re_gmatch_cleanup in ngx_http_lua_regex.o
_ngx_http_lua_ngx_re_gmatch_iterator in ngx_http_lua_regex.o
...
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [objs/nginx] Error 1
make[1]: *** [build] Error 2
make: *** [all] Error 2
So, that argument is obviously needed on OSX.
I know how to overcome this, but I'm sure someone else will hit this as well. I have tried this with two Macs (on with a lot of history) and other with clean installed Maverics with only brew installed luajit. The same problem does not arise if I install LuaJIT with Rudix.
Regards
Aapo
Hmm, this is strange. Will you paste the full output of your
"./configure" and "make" commands somewhere like gist?
Also, after "make install", please run the following command and
provide the output:
otool -L /path/to/your/openresty/nginx/sbin/nginx
Please try it out on your side :)