missing dependencies libmodsecurity 3.0.4

vancanneyt

Verified User
Joined
Dec 13, 2012
Messages
87
Custombuild notified me from an update LibModSecurity 3.0.3 to 3.0.4 update is available. But when updating it was failing because of missing dependencies (Centos 7 with Nginx). Following this link: https://github.com/SpiderLabs/ModSecurity/wiki/Compilation-recipes-for-v3.x the following packages where missing:
yum install yajl yajl-devel GeoIP-devel lmdb lmdb-devel ssdeep ssdeep-devel lua lua-devel

After installing missing dependencies, the update went successfully. Don't know if it's a bug but I thought it was worth mentioning it :)
 

vancanneyt

Verified User
Joined
Dec 13, 2012
Messages
87
As it was installed before I wouldn't expect an issue with dependencies so it was a bit odd.
Here is the log:
Code:
Found /usr/local/directadmin/custombuild/modsecurity-v3.0.4.tar.gz
Extracting /usr/local/directadmin/custombuild/modsecurity-v3.0.4.tar.gz...
Configuring modsecurity-v3.0.4...
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking whether make sets $(MAKE)... (cached) yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
configure: Nothing about GeoIP was informed during the configure phase. Trying to detect it on the platform...
configure: YAJL library was not found
configure: Nothing about GeoIP was informed during the configure phase. Trying to detect it on the platform...
configure: GeoIP library was not found
configure: Nothing about MaxMind was informed during the configure phase. Trying to detect it on the platform...
configure: using MaxMind v1.4.2
configure: Nothing about LMDB was informed during the configure phase. Trying to detect it on the platform...
*** LOOKING AT PATH:  /usr/lib
*** LOOKING AT PATH:  /usr/local/lib
*** LOOKING AT PATH:  /usr/local/liblmdb
*** LOOKING AT PATH:  /usr/local/lmdb
*** LOOKING AT PATH:  /usr/local
*** LOOKING AT PATH:  /opt/liblmdb
*** LOOKING AT PATH:  /opt/lmdb
*** LOOKING AT PATH:  /opt
*** LOOKING AT PATH:  /usr
*** LOOKING AT PATH:  /usr/lib64
*** LOOKING AT PATH:  /opt/local
configure: LMDB library was not found
*** LOOKING AT PATH:  /usr/lib
*** LOOKING AT PATH:  /usr/local/lib
*** LOOKING AT PATH:  /usr/local/fuzzy
*** LOOKING AT PATH:  /usr/local/libfuzzy
*** LOOKING AT PATH:  /usr/local
*** LOOKING AT PATH:  /opt
*** LOOKING AT PATH:  /usr
*** LOOKING AT PATH:  /usr/lib64
*** LOOKING AT PATH:  /opt/local
configure: SSDEEP library was not found
configure: LUA support was marked as mandatory by the utilization of --with-lua=yes
*** LOOKING AT PATH:  /usr/lib
*** LOOKING AT PATH:  /usr/local/lib
*** LOOKING AT PATH:  /usr/local/lib64
*** LOOKING AT PATH:  /usr/local/lua
*** LOOKING AT PATH:  /usr/local/liblua
*** LOOKING AT PATH:  /usr/local
*** LOOKING AT PATH:  /opt
*** LOOKING AT PATH:  /usr
*** LOOKING AT PATH:  /usr/lib64
configure: LUA library found at: /usr/lib64//liblua-5.1.so
*** LOOKING AT PATH:  /opt/local
configure: LUA library found at: /usr/lib64//liblua-5.1.so
configure: error: LUA was explicitly referenced but it was not found

*** There was an error while trying to configure LibModSecurity
 

nhdnet

New member
Joined
May 6, 2018
Messages
2
I install this dependencies with yum and do build lua and build luajit... nothing works. I'm trying to setup nginx_apache (with modsecurity)
Errors:

Code:
make[2]: Entering directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools/rules-check'
g++ -DHAVE_CONFIG_H -I. -I../../src  -std=c++11 -I../../headers  -I/usr/local/include -DPCRE_HAVE_JIT  -DWITH_MAXMIND -I/usr/local/include   -I/usr/local/include/libxml2 -DWITH_LIBXML2   -g -O2 -MT modsec_rules_check-rules-check.o -MD -MP -MF .deps/modsec_rules_check-rules-check.Tpo -c -o modsec_rules_check-rules-check.o `test -f 'rules-check.cc' || echo './'`rules-check.cc
mv -f .deps/modsec_rules_check-rules-check.Tpo .deps/modsec_rules_check-rules-check.Po
/bin/sh ../../libtool  --tag=CXX   --mode=link g++  -g -O2  -L/usr/local/lib   -L/usr/local/lib -lpcre  -L/usr/local/lib/ -L/usr/lib64/  -L/usr/local/lib -lpcre -o modsec-rules-check modsec_rules_check-rules-check.o ../../src/.libs/libmodsecurity.la -L/usr/local/lib -lcurl -lGeoIP   -lmaxminddb   -lrt   -L/usr/local/lib -lxml2 -L/usr/lib -lz -liconv -lm -ldl -llmdb   -lluajit-5.1 -L/usr/local/lib -lpcre -lpcre -lfuzzy -lyajl   
libtool: link: g++ -g -O2 -o .libs/modsec-rules-check modsec_rules_check-rules-check.o  -L/usr/local/lib -L/usr/local/lib/ -L/usr/lib64/ ../../src/.libs/libmodsecurity.so -L/usr/lib /usr/local/lib/libcurl.so /usr/local/lib/libnghttp2.so -lssl -lcrypto -lGeoIP /usr/local/lib/libmaxminddb.so -lrt /usr/local/lib/libxml2.so -lz /usr/local/lib/libiconv.so -lm -ldl -llmdb -lluajit-5.1 /usr/local/lib/libpcre.so -lfuzzy -lyajl -pthread -Wl,-rpath -Wl,/usr/local/modsecurity/lib
../../src/.libs/libmodsecurity.so: undefined reference to `lua_pcallk'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_getglobal'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_setglobal'
../../src/.libs/libmodsecurity.so: undefined reference to `luaL_setfuncs'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_rawlen'
collect2: error: ld returned 1 exit status
make[2]: *** [modsec-rules-check] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools/rules-check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools'
make: *** [all-recursive] Error 1
 

nhdnet

New member
Joined
May 6, 2018
Messages
2
I install this dependencies with yum and do build lua and build luajit... nothing works. I'm trying to setup nginx_apache (with modsecurity)
Errors:

Code:
make[2]: Entering directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools/rules-check'
g++ -DHAVE_CONFIG_H -I. -I../../src  -std=c++11 -I../../headers  -I/usr/local/include -DPCRE_HAVE_JIT  -DWITH_MAXMIND -I/usr/local/include   -I/usr/local/include/libxml2 -DWITH_LIBXML2   -g -O2 -MT modsec_rules_check-rules-check.o -MD -MP -MF .deps/modsec_rules_check-rules-check.Tpo -c -o modsec_rules_check-rules-check.o `test -f 'rules-check.cc' || echo './'`rules-check.cc
mv -f .deps/modsec_rules_check-rules-check.Tpo .deps/modsec_rules_check-rules-check.Po
/bin/sh ../../libtool  --tag=CXX   --mode=link g++  -g -O2  -L/usr/local/lib   -L/usr/local/lib -lpcre  -L/usr/local/lib/ -L/usr/lib64/  -L/usr/local/lib -lpcre -o modsec-rules-check modsec_rules_check-rules-check.o ../../src/.libs/libmodsecurity.la -L/usr/local/lib -lcurl -lGeoIP   -lmaxminddb   -lrt   -L/usr/local/lib -lxml2 -L/usr/lib -lz -liconv -lm -ldl -llmdb   -lluajit-5.1 -L/usr/local/lib -lpcre -lpcre -lfuzzy -lyajl  
libtool: link: g++ -g -O2 -o .libs/modsec-rules-check modsec_rules_check-rules-check.o  -L/usr/local/lib -L/usr/local/lib/ -L/usr/lib64/ ../../src/.libs/libmodsecurity.so -L/usr/lib /usr/local/lib/libcurl.so /usr/local/lib/libnghttp2.so -lssl -lcrypto -lGeoIP /usr/local/lib/libmaxminddb.so -lrt /usr/local/lib/libxml2.so -lz /usr/local/lib/libiconv.so -lm -ldl -llmdb -lluajit-5.1 /usr/local/lib/libpcre.so -lfuzzy -lyajl -pthread -Wl,-rpath -Wl,/usr/local/modsecurity/lib
../../src/.libs/libmodsecurity.so: undefined reference to `lua_pcallk'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_getglobal'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_setglobal'
../../src/.libs/libmodsecurity.so: undefined reference to `luaL_setfuncs'
../../src/.libs/libmodsecurity.so: undefined reference to `lua_rawlen'
collect2: error: ld returned 1 exit status
make[2]: *** [modsec-rules-check] Error 1
make[2]: Leaving directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools/rules-check'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/directadmin/custombuild/modsecurity-v3.0.4/tools'
make: *** [all-recursive] Error 1
solved:

modsecurity compilation check for luajit-5.1 and it'll use this library if found. This is an error, it must use lua-5.3.
Remove (or move to another directory) /usr/local/lib/libluajit* and repeat ./build nginx_apache
 
Top