mailing list archives
Can't build Nmap --with-libpcap=path/to/libpcap
From: Daniel Miller <bonsaiviking () gmail com>
Date: Wed, 11 Dec 2013 11:37:38 -0600
So I was trying to clean up Nsock a bit, since it unconditionally uses
the pcap.h that ships with Nmap, even when a system-installed
libpcap-dev package is available. But that's a separate issue, since I
can't fix it without changing compatibility, as follows:
Download and build libpcap. Call the directory $MY_PCAP.
Configure Nmap: ./configure --with-libpcap=$MY_PCAP
Watch in consternation as these messages fly past:
checking pcap.h usability... no
checking pcap.h presence... no
checking for pcap.h... no
The problem is that Nmap's configure script checks for
$MY_PCAP/include/pcap.h, when the file is really in $MY_PCAP/pcap.h. The
same problem would surface when linking, since the LDFLAGS are set to
-L$MY_PCAP/lib, and the libraries are also in the top-level directory.
This is true of the latest libpcap (1.5.2), the one that ships with Nmap
(1.2.1), and the source package for the one in Ubuntu 12.04 (1.1.1).
The fix, as I see it, is to alter configure.ac to remove the include/
and lib/ subdirectories for libpcap. I want to know how this may affect
others before I commit it, though, in case somebody's libpcap is
structured differently. An alternative would be to have separate
configure options for the include and lib directories.
Sent through the dev mailing list
Archived at http://seclists.org/nmap-dev/
- Can't build Nmap --with-libpcap=path/to/libpcap Daniel Miller (Dec 11)