-
Notifications
You must be signed in to change notification settings - Fork 2k
ngx_http_lua_module.so: undefined symbol: pcre_dfa_exec when dynamic module compiled #715
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
Comments
@centminmod I guess you need to dynamically link against to PCRE in your nginx build because other dynamic modules like ngx_http_lua_module.so may depend on PCRE. |
thanks @agentzh looks like for now probably easiest to just compile as non-dynamic module |
lua nginx module dynamic module mode has a bug openresty/lua-nginx-module#715 so added a note to leave NGXDYNAMIC_LUA='n' to compile lua nginx module as non-dynamic module for now
new dynamic module options added & defaults are disabled via = 'n', which you can enable via persistent config file setup at /etc/centminmod/custom_config.inc for the below variables. [CODEB] NGXDYNAMIC_SRCCACHE='y' NGXDYNAMIC_DEVELKIT='n' # leave disabled as it requires lua nginx module as dynamic but it has a bug in lua nginx NGXDYNAMIC_MEMC='y' NGXDYNAMIC_REDISTWO='y' [/CODEB] you should leave NGXDYNAMIC_DEVELKIT='n' for now as it depends on lua nginx module compiled as dynamic module but that has a bug openresty/lua-nginx-module#715
Try to complile lua-nginx-module as dynamic module under Nginx 1.11.4 and still get the following error: Starting nginx: nginx: [emerg] dlopen() "/usr/local/nginx/modules/ngx_http_lua_module.so" failed (/usr/local/nginx/modules/ngx_http_lua_module.so: undefined symbol: pcre_dfa_exec) and with the following configure: ./configure --prefix=/usr/local/nginx --user=www --group=www --with-http_v2_module --with-http_ssl_module --with-http_gzip_static_module --with-http_realip_module --with-openssl=../openssl/ --with-pcre=../pcre/ --with-pcre-jit --add-dynamic-module=../ngx_devel_kit/ --add-dynamic-module=../srcache-nginx-module/ --add-dynamic-module=../set-misc-nginx-module/ --add-dynamic-module=../lua-nginx-module/ --with-cc-opt="-I /opt/pcrejit/include" --with-ld-opt="-L /opt/pcrejit/lib -Wl,-rpath,/opt/pcrejit/lib" Then, how to config the pcre for the dynamic lua-nginx-module correctly? Thanks. |
Try adding the --with-ld-opt="-E" to your ./configure command line. |
I managed to get lua nginx module to compile with dynamic module just by adding to
seems okay
dynamic modules include file /usr/local/nginx/conf/dynamic-modules.conf
dynamic module directory at /usr/local/nginx/modules
|
add nginx version: nginx/1.10.2 and the nginx seems ok. |
Is this fixed because the README still recommends using a dynamic module |
@benbro The document does not recommend building this module as a dynamic module. It simply states that this is possible and supported. If you statically link PCRE into your nginx, then you have to specify the |
@wangwei1237 Seems like you are linking two different PCRE libraries into the same nginx executable, one is statically linked via |
The recommended way is to always dynamically link against PCRE in your nginx instead of using the On the other hand, mixing statically linking and dynamic linking often requires explicit symbol exporting using linker options like |
To conclude, this is not really an issue in this module. |
@agentzh sorry, I am new, as u mentioned, how to dynamically link against PCRE in nginx,instead using the --with-pcre=PATH option? |
@playaround88 See how we do that in our packaging scripts here: https://github.com/openresty/openresty-packaging Or better, just use our prebuilt Linux packages through our yum/apt repositories: |
@agentzh thanks, but first links is 404.
and nginx lua work well! |
@playaround88 Sorry, there was a typo there. Just updated my comment above. |
tried latest compile with Nginx 1.9.12 and 0.10.2 and get the following error only when lua nginx is compiled as dynamic module, if non-dynamic it compiles fine
/usr/local/nginx/conf/dynamic-modules.conf
contentsThe text was updated successfully, but these errors were encountered: