Nmap Development mailing list archives
Re: fix to build nmap on some OpenBSD archs
From: David Fifield <david () bamsoftware com>
Date: Tue, 3 Aug 2010 08:56:33 -0600
On Tue, Aug 03, 2010 at 09:37:41AM +0200, Sebastian Reitenbach wrote:
On Tuesday 03 August 2010 01:02:53 am David Fifield wrote:Nmap is compiled with the following configure parameters: --with-libpcap=included \ --with-openssl=/usr \ --with-libdnet=/usr/local \ --with-liblua=/usr/local \ --with-libpcre=/usr/local \ --with-mandir=/usr/local/man \ --disable-nls I exchanged the --with-libpcap=/usr with --with-libpcap=included and tried to rebuild it but ran into the following error: ===> Building for nmap-5.21 Makefile:341: makefile.dep: No such file or directory c++ -MM -I/usr/include/lua -I/usr/local/include -I/usr/local/include - I/usr/local/include -I/usr/local/include -I/usr/include -Ilibpcap -Inbase - Insock/include main.cc nmap.cc targets.cc tcpip.cc nmap_error.cc utils.cc idle_scan.cc osscan.cc osscan2.cc output.cc payload.cc scan_engine.cc timing.cc charpool.cc services.cc protocols.cc nmap_rpc.cc portlist.cc NmapOps.cc TargetGroup.cc Target.cc FingerPrintResults.cc service_scan.cc NmapOutputTable.cc MACLookup.cc nmap_tty.cc nmap_dns.cc traceroute.cc portreasons.cc nse_main.cc nse_nsock.cc nse_fs.cc nse_nmaplib.cc nse_debug.cc nse_pcrelib.cc nse_binlib.cc nse_bit.cc nse_openssl.cc nse_ssl_cert.cc > makefile.dep gmake: *** No rule to make target `libpcap/Makefile', needed by `pcap_build'. Stop.For this, please try doing a "gmake distclean" before configuring with --with-pcap=included.I did ran a make clean && make distclean between. I just checked out nmap from svn, without any patches, and retried it on i386 on a OpenBSD -current, about a month old. I had the following environment set: CFLAGS=-I/usr/local/include CPPFLAGS=-I/usr/local/include CXXFLAGS=-I/usr/local/include LDFLAGS=-I/usr/local/lib and ran configure with the following parameters: ./configure -with-libpcap=included --with-openssl=/usr --with- libdnet=/usr/local --with-liblua=/usr/local --with-libpcre=/usr/local --with- mandir=/usr/local/man --disable-nls and with: ./configure -with-libpcap=/usr --with-openssl=/usr --with-libdnet=/usr/local --with-liblua=/usr/local --with-libpcre=/usr/local --with- mandir=/usr/local/man --disable-nls In both cases it ended here: gmake[1]: Entering directory `/tmp/nmap/libnetutil' Makefile:41: makefile.dep: No such file or directory g++ -MM -I/usr/include/lua -I/usr/local/include -I/usr/local/include - I/usr/local/include -I/usr/local/include -I/usr/include -I../libpcap - I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 ./netutil.ccmakefile.depgmake[1]: Leaving directory `/tmp/nmap/libnetutil' gmake[1]: Entering directory `/tmp/nmap/libnetutil' g++ -c -I/usr/include/lua -I/usr/local/include -I/usr/local/include - I/usr/local/include -I/usr/local/include -I/usr/include -I../libpcap - I../nbase -I../nsock/include -DHAVE_CONFIG_H -D_FORTIFY_SOURCE=2 - I/usr/local/include -Wall -fno-strict-aliasing netutil.cc -o netutil.o netutil.cc: In function 'const char* ippackethdrinfo(const u8*, u32, int)': netutil.cc:2530: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2530: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2530: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2530: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2531: error: invalid use of void expression netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2534: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2535: error: invalid use of void expression netutil.cc:2538: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2538: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2538: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2538: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2539: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2539: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2539: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2539: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2540: error: invalid use of void expression netutil.cc:2684: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2684: error: invalid use of incomplete type 'struct sctp_hdr' netutil.cc:2111: error: forward declaration of 'struct sctp_hdr' netutil.cc:2684: error: invalid use of void expression gmake[1]: *** [netutil.o] Error 1 gmake[1]: Leaving directory `/tmp/nmap/libnetutil' gmake: *** [netutil_build] Error 2
This is certainly because of --with-libdnet=/usr/local. You need to use --with-libdnet=included (the default) or install a more recent libdnet in /usr/local.
When using --with-libpcap=/usr I saw the following in the configure output: checking for pcap.h... yes checking for pcap_datalink in -lpcap... yes checking if libpcap version is recent enough... no configure: creating ./config.status config.status: creating Makefile I guess its then falling back to the internal libpcap?
Yes, I think so. 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:
- fix to build nmap on some OpenBSD archs Sebastian Reitenbach (Jul 08)
- Re: fix to build nmap on some OpenBSD archs David Fifield (Jul 28)
- Re: fix to build nmap on some OpenBSD archs Sebastian Reitenbach (Jul 28)
- Re: fix to build nmap on some OpenBSD archs Sebastian Reitenbach (Jul 29)
- Re: fix to build nmap on some OpenBSD archs David Fifield (Aug 02)
- Re: fix to build nmap on some OpenBSD archs Sebastian Reitenbach (Aug 03)
- Re: fix to build nmap on some OpenBSD archs David Fifield (Aug 03)
- Re: fix to build nmap on some OpenBSD archs David Fifield (Jul 28)