Nmap Development mailing list archives

Re: [PATCH] configure: fix external libcap cross-compile


From: David Fifield <david () bamsoftware com>
Date: Wed, 17 Jun 2009 10:08:36 -0600

On Tue, May 26, 2009 at 08:10:55PM -0400, Mike Frysinger wrote:
If cross-compiling nmap against an external libpcap, the configure will
always fail with no way around it:

checking pcap.h usability... yes
checking pcap.h presence... yes
checking for pcap.h... yes
checking for pcap_datalink in -lpcap... yes
checking if libpcap version is recent enough... configure: error: cannot run test program while cross compiling
See `config.log' for more details.

Same thing happens in the ncat/ subdir which isn't surprising as both seem
to use the same libpcap configure code.

If people are cross-compiling, then let's just assume their system doesn't
suck.  If it does, then it'll fail for other reasons anyways, so ...

Thanks, I applied this in r13795 to /nmap-exp/dev/nmap. Is this the only
barrier to cross-compiling you encountered?

For anyone not sure what this is about, the problem was that the
configure script checks the libpcap version by compiling a little
program and running it (AC_TRY_RUN macro). You can't do that when
cross-compiling, so Mike filled in the third argument of AC_TRY_RUN,
which is the default value to use when cross-compiling.

David Fifield

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


Current thread: