-
Notifications
You must be signed in to change notification settings - Fork 272
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
openresty 1.15.8.1 ngx.re can't work #258
Comments
@vinsonzou Seems like your nginx build lacks PCRE? Try the command to check:
Also, it's recommended to use our official binary packages of OpenResty: |
@agentzh tks. I can't build with --with-pcre . |
@vinsonzou You don't have to build with |
@agentzh system pcre-devel can't support utf-8 and jit.
Error output
|
@vinsonzou It does:
You can always find it out yourself this way. |
BTW, you can also specify the installation tree location of your own build of PCRE, just as in our openresty rpm packaging process: https://github.com/openresty/openresty-packaging/blob/master/rpm/SPECS/openresty.spec#L145 |
Aside: There is a lack of testing for PCRE support in That said @vinsonzou, you won't be able to use |
A simple patch has been proposed at #259 |
@thibaultcha @agentzh tks. |
I have the same problem with building with --with-pcre
if we build openresty with --with-pcre (use static lib),then there will no function C.pcre_version() in nginx .So,should we not use pcre_version in regex.lua ? @agentzh @thibaultcha |
We actually now get the same error message when compiling openresty with |
@alubbe @huntkalio There is indeed an issue in 1.15.8.1 when statically linking to libpcre. The workarounds are:
The fix is already in ngx_http_lua's master branch (see openresty/lua-nginx-module@2014dd8), but still has some issues on Darwin platforms. I just pushed openresty/lua-nginx-module#1577 yesterday evening which brings many improvements to our |
The above PR also fixes other cases such as |
One more thing: in upcoming releases (1.17.x.1+), the |
We're using ubuntu and are already setting
|
by the way, thank you so much for 724ef60 and your amazingly fast response time here! |
or... could we just apply this patch openresty/lua-nginx-module@2014dd8 before compiling? any reason why that might not work on ubuntu? |
This should work:
There is an issue with openresty/lua-nginx-module@2014dd8 (which is fixed by openresty/lua-nginx-module#1577) when specifying |
many thanks for your reply! |
It turned out to be easier to apply patches (724ef60 & openresty/lua-nginx-module@2014dd8) rather than changing the flags in our build setup, but I can confirm that it's working again - thank you so much! |
The lua-kong-nginx-module nginx module adds support for mTLS amongst other things. I also fixed the openresty version for kong enterprise 1.3. Notably, openresty 1.5.8.1 makes building libpcre a pain openresty/lua-resty-core#258 The workaround is to add some custom linker commands. For now I'm not going to do that, but maybe I'll add some sort of version-specific linker option in the future.
libpcre, if built statically using openresty, for openresty 1.15.8.1, fails to link properly, leading to errors when using ngx.re. Upstream versions of openresty don't have this issue, but Kong Enterprise 1.3 depends on openresty 1.15.8.1, so adding a workaround descibed in: openresty/lua-resty-core#258
The text was updated successfully, but these errors were encountered: