Home page logo
/

nmap-dev logo Nmap Development mailing list archives

Re: Nmap 5.36TEST3 test release
From: David Fifield <david () bamsoftware com>
Date: Wed, 12 Jan 2011 19:15:59 -0800

On Wed, Jan 12, 2011 at 05:27:47PM -0800, David Fifield wrote:
On Wed, Jan 12, 2011 at 04:57:43PM -0800, Fyodor wrote:
On Wed, Jan 12, 2011 at 04:27:05PM -0800, David Fifield wrote:

I tried building a dynamically linked Nmap RPM and it works (built on
CentOS and run on Fedora). What's the reason that it's being linked
statically?

The theory was that it'd be more portable :).  Also, we can't
dynamically link things like OpenSSL or all hell will break loose if
the target system doesn't have that.  But maybe dynamically linking to
system libraries and static to everything else would be ideal?

Hmm, that might work. I resorted to something similar in linking Nping
for the Mac packages. I added a separate OPENSSL_LIBS variable to
nping/Makefile, so that I could override it with "<...>/libssl.a
<...>/libcrypto.a <...>/libz.a".

Well, good news. I had to compile OpenSSL on CentOS to avoid the krb5
linking errors we were getting last year. By default, OpenSSL installs
in /usr/local/ssl and only makes a static library. So without -static,
the normal linking with -lssl already links statically.

I just removed '--define "static 1"' from the rpmbuild command and got a
binary that links against these libraries:

        linux-gate.so.1
        libdl.so.2
        libstdc++.so.6
        libm.so.6
        libgcc_s.so.1
        libc.so.6
        /lib/ld-linux.so.2

It works on Fedora at least, both name resolution and OpenSSL.

David Fifield
_______________________________________________
Sent through the nmap-dev mailing list
http://cgi.insecure.org/mailman/listinfo/nmap-dev
Archived at http://seclists.org/nmap-dev/


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]
AlienVault