Closed quanah closed 7 years ago
Disabling mlogc while enabling standalone comes directly from the mod security wiki on building with nginx:
https://github.com/SpiderLabs/ModSecurity/wiki/Reference-Manual#Installation_for_NGINX
Hi @quanah,
Are you able to compile ModSecurity without disable the mlogc? It seems ModSecurity is trying to find apr.h which is needed even without the mlogc.
@zimmerle I already noted that w/o disabling mlogc, the build succeeds. It's the last line in my original comment.
Do you mind to share your config.log ?
You can use gist for that: https://gist.github.com/
Sorry for the delay, I had an upcoming vacation to prepare for and then take. ;)
Playing with the options to configure, if --disable-mlogc is added, then configure is unable to find apr & apr-util.
With --disable-mlogc specified:
checking for libcurl config script... /opt/zimbra/common/bin/curl-config ./configure: line 13855: test: : integer expression expected ./configure: line 13858: test: : integer expression expected ./configure: line 13861: test: : integer expression expected checking if libcurl is at least v... yes, 7.40.0 checking if libcurl is linked with gnutls... no configure: using curl v7.40.0 configure: looking for Apache module support via DSO through APXS configure: found apxs at /opt/zimbra/common/bin/apxs configure: checking httpd version configure: httpd is recent enough checking for libpcre config script... /usr/bin/pcre-config configure: using pcre v7.8 checking for libxml2 config script... /opt/zimbra/common/bin/xml2-config checking if libxml2 is at least v2.6.29... yes, 2.9.2 configure: using libxml2 v2.9.2 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for liblua config script... no checking for lua install... no configure: optional lua library not found checking for libyajl config script... no checking for yajl install... no configure: optional yajl library not found checking for ssdeep path... no configure: optional ssdeep library not found configure: WARNING: APR util was not compiled with crypto support. SecRemoteRule will not support the parameter 'crypto' checking that generated files are newer than configure... done configure: creating ./config.status
Without specifying --disable-mlogc:
checking for libcurl config script... /opt/zimbra/common/bin/curl-config ./configure: line 13855: test: : integer expression expected ./configure: line 13858: test: : integer expression expected ./configure: line 13861: test: : integer expression expected checking if libcurl is at least v... yes, 7.40.0 checking if libcurl is linked with gnutls... no configure: using curl v7.40.0 configure: looking for Apache module support via DSO through APXS configure: found apxs at /opt/zimbra/common/bin/apxs configure: checking httpd version configure: httpd is recent enough checking for libpcre config script... /usr/bin/pcre-config configure: using pcre v7.8 checking for libapr config script... /opt/zimbra/common/bin/apr-1-config configure: using apr v1.5.1 checking for libapu config script... /opt/zimbra/common/bin/apu-1-config configure: using apu v1.5.4 checking for libxml2 config script... /opt/zimbra/common/bin/xml2-config checking if libxml2 is at least v2.6.29... yes, 2.9.2 configure: using libxml2 v2.9.2 checking for pkg-config... /usr/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for liblua config script... no checking for lua install... no configure: optional lua library not found checking for libyajl config script... no checking for yajl install... no configure: optional yajl library not found checking for ssdeep path... no configure: optional ssdeep library not found checking that generated files are newer than configure... done configure: creating ./config.status
ok, tracked this down to disabling apache2 and mlogc. Although it appears that apache2 is required for building this out with nginx? doc is not clear on that.
Hence https://github.com/SpiderLabs/ModSecurity/tree/libmodsecurity for an agnostic webserver library.
@uxbod I'm not exactly sure what that comment means. The directions for building on nginx are to build standalone. Standalone should be without apache2 and without mlogc. However, if you specify such a thing, building modsecurity breaks. That seems to be a quite valid bug.
@uxbod ah, after reading through the description, I see your point. However, given that it's not advised to use libmodsecurity at this time, it doesn't help much. ;) It would be nice to see this fixed in the 2.9 branch until 3.x is ready.
@quanah - were you able to get past this issue?
@gchorny I no longer work for Zimbra, so it's not on my radar to address. I've no idea if it remains pertinent to Zimbra's plans for the future.
Standalone build depends on Apache. Disabling mlogc also disables Apache therefore breaks the build. For complete Apache independence please check on libModSecurity. Check #661 for further information.
nginx connector that no longer needs the Standalone versions - https://github.com/SpiderLabs/ModSecurity-nginx
If --disable-mlogc and --enable-standalone-module are passed to configure, the result is not buildable, with the following error:
If I remove the --disable-mlogc option, it compiles just fine.