Nmap Development mailing list archives

Re: FTBFS on OpenBSD 5.5


From: Jacek Wielemborek <d33tah () gmail com>
Date: Tue, 10 Jun 2014 15:23:25 +0200

10.06.2014 10:31, Henri Doreau:
2014-06-08 16:13 GMT+02:00 Jacek Wielemborek <d33tah () gmail com>:
Hi,

Inspired by GeorgeNickleford from #nmap IRC channel, I decided to
try to build Nmap under latest OpenBSD. I pulled the latest SVN
sources, tried to build them... and here's what I got:

gcc -c -I/home/root/nmap-6.46/nbase -DHAVE_CONFIG_H -
DNSOCK_VERSION=\"0.02\" -D_FORTIFY_SOURCE=2 -I../include -g -O2 -
Wall   nsock_pcap.c -o nsock_pcap.o
nsock_pcap.c: In function 'do_actual_pcap_read':
nsock_pcap.c:399: error: incompatible types in assignment
Makefile:48: recipe for target 'nsock_pcap.o' failed
gmake[1]: *** [nsock_pcap.o] Error 1
gmake[1]: Leaving directory '/home/root/nmap-6.46/nsock/src'
Makefile:139: recipe for target 'nsock_build' failed
gmake: *** [nsock_build] Error 2
*** Error 2 in /home/root/nmap-6.46 (BSDmakefile:5 'USE_GNU')

I heard that there's also "netutil.cc:3825: error: aggregate
'iovec iov' has incomplete type and cannot be defined" error
there, related to lack of #include <sys/uio.h>.

Yours,
Jacek Wielemborek

Hello,

thanks for the report. The incompatible types seem to be structs
bpf_timeval and timeval. Have you tried compiling with
--with-libpcap=included (gmake distclean first)?

Regards


No, but now that I tried it, this particular problem went away. Now I
can replicate the following:

Compiling libnetutil
cd libnetutil && gmake
gmake[1]: Entering directory '/home/root/nmap-6.46/libnetutil'
g++ -c -I../liblinear -I../liblua -I../libdnet-stripped/include
-I../libpcre  -I../libpcap -I../nbase -I../nsock/include -DHAVE_CONFIG_H
-D_FORTIFY_SOURCE=2 -g -O2 -Wall -fno-strict-aliasing netutil.cc -o
netutil.o
netutil.cc: In function 'int send_ipv6_ip(const sockaddr_in6*, const
unsigned char*, size_t)':
netutil.cc:3841: error: aggregate 'iovec iov' has incomplete type and
cannot be defined
Makefile:37: recipe for target 'netutil.o' failed
gmake[1]: *** [netutil.o] Error 1
gmake[1]: Leaving directory '/home/root/nmap-6.46/libnetutil'
Makefile:143: recipe for target 'netutil_build' failed
gmake: *** [netutil_build] Error 2

After adding #include <sys/uio.h> to netutil.cc, it compiles fine.

Attachment: signature.asc
Description: OpenPGP digital signature

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

Current thread: