Thanka Rainer,

I will take a look


On Tue, Jul 19, 2011 at 7:06 PM, Rainer Jung <> wrote:
Hi devs,

2.6.1 has small build problems. The module build Makefile in apache2
does not use any of the PCRE_* vars when actually building the modules.
So it will only work when PCRE is in the default system pathzs and will
then use that PCRE.

Possible patch:

---       2011-07-19 12:40:41.000000000 +0200
+++ 2011-07-20 01:31:31.823349000 +0200
@@ -306,41 +306,41 @@
                           msc_geo.c msc_gsb.c msc_unicode.c acmp.c
msc_lua.c msc_release.c

 mod_security2_la_CFLAGS = @APXS_CFLAGS@ @APR_CFLAGS@ @APU_CFLAGS@ \
-                          @LIBXML2_CFLAGS@ @LUA_CFLAGS@
+                          @PCRE_CFLAGS@ @LIBXML2_CFLAGS@ @LUA_CFLAGS@

-mod_security2_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @LIBXML2_LDADD@
+mod_security2_la_LIBADD = @APR_LDADD@ @APU_LDADD@ @PCRE_LDADD@
 @AIX_TRUE@mod_security2_la_LDFLAGS = -module -avoid-version \
 @AIX_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@AIX_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@AIX_TRUE@                           @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@

 @FREEBSD_TRUE@mod_security2_la_LDFLAGS = -no-undefined -module
-avoid-version \
 @FREEBSD_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@FREEBSD_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@FREEBSD_TRUE@                           @PCRE_LDFLAGS@

 @HPUX_TRUE@mod_security2_la_LDFLAGS = -module -avoid-version \
 @HPUX_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@HPUX_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@HPUX_TRUE@                           @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@

 @LINUX_TRUE@mod_security2_la_LDFLAGS = -no-undefined -module
-avoid-version \
 @LINUX_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@LINUX_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@LINUX_TRUE@                           @PCRE_LDFLAGS@ @LIBXML2_LDFLAGS@

 @MACOSX_TRUE@mod_security2_la_LDFLAGS = -module -avoid-version \
 @MACOSX_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@MACOSX_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@MACOSX_TRUE@                           @PCRE_LDFLAGS@

 @NETBSD_TRUE@mod_security2_la_LDFLAGS = -no-undefined -module
-avoid-version \
 @NETBSD_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@NETBSD_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@NETBSD_TRUE@                           @PCRE_LDFLAGS@

 @OPENBSD_TRUE@mod_security2_la_LDFLAGS = -no-undefined -module
-avoid-version \
 @OPENBSD_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@OPENBSD_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@OPENBSD_TRUE@                           @PCRE_LDFLAGS@

 @SOLARIS_TRUE@mod_security2_la_LDFLAGS = -module -avoid-version \
 @SOLARIS_TRUE@                           @APR_LDFLAGS@ @APU_LDFLAGS@
-@SOLARIS_TRUE@                           @LIBXML2_LDFLAGS@ @LUA_LDFLAGS@
+@SOLARIS_TRUE@                           @PCRE_LDFLAGS@

 all: modsecurity_config_auto.h
       $(MAKE) $(AM_MAKEFLAGS) all-am

Ânother thing: the -DMSC_TEST hint is a bit hidden. It would be nice, if
"make test" would apply this automatically. I first ran into link
failures for msc_test, and when checking the code that used the missing
symbols, I saw the test against the MSC_TEST define, which I then also
found in the doc file.

Thanks for the good work!


10 Tips for Better Web Security
Learn 10 ways to better secure your business today. Topics covered include:
Web security, SSL, hacker attacks & Denial of Service (DoS), private keys,
security Microsoft Exchange, secure Instant Messaging, and much more.
mod-security-developers mailing list
ModSecurity Services from Trustwave's SpiderLabs: