Nmap Development mailing list archives
nmap 7.92 build fails on Fedora 34
From: "ndof () gmx li" <ndof () gmx li>
Date: Fri, 5 Nov 2021 12:04:58 +0100
Hi developers,
building nmap on Fedora 33 works, but fails on Fedora 34 with:
make[1]: Leaving directory '/builddir/build/BUILD/nmap-7.92/libnetutil'
netutil.cc: In function 'const void* icmpv6_get_data(const icmpv6_hdr*,
unsigned int*)':
netutil.cc:756:13: error: invalid use of incomplete type 'const struct
icmpv6_hdr'
756 | if (icmpv6->icmpv6_type == ICMPV6_TIMEXCEED ||
icmpv6->icmpv6_type == ICMPV6_UNREACH)
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc:756:30: error: 'ICMPV6_TIMEXCEED' was not declared in this
scope; did you mean 'ICMP_TIMEXCEED'?
756 | if (icmpv6->icmpv6_type == ICMPV6_TIMEXCEED ||
icmpv6->icmpv6_type == ICMPV6_UNREACH)
| ^~~~~~~~~~~~~~~~
| ICMP_TIMEXCEED
netutil.cc:756:56: error: invalid use of incomplete type 'const struct
icmpv6_hdr'
756 | if (icmpv6->icmpv6_type == ICMPV6_TIMEXCEED ||
icmpv6->icmpv6_type == ICMPV6_UNREACH)
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc:756:73: error: 'ICMPV6_UNREACH' was not declared in this
scope; did you mean 'ICMP_UNREACH'?
756 | if (icmpv6->icmpv6_type == ICMPV6_TIMEXCEED ||
icmpv6->icmpv6_type == ICMPV6_UNREACH)
|
^~~~~~~~~~~~~~
|
ICMP_UNREACH
netutil.cc:759:85: error: invalid use of incomplete type 'const struct
icmpv6_hdr'
759 | netutil_fatal("%s passed ICMPv6 packet with unhandled type
%d", __func__, icmpv6->icmpv6_type);
|
^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc: In function 'int collect_dnet_interfaces(const intf_entry*,
void*)':
netutil.cc:1348:52: error: 'const struct intf_entry' has no member named
'intf_index'; did you mean 'intf_len'?
1348 | dcrn->ifaces[dcrn->numifaces].ifindex = entry->intf_index;
| ^~~~~~~~~~
| intf_len
netutil.cc: In function 'int collect_dnet_routes(const route_entry*,
void*)':
netutil.cc:1649:49: error: 'const struct route_entry' has no member
named 'metric'
1649 | dcrn->routes[dcrn->numroutes].metric = entry->metric;
| ^~~~~~
netutil.cc:1650:68: error: 'const struct route_entry' has no member
named 'intf_name'
1650 | dcrn->routes[dcrn->numroutes].device =
getInterfaceByName(entry->intf_name,
dcrn->routes[dcrn->numroutes].dest.ss_family);
|
^~~~~~~~~
netutil.cc: In function 'const char* ippackethdrinfo(const u8*, u32, int)':
netutil.cc:2968:19: error: invalid application of 'sizeof' to incomplete
type 'icmpv6_hdr'
2968 | if (datalen > sizeof(struct icmpv6_hdr)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~~
netutil.cc:2974:17: error: invalid use of incomplete type 'const struct
icmpv6_hdr'
2974 | icmpv6->icmpv6_type, icmpv6->icmpv6_code, ipinfo);
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc:2974:38: error: invalid use of incomplete type 'const struct
icmpv6_hdr'
2974 | icmpv6->icmpv6_type, icmpv6->icmpv6_code, ipinfo);
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc: In function 'bool accept_ns(const unsigned char*, const
pcap_pkthdr*, int, size_t)':
netutil.cc:4357:45: error: 'ICMPV6_HDR_LEN' was not declared in this
scope; did you mean 'ICMP_HDR_LEN'?
4357 | if (head->caplen < offset + IP6_HDR_LEN + ICMPV6_HDR_LEN)
| ^~~~~~~~~~~~~~
| ICMP_HDR_LEN
netutil.cc:4361:22: error: invalid use of incomplete type 'struct
icmpv6_hdr'
4361 | return icmp6_header->icmpv6_type ==
ICMPV6_NEIGHBOR_ADVERTISEMENT &&
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc:4361:39: error: 'ICMPV6_NEIGHBOR_ADVERTISEMENT' was not
declared in this scope
4361 | return icmp6_header->icmpv6_type ==
ICMPV6_NEIGHBOR_ADVERTISEMENT &&
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
netutil.cc:4362:17: error: invalid use of incomplete type 'struct
icmpv6_hdr'
4362 | icmp6_header->icmpv6_code == 0;
| ^~
In file included from netutil.cc:124:
netutil.h:195:42: note: forward declaration of 'struct icmpv6_hdr'
195 | const void *icmpv6_get_data(const struct icmpv6_hdr *icmpv6,
unsigned int *len);
| ^~~~~~~~~~
netutil.cc: In function 'int read_ns_reply_pcap(pcap_t*, u8*,
sockaddr_in6*, long int, timeval*, bool*, void (*)(int, const u8*, u32,
timeval*))':
netutil.cc:4389:60: error: 'ICMPV6_HDR_LEN' was not declared in this
scope; did you mean 'ICMP_HDR_LEN'?
4389 | na = (struct icmpv6_msg_nd *)(p + offset + IP6_HDR_LEN +
ICMPV6_HDR_LEN);
|
^~~~~~~~~~~~~~
|
ICMP_HDR_LEN
netutil.cc:4390:51: error: invalid application of 'sizeof' to incomplete
type 'read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int,
timeval*, bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4390 | if (head->caplen >= ((unsigned char *)na - p) + sizeof(struct
icmpv6_msg_nd) &&
|
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
netutil.cc:4391:7: error: invalid use of incomplete type 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4391 | na->icmpv6_option_type == 2 &&
| ^~
netutil.cc:4383:10: note: forward declaration of 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4383 | struct icmpv6_msg_nd *na;
| ^~~~~~~~~~~~~
netutil.cc:4392:7: error: invalid use of incomplete type 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4392 | na->icmpv6_option_length == 1) {
| ^~
netutil.cc:4383:10: note: forward declaration of 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4383 | struct icmpv6_msg_nd *na;
| ^~~~~~~~~~~~~
netutil.cc:4394:26: error: invalid use of incomplete type 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4394 | memcpy(sendermac, &na->icmpv6_mac, 6);
| ^~
netutil.cc:4383:10: note: forward declaration of 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4383 | struct icmpv6_msg_nd *na;
| ^~~~~~~~~~~~~
netutil.cc:4400:43: error: invalid use of incomplete type 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4400 | memcpy(&senderIP->sin6_addr.s6_addr, &na->icmpv6_target, 16);
| ^~
netutil.cc:4383:10: note: forward declaration of 'struct
read_ns_reply_pcap(pcap_t*, u8*, sockaddr_in6*, long int, timeval*,
bool*, void (*)(int, const u8*, u32, timeval*))::icmpv6_msg_nd'
4383 | struct icmpv6_msg_nd *na;
| ^~~~~~~~~~~~~
netutil.cc: In function 'bool doND(const char*, const u8*, const
sockaddr_storage*, const sockaddr_storage*, u8*, void (*)(int, const
u8*, u32, timeval*))':
netutil.cc:4432:40: error: 'ICMPV6_HDR_LEN' was not declared in this
scope; did you mean 'ICMP_HDR_LEN'?
4432 | u8 frame[ETH_HDR_LEN + IP6_HDR_LEN + ICMPV6_HDR_LEN + 4 + 16
+ 8];
| ^~~~~~~~~~~~~~
| ICMP_HDR_LEN
netutil.cc:4473:28: error: 'ICMPV6_NEIGHBOR_ADVERTISEMENT' was not
declared in this scope
4473 | IPPROTO_ICMPV6, ICMPV6_NEIGHBOR_ADVERTISEMENT);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/dnet.h:14,
from netutil.h:79,
from netutil.cc:124:
netutil.cc:4480:16: error: 'frame' was not declared in this scope
4480 | eth_pack_hdr(frame, *ns_dst_mac, *srcmac, ETH_TYPE_IPV6);
| ^~~~~
In file included from /usr/include/dnet.h:16,
from netutil.h:79,
from netutil.cc:124:
netutil.cc:4481:16: error: 'frame' was not declared in this scope
4481 | ip6_pack_hdr(frame + ETH_HDR_LEN, 0, 0, 32, 0x3a, 255,
*src_sin6->sin6_addr.s6_addr, *ns_dst_ip6.sin6_addr.s6_addr);
| ^~~~~
netutil.cc:4482:26: error: 'frame' was not declared in this scope
4482 | icmpv6_pack_hdr_ns_mac(frame + ETH_HDR_LEN + IP6_HDR_LEN,
target_sin6->sin6_addr.s6_addr, *srcmac);
| ^~~~~
netutil.cc:4482:3: error: 'icmpv6_pack_hdr_ns_mac' was not declared in
this scope; did you mean 'icmp_pack_hdr_mask'?
4482 | icmpv6_pack_hdr_ns_mac(frame + ETH_HDR_LEN + IP6_HDR_LEN,
target_sin6->sin6_addr.s6_addr, *srcmac);
| ^~~~~~~~~~~~~~~~~~~~~~
| icmp_pack_hdr_mask
make[1]: *** [Makefile:37: netutil.o] Error 1
make: *** [Makefile:160: build-netutil] Error 2
make: *** Waiting for unfinished jobs....
I think, Fedora 34 comes with an newer libdnet then Fedora 33.
Fedora 33 use version 1.12 and Fedora 34 version 1.14
_______________________________________________
Sent through the dev mailing list
https://nmap.org/mailman/listinfo/dev
Archived at http://seclists.org/nmap-dev/
Current thread:
- nmap 7.92 build fails on Fedora 34 ndof () gmx li (Nov 24)
