Nmap Development mailing list archives

Re: 5.30BETA1 cross-compile regression


From: David Fifield <david () bamsoftware com>
Date: Fri, 23 Jul 2010 11:40:52 -0600

On Sat, Jul 17, 2010 at 04:05:52PM +0100, Nuno Gonçalves wrote:
2010/7/17 David Fifield <david () bamsoftware com>:
I think this will work in version 5.35DC1. Please give that a try. The
issue here was the addition of Nping. It implemented its own libpcap
check that didn't support cross-compiling. Now that code is shared
between Nmap and Nping.

There are some remaining:

./configure --target=mips-openwrt-linux --host=mips-openwrt-linux
--build=x86_64-linux-gnu --program-prefix="" --program-suffix=""
--prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
--libexecdir=/usr/lib --sysconfdir=/etc --datadir=/usr/share
--localstatedir=/var --mandir=/usr/man --infodir=/usr/info
--disable-nls   --without-zenmap
--with-openssl="/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr"
--with-liblua="/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr"
--with-libdnet="/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr"
--with-libpcap="/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr"
--with-libpcre="/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr"
 ; fi; )
configure: loading site script
/home/nuno/Desktop/openwrt2/trunk/include/site/mips-openwrt-linux-uclibc
checking whether NLS is requested... no
checking build system type... x86_64-pc-linux-gnu
checking host system type... mips-openwrt-linux-gnu
checking for mips-openwrt-linux-gcc... mips-openwrt-linux-uclibc-gcc
...
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lua/lua.h usability... no
checking lua/lua.h presence... no
checking for lua/lua.h... no
checking lua5.1/lua.h usability... no
checking lua5.1/lua.h presence... no
checking for lua5.1/lua.h... no
checking for lua version >= 501... configure: error: in
`/home/nuno/Desktop/openwrt2/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/nmap-5.35DC1':
configure: error: cannot run test program while cross compiling
See `config.log' for more details.

If I replace --with-openssl="$(STAGING_DIR)/usr", by
--without-openssl, then it configures until the end, but I still get
more erros during compile:

That's strange. Given the error, I would have expected that you would
have to use --without-liblua, not --without-openssl. But if it works,
that's good.

cd libnetutil && make
make[4]: Entering directory
`/home/nuno/Desktop/openwrt2/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/nmap-5.35DC1/libnetutil'
Makefile:41: makefile.dep: No such file or directory
mips-openwrt-linux-uclibc-g++ -MM -DNOLUA
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include/uClibc++
-I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2
./netutil.cc > makefile.dep
make[4]: Leaving directory
`/home/nuno/Desktop/openwrt2/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/nmap-5.35DC1/libnetutil'
make[4]: Entering directory
`/home/nuno/Desktop/openwrt2/trunk/build_dir/target-mips_r2_uClibc-0.9.30.1/nmap-5.35DC1/libnetutil'
mips-openwrt-linux-uclibc-g++ -c -DNOLUA
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/usr/include
-I/home/nuno/Desktop/openwrt2/trunk/staging_dir/toolchain-mips_r2_gcc-4.3.3+cs_uClibc-0.9.30.1/include
 -I/home/nuno/Desktop/openwrt2/trunk/staging_dir/target-mips_r2_uClibc-0.9.30.1/usr/include/uClibc++
-I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 -Os
-pipe -mips32r2 -mtune=mips32r2 -funit-at-a-time -fhonour-copts
-msoft-float  -fno-builtin -fno-rtti -nostdinc++ -Wall
-fno-strict-aliasing netutil.cc -o netutil.o
netutil.cc: In function 'const char* ippackethdrinfo(const u8*, u32, int)':
netutil.cc:2527: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2527: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2531: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2531: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2531: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2535: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2535: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2536: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2536: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'
netutil.cc:2681: error: invalid use of incomplete type 'struct sctp_hdr'
netutil.cc:2108: error: forward declaration of 'struct sctp_hdr'

This looks like the libdnet you are including with --with-libdnet is too
old. You need to use Nmap's version to get SCTP support. See if
--with-libdnet=included works.

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

Current thread: