From 2bdf68128939b586567d81ab6402c46e83affa05 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 2 Mar 2011 07:24:54 +0000 Subject: [PATCH] Set up the RPM build to use the compat-glibc and compat-gcc-34-c++ packages. There was a report that Nmap fails to run on an old Glibc now that we link libc statically. So use this older compat version. --- nmap.spec.in | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nmap.spec.in b/nmap.spec.in index 936b8f36d..58f8a8104 100644 --- a/nmap.spec.in +++ b/nmap.spec.in @@ -49,6 +49,17 @@ both console and graphical versions are available. %setup -q %build +# Link with compatibility Glibc 2.3.4. CentOS packages +# compat-glibc and compat-gcc-34-c++. +CC=gcc34; export CC +CXX=g++34; export CXX +CPPFLAGS="-I/usr/lib/i386-redhat-linux4E/include -B/usr/lib/i386-redhat-linux4E/lib/ $CPPFLAGS"; export CPPFLAGS +CFLAGS="-I/usr/lib/i386-redhat-linux4E/include -B/usr/lib/i386-redhat-linux4E/lib/ $CFLAGS"; export CFLAGS +CXXFLAGS="-I/usr/lib/i386-redhat-linux4E/include -B/usr/lib/i386-redhat-linux4E/lib/ $CXXFLAGS"; export CXXFLAGS +# Settings LDFLAGS seems logical but leads to an error on C++ link: +# /usr/lib/gcc/i386-redhat-linux/3.4.6/libgcc_s.so: undefined reference to `__stack_chk_fail@GLIBC_2.4' +# LDFLAGS="-B/usr/lib/i386-redhat-linux4E/lib/ $LDFLAGS"; export LDFLAGS + %configure --with-openssl=%{openssl} --without-zenmap --with-ndiff --with-libdnet=included --with-libpcap=included --with-libpcre=included --with-liblua=included %if "%{buildncat}" == "0" %configure --without-ncat