Mod security install issue

ReN

Verified User
Joined
Jul 2, 2005
Messages
189
hey guys ,tried installing modsecurity with custom build got the following , any ideas be great

libtool: compile: gcc -DHAVE_CONFIG_H -I. -I/usr/local/include/libxml2 -I/usr/include/apache -L/usr/lib/apache -DDEFAULT_USER="nginx" -DDEFAULT_GROUP="nginx" -I/usr/local/include/apr-1 -I/usr/local/include/apr-1 -I/usr/include -I/usr/local/include -I/usr/local/include/db5 -I/usr/include/apache -I/usr/local/include -DWITH_CURL_SSLVERSION_TLSv1_2 -DWITH_CURL -I/usr/local/include/libxml2 -DWITH_PCRE_STUDY -DMODSEC_PCRE_MATCH_LIMIT=1500 -DMODSEC_PCRE_MATCH_LIMIT_RECURSION=1500 -DREQUEST_EARLY -DWITH_APU_CRYPTO -DWITH_REMOTE_RULES -I/usr/local/include -DPCRE_STATIC -I/usr/include/apache -L/usr/lib/apache -DDEFAULT_USER="nginx" -DDEFAULT_GROUP="nginx" -MT mod_security2_la-acmp.lo -MD -MP -MF .deps/mod_security2_la-acmp.Tpo -c acmp.c -o mod_security2_la-acmp.o >/dev/null 2>&1
--- mod_security2_la-msc_crypt.lo ---
In file included from modsecurity.h:49:0,
from msc_crypt.h:18,
from msc_crypt.c:15:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
--- mod_security2_la-apache2_io.lo ---
In file included from modsecurity.h:49:0,
from apache2_io.c:17:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-msc_crypt.lo ---
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-msc_status_engine.lo ---
In file included from modsecurity.h:49:0,
from msc_pcre.h:33,
from msc_status_engine.h:22,
from msc_status_engine.c:15:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-apache2_config.lo ---
In file included from modsecurity.h:49:0,
from apache2_config.c:17:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-mod_security2.lo ---
In file included from modsecurity.h:49:0,
from mod_security2.c:20:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-modsecurity.lo ---
In file included from modsecurity.h:49:0,
from modsecurity.c:19:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-apache2_util.lo ---
In file included from modsecurity.h:49:0,
from apache2_util.c:15:
msc_remote_rules.h:54:9: error: unknown type name 'apr_crypto_key_t'
apr_crypto_key_t **apr_key,
^~~~~~~~~~~~~~~~
msc_remote_rules.h:55:9: error: unknown type name 'apr_crypto_t'
apr_crypto_t *f,
^~~~~~~~~~~~
--- mod_security2_la-msc_status_engine.lo ---
msc_status_engine.c: In function 'msc_status_engine_call':
msc_status_engine.c:478:9: warning: implicit declaration of function 'gethostbyname' [-Wimplicit-function-declaration]
if (gethostbyname(hostname)) {
^~~~~~~~~~~~~
*** [mod_security2_la-msc_status_engine.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-apache2_util.lo ---
*** [mod_security2_la-apache2_util.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-apache2_io.lo ---
*** [mod_security2_la-apache2_io.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-mod_security2.lo ---
*** [mod_security2_la-mod_security2.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-msc_crypt.lo ---
*** [mod_security2_la-msc_crypt.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-modsecurity.lo ---
*** [mod_security2_la-modsecurity.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-apache2_config.lo ---
*** [mod_security2_la-apache2_config.lo] Error code 1

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
--- mod_security2_la-acmp.lo ---
mv -f .deps/mod_security2_la-acmp.Tpo .deps/mod_security2_la-acmp.Plo
7 errors

make[2]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
*** [all] Error code 2

make[1]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
1 error

make[1]: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2/apache2
*** [all-recursive] Error code 1

make: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2
1 error

make: stopped in /usr/local/directadmin/custombuild/modsecurity-2.9.2
-e \n*** The make has failed, would you like to try to make again? (y,n):



Freebsd 11.2 Fresh install
 

wattie

Verified User
Joined
May 31, 2008
Messages
1,037
Location
Bulgaria
Here is something that may be helpful: https://github.com/SpiderLabs/ModSecurity/issues/938

Quote:

Directadmin build scripts compile apache with included apr libraries put in /usr/lib/apache and /usr/include/apache
The FreeBSD devel/apr1 package dumps its own apr libraries in /usr/local/lib

The modsecurity config was checking the libraries in /usr/local/lib and enabling APR_CRYPTO support, but then the compiler was compiling against the libraries in /usr/lib/apache and /usr/include/apache which did not have this support so it bombed out. On my servers i cleared out those 2 folders and now compile apache against the FreeBSD apr libraries and modsecurity now compiles fine.
 

ReN

Verified User
Joined
Jul 2, 2005
Messages
189
TY for that wattie, can confirm i am also having this issue , fresh install of Freebsd 11.2 and Latest build of DA.
 
Top