ModSecurity icon indicating copy to clipboard operation
ModSecurity copied to clipboard

Make fails on CentOS5/curl7.15 (default curl-devel)

Open lehels opened this issue 10 years ago • 4 comments

Since https://github.com/SpiderLabs/ModSecurity/pull/881/files - 2.9.1 fails to compile on CentOS5:

make[1]: Entering directory `/usr/src/modsecurity-2.9.1/mlogc'
gcc -DHAVE_CONFIG_H -I. -I../apache2  -DLINUX -D_REENTRANT -D_GNU_SOURCE -I../apache2  -I/usr/local/apache/include -DWITH_CURL -I/opt/wwwh/libpcre/include -g -O2  -I/usr/local/apache/include  -MT mlogc-mlogc.o -MD -MP -MF .deps/mlogc-mlogc.Tpo -c -o mlogc-mlogc.o `test -f 'mlogc.c' || echo './'`mlogc.c
mlogc.c: In function ‘logc_init’:
mlogc.c:1281: error: ‘CURL_SSLVERSION_TLSv1_0’ undeclared (first use in this function)
mlogc.c:1281: error: (Each undeclared identifier is reported only once
mlogc.c:1281: error: for each function it appears in.)
mlogc.c:1284: error: ‘CURL_SSLVERSION_TLSv1_1’ undeclared (first use in this function)
mlogc.c:1287: error: ‘CURL_SSLVERSION_TLSv1_2’ undeclared (first use in this function)
make[1]: *** [mlogc-mlogc.o] Error 1
make[1]: Leaving directory `/usr/src/modsecurity-2.9.1/mlogc'
make: *** [all-recursive] Error 1
[/usr/src/modsecurity-2.9.1/mlogc]# curl --version
curl 7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5

Any thoughts please?

lehels avatar Apr 19 '16 08:04 lehels

@lehels what version of libcurl-devel is installed on your system?

p0pr0ck5 avatar May 02 '16 21:05 p0pr0ck5

Same problem here, but I'm on Ubuntu 12.04.

# dpkg -l | grep curl
ii  libcurl3                           7.22.0-3ubuntu4.15                    Multi-protocol file transfer library (OpenSSL)
ii  libcurl3-gnutls                    7.22.0-3ubuntu4.15                    Multi-protocol file transfer library (GnuTLS)
ii  libcurl4-openssl-dev               7.22.0-3ubuntu4.15                    Development files and documentation for libcurl (OpenSSL)

Jorilx avatar Jun 06 '16 15:06 Jorilx

@lehels and @Jorilx 7.34.0 is when those constants were added. It appears the highest possible version available via repo's for CentOS 5 is curl-7.31.0-23.2.x86_64.rpm. You can attempt to install the Cent7 or Fedora rpm's. Check http://rpmfind.net/linux/rpm2html/search.php?query=libcurl for RPMs. If the RPM's don't work you'll have to compile these from scratch. It should be noted that CentOS 5 is almost a decade old at this point and is longer updated beyond maintenance updates and that will end next year.

csanders-git avatar Jun 06 '16 15:06 csanders-git

I caught the same problem on Ubuntu 12.04 due to a super old curl.

Fortunately, only the mlogc utility seems to be affected. If you aren't using that, you can use ./configure --disable-mlogc to get the Apache module to build normally.

lifeforms avatar Aug 20 '16 09:08 lifeforms