owasp-modsecurity / ModSecurity

ModSecurity is an open source, cross platform web application firewall (WAF) engine for Apache, IIS and Nginx. It has a robust event-based programming language which provides protection from a range of attacks against web applications and allows for HTTP traffic monitoring, logging and real-time analysis.
https://www.modsecurity.org
Apache License 2.0
8.24k stars 1.61k forks source link

make error in v3.0.2 #1865

Closed mayou33 closed 6 years ago

mayou33 commented 6 years ago

../../src/.libs/libmodsecurity.a(lt2-libmodsecurity_la-geo_lookup.o): In function modsecurity::Utils::GeoLookup::cleanUp()': /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:44: undefined reference toMMDB_close' ../../src/.libs/libmodsecurity.a(lt2-libmodsecurity_la-geo_lookup.o): In function modsecurity::Utils::GeoLookup::setDataBase(std::string const&, std::string*)': /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:63: undefined reference toMMDB_open' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:65: undefined reference to MMDB_strerror' ../../src/.libs/libmodsecurity.a(lt2-libmodsecurity_la-geo_lookup.o): In functionmodsecurity::Utils::GeoLookup::lookup(std::string const&, modsecurity::Transaction*, std::function<bool (int, std::string)>)': /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:125: undefined reference to MMDB_lookup_string' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:137: undefined reference toMMDB_strerror' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:149: undefined reference to MMDB_get_value' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:157: undefined reference toMMDB_get_value' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:165: undefined reference to MMDB_get_value' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:173: undefined reference toMMDB_get_value' /opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:181: undefined reference to MMDB_get_value' ../../src/.libs/libmodsecurity.a(lt2-libmodsecurity_la-geo_lookup.o):/opt/modsecurity-v3.0.2/src/utils/geo_lookup.cc:189: more undefined references toMMDB_get_value' follow collect2: error: ld returned 1 exit status make[2]: [modsec-rules-check] Error 1 make[2]: Leaving directory `/opt/modsecurity-v3.0.2/tools/rules-check' make[1]: [all-recursive] Error 1 make[1]: Leaving directory `/opt/modsecurity-v3.0.2/tools' make: *** [all-recursive] Error 1

mayou33 commented 6 years ago

libmaxminddb-1.3.2 has install

victorhora commented 6 years ago

@mayou33

I can not reproduce the issue you've reported with the latest codebase from master of ModSecurity.

Compilation completes fine both with libmaxminddb-1.2.0 (package from distro) as well as ibmaxminddb-1.3.2 installed from source from libmaxminddb GitHub.

Try again with the latest codebase of libModSecurity as per instructions here: https://github.com/SpiderLabs/ModSecurity/wiki/Compilation-recipes-for-v3.x

If your issue persists, please make sure you provide as much information is possible about your environment (e.g. distro) and the output summary of your configure script like so:

ModSecurity - v3.0.2-72-g156527a for Linux

 Mandatory dependencies
   + libInjection                                  ....v3.0.2-72-g156527a
   + SecLang tests                                 ....156527a

 Optional dependencies
   + GeoIP/MaxMind                                 ....found
      * (MaxMind) v1.3.2
         -lmaxminddb , -DWITH_MAXMIND -I/usr/local/include
   + LibCURL                                       ....found v7.38.0
      -L/usr/lib/x86_64-linux-gnu -lcurl,  -DWITH_CURL_SSLVERSION_TLSv1_2 -DWITH_CURL
   + YAJL                                          ....found v2.1.0
      -lyajl , -DWITH_YAJL -I/usr/include/yajl
   + LMDB                                          ....not found
   + LibXML2                                       ....found v2.9.1
      -lxml2, -I/usr/include/libxml2 -DWITH_LIBXML2
   + SSDEEP                                        ....not found
   + LUA                                           ....not found

 Other Options
   + Test Utilities                                ....enabled
   + SecDebugLog                                   ....enabled
   + afl fuzzer                                    ....disabled
   + library examples                              ....enabled
   + Building parser                               ....disabled
   + Treating pm operations as critical section    ....disabled
mayou33 commented 6 years ago

thank you for your help