Nmap Development mailing list archives
Nmap static build fails
From: Florian Roth <venom14 () gmail com>
Date: Mon, 17 Sep 2012 14:07:42 +0200
I tried to compile Nmap with static libraries as I was asked to install nmap on a SuSE Linux Enterprise Server x64 in a DMZ environment. Solving the dependencies for the RPMs made me crazy. (missing: libsvn -> libneo -> neo -> libserf (only sources) many dependencies ... and so on ... never ending story) So I thought that size is no object and tried to compile nmap statically. A simple "./configure --without-ssl" and "make static" failed. (error message see below) The error is the same using the 6.01, 5.61 and 5.36 sources. (example below showing the 5.36 sources compiling tests) I tried: ./configure --without-openssl --without-zenmap --with-pcap=linux --with-liblua=included --with-libpcap=internal --enable-static --without-ndiff --without-nping =================== make
compiles - but still the libstdc++ libraries are dynamically linked
froth@rubikus:~/nmap-5.36TEST4$ ldd nmap linux-vdso.so.1 => (0x00007fff7e9ff000) libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007fddc261a000) libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007fddc2314000) libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007fddc208e000) libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007fddc1e78000) libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007fddc1ae3000) /lib64/ld-linux-x86-64.so.2 (0x00007fddc2839000) ========================== "make static" fails. libpcap/libpcap.a(nametoaddr.o): In function `pcap_nametonetaddr': /home/froth/nmap-5.36TEST4/libpcap/./nametoaddr.c:151: warning: Using 'getnetbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libpcap/libpcap.a(nametoaddr.o): In function `pcap_nametoproto': /home/froth/nmap-5.36TEST4/libpcap/./nametoaddr.c:267: warning: Using 'getprotobyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking libpcap/libpcap.a(nametoaddr.o): In function `pcap_nametoport': /home/froth/nmap-5.36TEST4/libpcap/./nametoaddr.c:181: warning: Using 'getservbyname' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking /usr/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in `/usr/lib/x86_64-linux-gnu/gcc/x86_64-linux-gnu/4.5.2/../../../libc.a(strcmp.o)' can not be used when making an executable; recompile with -fPIE and relink with -pie collect2: ld returned 1 exit status make[2]: *** [nmap] Error 1 make[2]: Leaving directory `/home/froth/nmap-5.36TEST4' make[1]: *** [all] Error 2 make[1]: Leaving directory `/home/froth/nmap-5.36TEST4' make: *** [static] Error 2 I guess it has something to do with the "binutils" package. Is there anything I can do or try? -- Sincerely Saludos cordiales Mit freundlichen Grüßen Florian Roth _______________________________________________ Sent through the nmap-dev mailing list http://cgi.insecure.org/mailman/listinfo/nmap-dev Archived at http://seclists.org/nmap-dev/
Current thread:
- Nmap static build fails Florian Roth (Sep 17)
- Re: Nmap static build fails David Fifield (Sep 17)
- Re: Nmap static build fails David Fifield (Sep 17)
- Re: Nmap static build fails John Spencer (Sep 17)
- Re: Nmap static build fails Florian Roth (Sep 18)
- Re: Nmap static build fails John Spencer (Sep 17)