Open kzcabstone opened 2 years ago
Found similar issue since some compilation flags changed for Fedora.
With the following standard build command it fails:
./configure --add-dynamic-module=/builddir/build/BUILD/ModSecurity-nginx-1.0.3
(...)
configuring additional dynamic modules
adding module in /builddir/build/BUILD/ModSecurity-nginx-1.0.3
checking for ModSecurity library ... not found
checking for ModSecurity library in /usr/local/modsecurity ... not found
./configure: error: ngx_http_modsecurity_module requires the ModSecurity library.
With manually setting MODSECURITY_LIB
and MODSECURITY_INC
also fails
export MODSECURITY_LIB=/usr/lib64/
export MODSECURITY_INC=/usr/include/modsecurity
./configure --add-dynamic-module=/builddir/build/BUILD/ModSecurity-nginx-1.0.3
(...)
configuring additional dynamic modules
adding module in /builddir/build/BUILD/ModSecurity-nginx-1.0.3
checking for ModSecurity library in "/usr/lib64/" and "/usr/include/modsecurity" (specified by the MODSECURITY_LIB and MODSECURITY_INC env) ... not found
./configure: error: ngx_http_modsecurity_module requires the ModSecurity library and MODSECURITY_LIB is defined as "/usr/lib64/" and MODSECURITY_INC (path for modsecurity.h) "/usr/include/modsecurity", but we cannot find ModSecurity there.
Applying patch in #275 works just fine in both cases:
./configure --add-dynamic-module=/builddir/build/BUILD/ModSecurity-nginx-1.0.3
(...)
adding module in /builddir/build/BUILD/ModSecurity-nginx-1.0.3
checking for ModSecurity library in "/usr/lib64/" and "/usr/include/modsecurity" (specified by the MODSECURITY_LIB and MODSECURITY_INC env) ... found
+ ngx_http_modsecurity_module was configured
Hi, I know this is kinda old but I just confirmed the issue lately on Fedora 40. I can also confirm that applying patch in https://github.com/owasp-modsecurity/ModSecurity-nginx/pull/275 fixes the issue.
Hi, I know this is kinda old but I just confirmed the issue lately on Fedora 40.
Just in case you're building yoursefl, the package is part of Fedora as nginx-mod-modsecurity
.
Hi, I know this is kinda old but I just confirmed the issue lately on Fedora 40.
Just in case you're building yoursefl, the package is part of Fedora as
nginx-mod-modsecurity
.
Thanks for the reply ! I kinda need to build it manually as I'm applying other custom patches as well + I'm trying to have one script that builds it on multi-distributions 😁
https://github.com/SpiderLabs/ModSecurity-nginx/blob/2497e6ac654d0b117b9534aa735b757c6b11c84f/config#L15
nginx src version: 1.20.2
When I was trying to compile the nginx connector module, nginx configure was complaining about libmodsecurity not found. Command line I was using:
I checked nginx/objs/autoconf.err and this is in it
So I think you need to either set $NGX_INCLUDE_UNISTD_H or not use printf