ntop / PF_RING

High-speed packet processing framework
http://www.ntop.org
GNU Lesser General Public License v2.1
2.7k stars 349 forks source link

yum update breaks tcpdump #195

Closed zachsis closed 7 years ago

zachsis commented 7 years ago

We just did a yum update last night on a server with pf_ring zc installed. all of our pfring packages were updated in this process. tcpdump no longer works on this server.

system specs:

# uname -a
Linux vwsl-sec-ids01 3.10.0-514.10.2.el7.x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

 # cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 

 # rpm -qa | grep dkms
e1000e-zc-3.2.7.1.1167-dkms.noarch
pfring-dkms-6.5.0-1167.noarch
igb-zc-5.3.3.5.1167-dkms.noarch
dkms-2.3-1.20161202gitde1dca9.el7.noarch
ixgbe-zc-4.1.5.1167-dkms.noarch
pfring-drivers-zc-dkms-1.2-0.noarch
pfring-dkms-6.5.0-1167.noarch
pfring-6.5.0-1167.x86_64
i40e-zc-1.5.18.1167-1dkms.noarch
# cat /proc/net/pf_ring/info 
PF_RING Version          : 6.5.0 (dev:e15bf98939fdeff3d59882e68ff52265a63b0234)
Total rings              : 22

Standard (non ZC) Options
Ring slots               : 4096
Slot version             : 16
Capture TX               : Yes [RX+TX]
IP Defragment            : No
Socket Mode              : Standard
Cluster Fragment Queue   : 0
Cluster Fragment Discard : 0

error when running tcpdump:

# tcpdump -v tcpdump: error while loading shared libraries: libntapi.so: cannot open shared object file: No such file or directory

Recompile output: (v6.4.0-470-gd57f22f)

[root@ :PF_RING]# git describe --tags
v6.4.0-470-gd57f22f

# [root@ :PF_RING]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether the compiler supports the -ffloat-store option... yes
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking whether __attribute__((format)) can be applied to function pointers... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking rpc/rpcent.h usability... no
checking rpc/rpcent.h presence... no
checking for rpc/rpcent.h... no
checking netdnet/dnetdb.h usability... no
checking netdnet/dnetdb.h presence... no
checking for netdnet/dnetdb.h... no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking smi.h usability... no
checking smi.h presence... no
checking for smi.h... no
checking whether to enable the possibly-buggy SMB printer... yes
checking whether to drop root privileges by default... no
checking whether to chroot... no
checking for cap_enter... no
checking for cap_rights_limit... no
checking for cap_ioctls_limit... no
checking for openat... yes
checking whether to sandbox using capsicum... no
checking for library containing gethostbyname... none required
checking for library containing socket... none required
checking for library containing putmsg... none required
checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc
checking for dnet_htoa declaration in netdnet/dnetdb.h... no
checking for vfprintf... yes
checking for strlcat... no
checking for strlcpy... no
checking for strdup... yes
checking for strsep... yes
checking for getopt_long... yes
checking for fork... yes
checking for vfork... yes
checking for strftime... yes
checking for setlinebuf... yes
checking for alarm... yes
checking for vsnprintf... yes
checking for snprintf... yes
checking return type of signal handlers... void
checking for sigaction... yes
checking for library containing dnet_htoa... no
checking for main in -lrpc... no
checking for library containing getrpcbynumber... none required
checking for local pcap library... ../libpcap-1.7.4/libpcap.a
checking for pcap-config... ../libpcap-1.7.4/pcap-config
checking for ether_ntohost... no
checking for dlpi_walk in -ldlpi... no
checking for pcap_free_datalinks... no
checking for pcap_set_datalink... no
checking for pcap_breakloop... no
checking for pcap_create... no
checking for pcap_findalldevs... no
checking for pcap_dump_flush... no
checking for pcap_lib_version... no
checking for pcap_setdirection... no
checking for pcap_set_immediate_mode... no
checking whether pcap_version is defined by libpcap... no
checking for pcap_set_parser_debug... no
checking whether pcap_debug is defined by libpcap... no
checking whether yydebug is defined by libpcap... no
checking for pcap_set_optimizer_debug... no
checking for bpf_dump... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for inttypes.h... (cached) yes
checking whether inttypes.h defines the PRI[doxu]64 macros... yes
checking for pcap/bluetooth.h... yes
checking for pcap/nflog.h... yes
checking for pcap/usb.h... yes
checking for ranlib... ranlib
checking for ar... ar
checking if sockaddr struct has the sa_len member... no
checking if unaligned accesses fail... yes
checking whether to use OpenSSL/libressl libcrypto... yes, if available
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking for DES_cbc_encrypt in -lcrypto... no
checking whether to use libcap-ng... yes, if available
checking for capng_change_id in -lcap-ng... no
checking cap-ng.h usability... yes
checking cap-ng.h presence... yes
checking for cap-ng.h... yes
checking for a BSD-compatible install... /bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tcpdump.1
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands

[root@ :tcpdump-4.9.0]# make
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I../libpcap-1.7.4  -g -O2  -o tcpdump setsignal.o tcpdump.o version.o addrtoname.o addrtostr.o af.o ascii_strcasecmp.o checksum.o cpack.o gmpls.o gmt2local.o in_cksum.o ipproto.o l2vpn.o machdep.o nlpid.o oui.o parsenfsfh.o print.o print-802_11.o print-802_15_4.o print-ah.o print-ahcp.o print-aodv.o print-aoe.o print-ap1394.o print-arcnet.o print-arp.o print-ascii.o print-atalk.o print-atm.o print-babel.o print-beep.o print-bfd.o print-bgp.o print-bootp.o print-bt.o print-calm-fast.o print-carp.o print-cdp.o print-cfm.o print-chdlc.o print-cip.o print-cnfp.o print-dccp.o print-decnet.o print-dhcp6.o print-domain.o print-dtp.o print-dvmrp.o print-eap.o print-egp.o print-eigrp.o print-enc.o print-esp.o print-ether.o print-fddi.o print-forces.o print-fr.o print-frag6.o print-ftp.o print-geneve.o print-geonet.o print-gre.o print-hncp.o print-hsrp.o print-http.o print-icmp.o print-icmp6.o print-igmp.o print-igrp.o print-ip.o print-ip6.o print-ip6opts.o print-ipcomp.o print-ipfc.o print-ipnet.o print-ipx.o print-isakmp.o print-isoclns.o print-juniper.o print-krb.o print-l2tp.o print-lane.o print-ldp.o print-lisp.o print-llc.o print-lldp.o print-lmp.o print-loopback.o print-lspping.o print-lwapp.o print-lwres.o print-m3ua.o print-medsa.o print-mobile.o print-mobility.o print-mpcp.o print-mpls.o print-mptcp.o print-msdp.o print-msnlb.o print-nflog.o print-nfs.o print-nsh.o print-ntp.o print-null.o print-olsr.o print-openflow-1.0.o print-openflow.o print-ospf.o print-ospf6.o print-otv.o print-pgm.o print-pim.o print-pktap.o print-ppi.o print-ppp.o print-pppoe.o print-pptp.o print-radius.o print-raw.o print-resp.o print-rip.o print-ripng.o print-rpki-rtr.o print-rrcp.o print-rsvp.o print-rt6.o print-rtsp.o print-rx.o print-sctp.o print-sflow.o print-sip.o print-sl.o print-sll.o print-slow.o print-smtp.o print-snmp.o print-stp.o print-sunatm.o print-sunrpc.o print-symantec.o print-syslog.o print-tcp.o print-telnet.o print-tftp.o print-timed.o print-tipc.o print-token.o print-udld.o print-udp.o print-usb.o print-vjc.o print-vqp.o print-vrrp.o print-vtp.o print-vxlan.o print-vxlan-gpe.o print-wb.o print-zephyr.o print-zeromq.o netdissect.o signature.o strtoaddr.o util-print.o print-smb.o smbutil.o strlcat.o strlcpy.o bpf_dump.o ../libpcap-1.7.4/libpcap.a   -lrt -L/opt/napatech3/lib -lntapi -lntos     ../lib/libpfring.a -lpthread -lrt ../lib/libpfring.a -lpthread -lrt -lm `../lib/pfring_config --libs`
/bin/ld: cannot find -lntapi
/bin/ld: cannot find -lntos
collect2: error: ld returned 1 exit status
make: *** [tcpdump] Error 1

dev branch (v6.4.0-471-g6511eff) tcpdump compile output:


[root@ :tcpdump]# ./configure
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether the compiler supports the -ffloat-store option... yes
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking whether __attribute__((format)) can be applied to function pointers... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking rpc/rpcent.h usability... no
checking rpc/rpcent.h presence... no
checking for rpc/rpcent.h... no
checking netdnet/dnetdb.h usability... no
checking netdnet/dnetdb.h presence... no
checking for netdnet/dnetdb.h... no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking smi.h usability... no
checking smi.h presence... no
checking for smi.h... no
checking whether to enable the possibly-buggy SMB printer... yes
checking whether to drop root privileges by default... no
checking whether to chroot... no
checking for cap_enter... no
checking for cap_rights_limit... no
checking for cap_ioctls_limit... no
checking for openat... no
checking whether to sandbox using capsicum... no
checking for library containing gethostbyname... no
checking for gethostbyname in -lsocket... no
checking for library containing socket... no
checking for socket in -lsocket... no
checking for library containing putmsg... no
checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc
checking for dnet_htoa declaration in netdnet/dnetdb.h... no
checking for vfprintf... no
checking for strlcat... no
checking for strlcpy... no
checking for strdup... no
checking for strsep... no
checking for getopt_long... no
checking for fork... no
checking for vfork... no
checking for strftime... no
checking for setlinebuf... no
checking for alarm... no
checking for vsnprintf... no
checking for snprintf... no
checking return type of signal handlers... void
checking for sigaction... no
checking for sigset... no
checking for library containing dnet_htoa... no
checking for main in -lrpc... no
checking for library containing getrpcbynumber... no
checking for local pcap library... not found
checking for pcap-config... /usr/local/bin/pcap-config
checking for ether_ntohost... no
checking for dlpi_walk in -ldlpi... no
checking for pcap_free_datalinks... no
checking for pcap_set_datalink... no
checking for pcap_breakloop... no
checking for pcap_create... no
checking for pcap_findalldevs... no
checking for pcap_dump_flush... no
checking for pcap_lib_version... no
checking for pcap_setdirection... no
checking for pcap_set_immediate_mode... no
checking whether pcap_version is defined by libpcap... no
checking for pcap_set_parser_debug... no
checking whether pcap_debug is defined by libpcap... no
checking whether yydebug is defined by libpcap... no
checking for pcap_set_optimizer_debug... no
checking for bpf_dump... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for inttypes.h... (cached) yes
checking whether inttypes.h defines the PRI[doxu]64 macros... yes
checking for pcap/bluetooth.h... yes
checking for pcap/nflog.h... yes
checking for pcap/usb.h... yes
checking for ranlib... ranlib
checking for ar... ar
checking if sockaddr struct has the sa_len member... no
checking if unaligned accesses fail... yes
checking whether to use OpenSSL/libressl libcrypto... yes, if available
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking for DES_cbc_encrypt in -lcrypto... no
checking whether to use libcap-ng... yes, if available
checking for capng_change_id in -lcap-ng... no
checking cap-ng.h usability... yes
checking cap-ng.h presence... yes
checking for cap-ng.h... yes
checking for a BSD-compatible install... /bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tcpdump.1
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing default-1 commands

[root@ :tcpdump]# make
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./setsignal.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./tcpdump.c
In file included from /usr/include/string.h:633:0,
                 from ./tcpdump.c:89:
./netdissect.h:108:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strdup (const char *str);
              ^
./netdissect.h:112:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strsep(char **, const char *);
              ^
./netdissect.h:112:14: error: expected identifier or ‘(’ before ‘)’ token
 extern char *strsep(char **, const char *);
              ^
./interface.h:61:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strdup(const char *);
              ^
./interface.h:65:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strsep(char **, const char *);
              ^
./interface.h:65:14: error: expected identifier or ‘(’ before ‘)’ token
 extern char *strsep(char **, const char *);
              ^
make: *** [tcpdump.o] Error 1
[root@ :tcpdump]# cd ..
[root@ :userland]# git describe --tags
v6.4.0-471-g6511eff
cardigliano commented 7 years ago

@zachsis first of all let me understand what pf_ring version are you using, you have v 6.5.0 loaded, but it seems you are trying to compile tcpdump from v 6.4.0

zachsis commented 7 years ago

@cardigliano we installed from RPMs. I pulled the current repository to try to rebuild tcpdump. I apologize I am not aware of how to pull the 6.5.0 branch, i only see 6.4.1 as the latest stable, and dev as the most current branch. please advise. thanks!

cardigliano commented 7 years ago

Please do git clone https://github.com/ntop/PF_RING.git

zachsis commented 7 years ago
[root@ :~]# git clone https://github.com/ntop/PF_RING.git
Cloning into 'PF_RING'...
remote: Counting objects: 11243, done.
remote: Compressing objects: 100% (53/53), done.
remote: Total 11243 (delta 27), reused 0 (delta 0), pack-reused 11184
Receiving objects: 100% (11243/11243), 23.54 MiB | 7.51 MiB/s, done.
Resolving deltas: 100% (7554/7554), done.
[root@ :~]# cd PF_RING
[root@ :PF_RING]# git describe --tags
v6.4.0-472-g3ebc038

not sure what i'm doing wrong. git clone does not clone 6.5.0

zachsis commented 7 years ago

output after get clone https://github.com/ntop/PF_RING.git

[root@ :tcpdump]# ./configure 
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether the compiler supports the -ffloat-store option... yes
checking for inline... inline
checking for __attribute__... yes
checking whether __attribute__((unused)) can be used without warnings... yes
checking whether __attribute__((noreturn)) can be applied to function pointers without warnings... yes
checking whether __attribute__((format)) can be used without warnings... yes
checking whether __attribute__((format)) can be applied to function pointers... yes
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking rpc/rpc.h usability... yes
checking rpc/rpc.h presence... yes
checking for rpc/rpc.h... yes
checking rpc/rpcent.h usability... no
checking rpc/rpcent.h presence... no
checking for rpc/rpcent.h... no
checking netdnet/dnetdb.h usability... no
checking netdnet/dnetdb.h presence... no
checking for netdnet/dnetdb.h... no
checking for net/pfvar.h... no
checking for netinet/if_ether.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking smi.h usability... no
checking smi.h presence... no
checking for smi.h... no
checking whether to enable the possibly-buggy SMB printer... yes
checking whether to drop root privileges by default... no
checking whether to chroot... no
checking for cap_enter... no
checking for cap_rights_limit... no
checking for cap_ioctls_limit... no
checking for openat... no
checking whether to sandbox using capsicum... no
checking for library containing gethostbyname... no
checking for gethostbyname in -lsocket... no
checking for library containing socket... no
checking for socket in -lsocket... no
checking for library containing putmsg... no
checking whether the operating system supports IPv6... yes
checking ipv6 stack type... linux-glibc
checking for dnet_htoa declaration in netdnet/dnetdb.h... no
checking for vfprintf... no
checking for strlcat... no
checking for strlcpy... no
checking for strdup... no
checking for strsep... no
checking for getopt_long... no
checking for fork... no
checking for vfork... no
checking for strftime... no
checking for setlinebuf... no
checking for alarm... no
checking for vsnprintf... no
checking for snprintf... no
checking return type of signal handlers... void
checking for sigaction... no
checking for sigset... no
checking for library containing dnet_htoa... no
checking for main in -lrpc... no
checking for library containing getrpcbynumber... no
checking for local pcap library... not found
checking for pcap-config... /usr/local/bin/pcap-config
checking for ether_ntohost... no
checking for dlpi_walk in -ldlpi... no
checking for pcap_free_datalinks... no
checking for pcap_set_datalink... no
checking for pcap_breakloop... no
checking for pcap_create... no
checking for pcap_findalldevs... no
checking for pcap_dump_flush... no
checking for pcap_lib_version... no
checking for pcap_setdirection... no
checking for pcap_set_immediate_mode... no
checking whether pcap_version is defined by libpcap... no
checking for pcap_set_parser_debug... no
checking whether pcap_debug is defined by libpcap... no
checking whether yydebug is defined by libpcap... no
checking for pcap_set_optimizer_debug... no
checking for bpf_dump... no
checking for int8_t... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uintptr_t... yes
checking for u_int8_t... yes
checking for u_int16_t... yes
checking for u_int32_t... yes
checking for u_int64_t... yes
checking for inttypes.h... (cached) yes
checking whether inttypes.h defines the PRI[doxu]64 macros... yes
checking for pcap/bluetooth.h... yes
checking for pcap/nflog.h... yes
checking for pcap/usb.h... yes
checking for ranlib... ranlib
checking for ar... ar
checking if sockaddr struct has the sa_len member... no
checking if unaligned accesses fail... yes
checking whether to use OpenSSL/libressl libcrypto... yes, if available
checking openssl/crypto.h usability... yes
checking openssl/crypto.h presence... yes
checking for openssl/crypto.h... yes
checking for DES_cbc_encrypt in -lcrypto... no
checking whether to use libcap-ng... yes, if available
checking for capng_change_id in -lcap-ng... no
checking cap-ng.h usability... yes
checking cap-ng.h presence... yes
checking for cap-ng.h... yes
checking for a BSD-compatible install... /bin/install -c
configure: creating ./config.status
config.status: creating Makefile
config.status: creating tcpdump.1
config.status: creating config.h
config.status: executing default-1 commands
[root@vwsl-sec-ids01:tcpdump]# make
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./setsignal.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./tcpdump.c
In file included from /usr/include/string.h:633:0,
                 from ./tcpdump.c:89:
./netdissect.h:108:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strdup (const char *str);
              ^
./netdissect.h:112:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strsep(char **, const char *);
              ^
./netdissect.h:112:14: error: expected identifier or ‘(’ before ‘)’ token
 extern char *strsep(char **, const char *);
              ^
./interface.h:61:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strdup(const char *);
              ^
./interface.h:65:14: error: expected identifier or ‘(’ before ‘__extension__’
 extern char *strsep(char **, const char *);
              ^
./interface.h:65:14: error: expected identifier or ‘(’ before ‘)’ token
 extern char *strsep(char **, const char *);
              ^
make: *** [tcpdump.o] Error 1
cardigliano commented 7 years ago

What OS are you running? I think the configure is not coping correctly with your system configuration, please try manually appending to tcpdump/config.h the following lines:

define HAVE_STRSEP 1

define HAVE_STRDUP 1

zachsis commented 7 years ago

OS: [root@ :tcpdump]# cat /etc/redhat-release CentOS Linux release 7.3.1611 (Core)

made the change. closer but still the following errors:


[root@:tcpdump]# make
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./tcpdump.c
if grep GIT ./VERSION >/dev/null; then \
    read ver <./VERSION; \
    echo $ver | tr -d '\012'; \
    date +_%Y_%m_%d; \
else \
    cat ./VERSION; \
fi | sed -e 's/.*/const char version[] = "&";/' > version.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c version.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./addrtoname.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./addrtostr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./af.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./ascii_strcasecmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./checksum.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./cpack.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./gmpls.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./gmt2local.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./in_cksum.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./ipproto.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./l2vpn.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./machdep.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./nlpid.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./oui.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./parsenfsfh.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-802_11.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-802_15_4.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ah.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ahcp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-aodv.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-aoe.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ap1394.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-arcnet.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-arp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ascii.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-atalk.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-atm.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-babel.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-beep.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-bfd.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-bgp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-bootp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-bt.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-calm-fast.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-carp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-cdp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-cfm.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-chdlc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-cip.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-cnfp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-dccp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-decnet.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-dhcp6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-domain.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-dtp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-dvmrp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-eap.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-egp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-eigrp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-enc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-esp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ether.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-fddi.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-forces.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-fr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-frag6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ftp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-geneve.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-geonet.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-gre.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-hncp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-hsrp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-http.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-icmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-icmp6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-igmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-igrp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ip.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ip6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ip6opts.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ipcomp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ipfc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ipnet.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ipx.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-isakmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-isoclns.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-juniper.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-krb.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-l2tp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lane.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ldp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lisp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-llc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lldp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-loopback.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lspping.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lwapp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-lwres.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-m3ua.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-medsa.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-mobile.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-mobility.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-mpcp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-mpls.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-mptcp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-msdp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-msnlb.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-nflog.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-nfs.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-nsh.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ntp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-null.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-olsr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-openflow-1.0.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-openflow.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ospf.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ospf6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-otv.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-pgm.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-pim.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-pktap.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ppi.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ppp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-pppoe.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-pptp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-radius.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-raw.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-resp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rip.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-ripng.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rpki-rtr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rrcp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rsvp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rt6.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rtsp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-rx.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sctp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sflow.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sip.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sl.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sll.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-slow.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-smtp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-snmp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-stp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sunatm.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-sunrpc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-symantec.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-syslog.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-tcp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-telnet.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-tftp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-timed.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-tipc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-token.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-udld.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-udp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-usb.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vjc.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vqp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vrrp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vtp.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vxlan.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-vxlan-gpe.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-wb.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-zephyr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-zeromq.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./netdissect.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./signature.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./strtoaddr.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./util-print.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./print-smb.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./smbutil.c
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./vfprintf.c
In file included from ./netdissect.h:78:0,
                 from ./vfprintf.c:33:
./ip6.h:86:18: error: field ‘ip6_src’ has incomplete type
  struct in6_addr ip6_src; /* source address */
                  ^
./ip6.h:87:18: error: field ‘ip6_dst’ has incomplete type
  struct in6_addr ip6_dst; /* destination address */
                  ^
./ip6.h:114:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:121:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:128:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:173:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:187:18: error: array type has incomplete element type
  struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
                  ^
./ip6.h:188:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:196:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./vfprintf.c: In function ‘vfprintf’:
./vfprintf.c:41:8: error: argument ‘fmt’ doesn’t match prototype
  char *fmt;
        ^
In file included from ./vfprintf.c:28:0:
/usr/include/stdio.h:371:12: error: prototype declaration
 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
            ^
./vfprintf.c:46:8: error: ‘FILE’ has no member named ‘_flag’
  if ((f->_flag & _IOWRT) == 0) {
        ^
./vfprintf.c:46:18: error: ‘_IOWRT’ undeclared (first use in this function)
  if ((f->_flag & _IOWRT) == 0) {
                  ^
./vfprintf.c:46:18: note: each undeclared identifier is reported only once for each function it appears in
./vfprintf.c:47:8: error: ‘FILE’ has no member named ‘_flag’
   if (f->_flag & _IORW)
        ^
./vfprintf.c:47:18: error: ‘_IORW’ undeclared (first use in this function)
   if (f->_flag & _IORW)
                  ^
./vfprintf.c:48:5: error: ‘FILE’ has no member named ‘_flag’
    f->_flag |= _IOWRT;
     ^
make: *** [vfprintf.o] Error 1
cardigliano commented 7 years ago

Please provide your OS version and your tcpdump/config.h

zachsis commented 7 years ago
[root@ :tcpdump]# cat /etc/redhat-release 
CentOS Linux release 7.3.1611 (Core) 

[root@ :tcpdump]# cat config.h
/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.in by autoheader.  */

/* define if you want to build the possibly-buggy SMB printer */
#define ENABLE_SMB 1

/* Define to 1 if you have the `alarm' function. */
/* #undef HAVE_ALARM */

/* Define to 1 if you have the `bpf_dump' function. */
/* #undef HAVE_BPF_DUMP */

/* capsicum support available */
/* #undef HAVE_CAPSICUM */

/* Define to 1 if you have the `cap_enter' function. */
/* #undef HAVE_CAP_ENTER */

/* Define to 1 if you have the `cap_ioctls_limit' function. */
/* #undef HAVE_CAP_IOCTLS_LIMIT */

/* Define to 1 if you have the <cap-ng.h> header file. */
#define HAVE_CAP_NG_H 1

/* Define to 1 if you have the `cap_rights_limit' function. */
/* #undef HAVE_CAP_RIGHTS_LIMIT */

/* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
   don't. */
/* #undef HAVE_DECL_ETHER_NTOHOST */

/* define if you have the dnet_htoa function */
/* #undef HAVE_DNET_HTOA */

/* Define to 1 if you have the `ether_ntohost' function. */
/* #undef HAVE_ETHER_NTOHOST */

/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */
/* #undef HAVE_EVP_CIPHER_CTX_NEW */

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `fork' function. */
/* #undef HAVE_FORK */

/* Define to 1 if you have the `getopt_long' function. */
/* #undef HAVE_GETOPT_LONG */

/* define if you have getrpcbynumber() */
/* #undef HAVE_GETRPCBYNUMBER */

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `cap-ng' library (-lcap-ng). */
/* #undef HAVE_LIBCAP_NG */

/* Define to 1 if you have the `crypto' library (-lcrypto). */
/* #undef HAVE_LIBCRYPTO */

/* Define to 1 if you have the `rpc' library (-lrpc). */
/* #undef HAVE_LIBRPC */

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
/* #undef HAVE_NETDNET_DNETDB_H */

/* define if you have a dnet_htoa declaration in <netdnet/dnetdb.h> */
/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */

/* Define to 1 if you have the <netinet/ether.h> header file. */
/* #undef HAVE_NETINET_ETHER_H */

/* Define to 1 if you have the <netinet/if_ether.h> header file. */
#define HAVE_NETINET_IF_ETHER_H 1

/* Define to 1 if you have the <net/if_pflog.h> header file. */
/* #undef HAVE_NET_IF_PFLOG_H */

/* Define to 1 if you have the <net/pfvar.h> header file. */
/* #undef HAVE_NET_PFVAR_H */

/* Define to 1 if you have the `openat' function. */
/* #undef HAVE_OPENAT */

/* Define to 1 if you have the <openssl/evp.h> header file. */
/* #undef HAVE_OPENSSL_EVP_H */

/* define if the OS provides AF_INET6 and struct in6_addr */
#define HAVE_OS_IPV6_SUPPORT 1

/* if there's an os_proto.h for this platform, to use additional prototypes */
/* #undef HAVE_OS_PROTO_H */

/* Define to 1 if you have the <pcap/bluetooth.h> header file. */
#define HAVE_PCAP_BLUETOOTH_H 1

/* Define to 1 if you have the `pcap_breakloop' function. */
/* #undef HAVE_PCAP_BREAKLOOP */

/* Define to 1 if you have the `pcap_create' function. */
/* #undef HAVE_PCAP_CREATE */

/* define if libpcap has pcap_datalink_name_to_val() */
#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1

/* define if libpcap has pcap_datalink_val_to_description() */
#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1

/* define if libpcap has pcap_debug */
/* #undef HAVE_PCAP_DEBUG */

/* Define to 1 if you have the `pcap_dump_flush' function. */
/* #undef HAVE_PCAP_DUMP_FLUSH */

/* define if libpcap has pcap_dump_ftell() */
#define HAVE_PCAP_DUMP_FTELL 1

/* Define to 1 if you have the `pcap_findalldevs' function. */
/* #undef HAVE_PCAP_FINDALLDEVS */

/* Define to 1 if you have the `pcap_free_datalinks' function. */
/* #undef HAVE_PCAP_FREE_DATALINKS */

/* Define to 1 if the system has the type `pcap_if_t'. */
/* #undef HAVE_PCAP_IF_T */

/* Define to 1 if you have the `pcap_lib_version' function. */
/* #undef HAVE_PCAP_LIB_VERSION */

/* define if libpcap has pcap_list_datalinks() */
#define HAVE_PCAP_LIST_DATALINKS 1

/* Define to 1 if you have the <pcap/nflog.h> header file. */
#define HAVE_PCAP_NFLOG_H 1

/* Define to 1 if you have the `pcap_setdirection' function. */
/* #undef HAVE_PCAP_SETDIRECTION */

/* Define to 1 if you have the `pcap_set_datalink' function. */
/* #undef HAVE_PCAP_SET_DATALINK */

/* Define to 1 if you have the `pcap_set_immediate_mode' function. */
/* #undef HAVE_PCAP_SET_IMMEDIATE_MODE */

/* Define to 1 if you have the `pcap_set_optimizer_debug' function. */
/* #undef HAVE_PCAP_SET_OPTIMIZER_DEBUG */

/* Define to 1 if you have the `pcap_set_parser_debug' function. */
/* #undef HAVE_PCAP_SET_PARSER_DEBUG */

/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
/* #undef HAVE_PCAP_SET_TSTAMP_PRECISION */

/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
/* #undef HAVE_PCAP_SET_TSTAMP_TYPE */

/* Define to 1 if you have the <pcap/usb.h> header file. */
#define HAVE_PCAP_USB_H 1

/* define if libpcap has pcap_version */
/* #undef HAVE_PCAP_VERSION */

/* Define to 1 if you have the `pfopen' function. */
/* #undef HAVE_PFOPEN */

/* Define to 1 if you have the <rpc/rpcent.h> header file. */
/* #undef HAVE_RPC_RPCENT_H */

/* Define to 1 if you have the <rpc/rpc.h> header file. */
#define HAVE_RPC_RPC_H 1

/* Define to 1 if you have the `setlinebuf' function. */
/* #undef HAVE_SETLINEBUF */

/* Define to 1 if you have the `sigaction' function. */
/* #undef HAVE_SIGACTION */

/* Define to 1 if you have the `sigset' function. */
/* #undef HAVE_SIGSET */

/* Define to 1 if you have the `snprintf' function. */
/* #undef HAVE_SNPRINTF */

/* if struct sockaddr has the sa_len member */
/* #undef HAVE_SOCKADDR_SA_LEN */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strdup' function. */
/* #undef HAVE_STRDUP */

/* Define to 1 if you have the `strftime' function. */
/* #undef HAVE_STRFTIME */

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strlcat' function. */
/* #undef HAVE_STRLCAT */

/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */

/* Define to 1 if you have the `strsep' function. */
/* #undef HAVE_STRSEP */

/* Define to 1 if the system has the type `struct ether_addr'. */
/* #undef HAVE_STRUCT_ETHER_ADDR */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if the system has the type `uintptr_t'. */
#define HAVE_UINTPTR_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `vfork' function. */
/* #undef HAVE_VFORK */

/* Define to 1 if you have the `vfprintf' function. */
/* #undef HAVE_VFPRINTF */

/* Define to 1 if you have the `vsnprintf' function. */
/* #undef HAVE_VSNPRINTF */

/* define if libpcap has yydebug */
/* #undef HAVE_YYDEBUG */

/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1

/* if unaligned access fails */
#define LBL_ALIGN 1

/* Define to 1 if netinet/ether.h declares `ether_ntohost' */
/* #undef NETINET_ETHER_H_DECLARES_ETHER_NTOHOST */

/* Define to 1 if netinet/if_ether.h declares `ether_ntohost' */
/* #undef NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST */

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* define if the platform doesn't define PRId64 */
/* #undef PRId64 */

/* define if the platform doesn't define PRIo64 */
/* #undef PRIo64 */

/* define if the platform doesn't define PRIx64 */
/* #undef PRIu64 */

/* define if the platform doesn't define PRIu64 */
/* #undef PRIx64 */

/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void

/* return value of signal handlers */
#define RETSIGVAL /**/

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* define if you have ether_ntohost() and it works */
/* #undef USE_ETHER_NTOHOST */

/* Define if you enable support for libsmi */
/* #undef USE_LIBSMI */

/* define if should chroot when dropping privileges */
/* #undef WITH_CHROOT */

/* define if should drop privileges by default */
/* #undef WITH_USER */

/* get BSD semantics on Irix */
/* #undef _BSD_SIGNALS */

/* define on AIX to get certain functions */
/* #undef _SUN */

/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT32_T */

/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT64_T */

/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT8_T */

/* define if your compiler allows __attribute__((format)) without a warning */
#define __ATTRIBUTE___FORMAT_OK 1

/* define if your compiler allows __attribute__((format)) to be applied to
   function pointers */
#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1

/* define if your compiler allows __attribute__((noreturn)) to be applied to
   function pointers */
#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1

/* to handle Ultrix compilers that don't support const in prototypes */
/* #undef const */

/* Define as token for inline if inlining supported */
#define inline inline

/* Define to the type of a signed integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int16_t */

/* Define to the type of a signed integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int32_t */

/* Define to the type of a signed integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int64_t */

/* Define to the type of a signed integer type of width exactly 8 bits if such
   a type exists and the standard includes do not define it. */
/* #undef int8_t */

/* Define to `uint16_t' if u_int16_t not defined. */
/* #undef u_int16_t */

/* Define to `uint32_t' if u_int32_t not defined. */
/* #undef u_int32_t */

/* Define to `uint64_t' if u_int64_t not defined. */
/* #undef u_int64_t */

/* Define to `uint8_t' if u_int8_t not defined. */
/* #undef u_int8_t */

/* Define to the type of an unsigned integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint16_t */

/* Define to the type of an unsigned integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint32_t */

/* Define to the type of an unsigned integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint64_t */

/* Define to the type of an unsigned integer type of width exactly 8 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint8_t */

/* Define to the type of an unsigned integer type wide enough to hold a
   pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */

#define HAVE_STRSEP 1
#define HAVE_STRDUP 1
cardigliano commented 7 years ago

I have exactly the same OS/version and the compilation is working perfectly for me, this is strange. Please try commenting out #define HAVE_OS_IPV6_SUPPORT 1

zachsis commented 7 years ago

after commenting out #define HAVE_OS_IPV6_SUPPORT 1

[root@ :tcpdump]# make
gcc -ffloat-store -DHAVE_CONFIG_H   -D_U_="__attribute__((unused))" -DHAVE_PF_RING  -I. -I/usr/local/include  -g -O2 -c ./vfprintf.c
In file included from ./netdissect.h:78:0,
                 from ./vfprintf.c:33:
./ip6.h:86:18: error: field ‘ip6_src’ has incomplete type
  struct in6_addr ip6_src; /* source address */
                  ^
./ip6.h:87:18: error: field ‘ip6_dst’ has incomplete type
  struct in6_addr ip6_dst; /* destination address */
                  ^
./ip6.h:114:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:121:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:128:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:173:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:187:18: error: array type has incomplete element type
  struct in6_addr ip6r0_addr[1]; /* up to 23 addresses */
                  ^
./ip6.h:188:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./ip6.h:196:3: error: conflicting types for ‘UNALIGNED’
 } UNALIGNED;
   ^
./ip6.h:88:3: note: previous declaration of ‘UNALIGNED’ was here
 } UNALIGNED;
   ^
./vfprintf.c: In function ‘vfprintf’:
./vfprintf.c:41:8: error: argument ‘fmt’ doesn’t match prototype
  char *fmt;
        ^
In file included from ./vfprintf.c:28:0:
/usr/include/stdio.h:371:12: error: prototype declaration
 extern int vfprintf (FILE *__restrict __s, const char *__restrict __format,
            ^
./vfprintf.c:46:8: error: ‘FILE’ has no member named ‘_flag’
  if ((f->_flag & _IOWRT) == 0) {
        ^
./vfprintf.c:46:18: error: ‘_IOWRT’ undeclared (first use in this function)
  if ((f->_flag & _IOWRT) == 0) {
                  ^
./vfprintf.c:46:18: note: each undeclared identifier is reported only once for each function it appears in
./vfprintf.c:47:8: error: ‘FILE’ has no member named ‘_flag’
   if (f->_flag & _IORW)
        ^
./vfprintf.c:47:18: error: ‘_IORW’ undeclared (first use in this function)
   if (f->_flag & _IORW)
                  ^
./vfprintf.c:48:5: error: ‘FILE’ has no member named ‘_flag’
    f->_flag |= _IOWRT;
     ^
make: *** [vfprintf.o] Error 1
cardigliano commented 7 years ago

@zachsis I think that manually patching tcpdump is not the solution, the same code is compiling smoothly on a similar system, exact same version, that means there is some misconfiguration.. If you want you can try replacing your config.h with the below. Or you can try with the old tcpdump-4.7.4 (it's in the same folder).

/* config.h.  Generated from config.h.in by configure.  */
/* config.h.in.  Generated from configure.in by autoheader.  */

/* define if you want to build the possibly-buggy SMB printer */
#define ENABLE_SMB 1

/* Define to 1 if you have the `alarm' function. */
#define HAVE_ALARM 1

/* Define to 1 if you have the `bpf_dump' function. */
#define HAVE_BPF_DUMP 1

/* capsicum support available */
/* #undef HAVE_CAPSICUM */

/* Define to 1 if you have the `cap_enter' function. */
/* #undef HAVE_CAP_ENTER */

/* Define to 1 if you have the `cap_ioctls_limit' function. */
/* #undef HAVE_CAP_IOCTLS_LIMIT */

/* Define to 1 if you have the <cap-ng.h> header file. */
/* #undef HAVE_CAP_NG_H */

/* Define to 1 if you have the `cap_rights_limit' function. */
/* #undef HAVE_CAP_RIGHTS_LIMIT */

/* Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
   don't. */
#define HAVE_DECL_ETHER_NTOHOST 1

/* define if you have the dnet_htoa function */
/* #undef HAVE_DNET_HTOA */

/* Define to 1 if you have the `ether_ntohost' function. */
#define HAVE_ETHER_NTOHOST 1

/* Define to 1 if you have the `EVP_CIPHER_CTX_new' function. */
#define HAVE_EVP_CIPHER_CTX_NEW 1

/* Define to 1 if you have the <fcntl.h> header file. */
#define HAVE_FCNTL_H 1

/* Define to 1 if you have the `fork' function. */
#define HAVE_FORK 1

/* Define to 1 if you have the `getopt_long' function. */
#define HAVE_GETOPT_LONG 1

/* define if you have getrpcbynumber() */
#define HAVE_GETRPCBYNUMBER 1

/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1

/* Define to 1 if you have the `cap-ng' library (-lcap-ng). */
/* #undef HAVE_LIBCAP_NG */

/* Define to 1 if you have the `crypto' library (-lcrypto). */
#define HAVE_LIBCRYPTO 1

/* Define to 1 if you have the `rpc' library (-lrpc). */
/* #undef HAVE_LIBRPC */

/* Define to 1 if you have the <memory.h> header file. */
#define HAVE_MEMORY_H 1

/* Define to 1 if you have the <netdnet/dnetdb.h> header file. */
/* #undef HAVE_NETDNET_DNETDB_H */

/* define if you have a dnet_htoa declaration in <netdnet/dnetdb.h> */
/* #undef HAVE_NETDNET_DNETDB_H_DNET_HTOA */

/* Define to 1 if you have the <netinet/ether.h> header file. */
#define HAVE_NETINET_ETHER_H 1

/* Define to 1 if you have the <netinet/if_ether.h> header file. */
#define HAVE_NETINET_IF_ETHER_H 1

/* Define to 1 if you have the <net/if_pflog.h> header file. */
/* #undef HAVE_NET_IF_PFLOG_H */

/* Define to 1 if you have the <net/pfvar.h> header file. */
/* #undef HAVE_NET_PFVAR_H */

/* Define to 1 if you have the `openat' function. */
#define HAVE_OPENAT 1

/* Define to 1 if you have the <openssl/evp.h> header file. */
#define HAVE_OPENSSL_EVP_H 1

/* define if the OS provides AF_INET6 and struct in6_addr */
#define HAVE_OS_IPV6_SUPPORT 1

/* if there's an os_proto.h for this platform, to use additional prototypes */
/* #undef HAVE_OS_PROTO_H */

/* Define to 1 if you have the <pcap/bluetooth.h> header file. */
#define HAVE_PCAP_BLUETOOTH_H 1

/* Define to 1 if you have the `pcap_breakloop' function. */
#define HAVE_PCAP_BREAKLOOP 1

/* Define to 1 if you have the `pcap_create' function. */
#define HAVE_PCAP_CREATE 1

/* define if libpcap has pcap_datalink_name_to_val() */
#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1

/* define if libpcap has pcap_datalink_val_to_description() */
#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1

/* define if libpcap has pcap_debug */
/* #undef HAVE_PCAP_DEBUG */

/* Define to 1 if you have the `pcap_dump_flush' function. */
#define HAVE_PCAP_DUMP_FLUSH 1

/* define if libpcap has pcap_dump_ftell() */
#define HAVE_PCAP_DUMP_FTELL 1

/* Define to 1 if you have the `pcap_findalldevs' function. */
#define HAVE_PCAP_FINDALLDEVS 1

/* Define to 1 if you have the `pcap_free_datalinks' function. */
#define HAVE_PCAP_FREE_DATALINKS 1

/* Define to 1 if the system has the type `pcap_if_t'. */
#define HAVE_PCAP_IF_T 1

/* Define to 1 if you have the `pcap_lib_version' function. */
#define HAVE_PCAP_LIB_VERSION 1

/* define if libpcap has pcap_list_datalinks() */
#define HAVE_PCAP_LIST_DATALINKS 1

/* Define to 1 if you have the <pcap/nflog.h> header file. */
#define HAVE_PCAP_NFLOG_H 1

/* Define to 1 if you have the `pcap_setdirection' function. */
#define HAVE_PCAP_SETDIRECTION 1

/* Define to 1 if you have the `pcap_set_datalink' function. */
#define HAVE_PCAP_SET_DATALINK 1

/* Define to 1 if you have the `pcap_set_immediate_mode' function. */
#define HAVE_PCAP_SET_IMMEDIATE_MODE 1

/* Define to 1 if you have the `pcap_set_optimizer_debug' function. */
/* #undef HAVE_PCAP_SET_OPTIMIZER_DEBUG */

/* Define to 1 if you have the `pcap_set_parser_debug' function. */
/* #undef HAVE_PCAP_SET_PARSER_DEBUG */

/* Define to 1 if you have the `pcap_set_tstamp_precision' function. */
#define HAVE_PCAP_SET_TSTAMP_PRECISION 1

/* Define to 1 if you have the `pcap_set_tstamp_type' function. */
#define HAVE_PCAP_SET_TSTAMP_TYPE 1

/* Define to 1 if you have the <pcap/usb.h> header file. */
#define HAVE_PCAP_USB_H 1

/* define if libpcap has pcap_version */
/* #undef HAVE_PCAP_VERSION */

/* Define to 1 if you have the `pfopen' function. */
/* #undef HAVE_PFOPEN */

/* Define to 1 if you have the <rpc/rpcent.h> header file. */
/* #undef HAVE_RPC_RPCENT_H */

/* Define to 1 if you have the <rpc/rpc.h> header file. */
#define HAVE_RPC_RPC_H 1

/* Define to 1 if you have the `setlinebuf' function. */
#define HAVE_SETLINEBUF 1

/* Define to 1 if you have the `sigaction' function. */
#define HAVE_SIGACTION 1

/* Define to 1 if you have the `sigset' function. */
/* #undef HAVE_SIGSET */

/* Define to 1 if you have the `snprintf' function. */
#define HAVE_SNPRINTF 1

/* if struct sockaddr has the sa_len member */
/* #undef HAVE_SOCKADDR_SA_LEN */

/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1

/* Define to 1 if you have the <stdlib.h> header file. */
#define HAVE_STDLIB_H 1

/* Define to 1 if you have the `strdup' function. */
#define HAVE_STRDUP 1

/* Define to 1 if you have the `strftime' function. */
#define HAVE_STRFTIME 1

/* Define to 1 if you have the <strings.h> header file. */
#define HAVE_STRINGS_H 1

/* Define to 1 if you have the <string.h> header file. */
#define HAVE_STRING_H 1

/* Define to 1 if you have the `strlcat' function. */
/* #undef HAVE_STRLCAT */

/* Define to 1 if you have the `strlcpy' function. */
/* #undef HAVE_STRLCPY */

/* Define to 1 if you have the `strsep' function. */
#define HAVE_STRSEP 1

/* Define to 1 if the system has the type `struct ether_addr'. */
/* #undef HAVE_STRUCT_ETHER_ADDR */

/* Define to 1 if you have the <sys/stat.h> header file. */
#define HAVE_SYS_STAT_H 1

/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1

/* Define to 1 if the system has the type `uintptr_t'. */
#define HAVE_UINTPTR_T 1

/* Define to 1 if you have the <unistd.h> header file. */
#define HAVE_UNISTD_H 1

/* Define to 1 if you have the `vfork' function. */
#define HAVE_VFORK 1

/* Define to 1 if you have the `vfprintf' function. */
#define HAVE_VFPRINTF 1

/* Define to 1 if you have the `vsnprintf' function. */
#define HAVE_VSNPRINTF 1

/* define if libpcap has yydebug */
/* #undef HAVE_YYDEBUG */

/* define if your compiler has __attribute__ */
#define HAVE___ATTRIBUTE__ 1

/* if unaligned access fails */
/* #undef LBL_ALIGN */

/* Define to 1 if netinet/ether.h declares `ether_ntohost' */
#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST /**/

/* Define to 1 if netinet/if_ether.h declares `ether_ntohost' */
/* #undef NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST */

/* Define to the address where bug reports for this package should be sent. */
#define PACKAGE_BUGREPORT ""

/* Define to the full name of this package. */
#define PACKAGE_NAME ""

/* Define to the full name and version of this package. */
#define PACKAGE_STRING ""

/* Define to the one symbol short name of this package. */
#define PACKAGE_TARNAME ""

/* Define to the home page for this package. */
#define PACKAGE_URL ""

/* Define to the version of this package. */
#define PACKAGE_VERSION ""

/* define if the platform doesn't define PRId64 */
/* #undef PRId64 */

/* define if the platform doesn't define PRIo64 */
/* #undef PRIo64 */

/* define if the platform doesn't define PRIx64 */
/* #undef PRIu64 */

/* define if the platform doesn't define PRIu64 */
/* #undef PRIx64 */

/* Define as the return type of signal handlers (`int' or `void'). */
#define RETSIGTYPE void

/* return value of signal handlers */
#define RETSIGVAL /**/

/* Define to 1 if you have the ANSI C header files. */
#define STDC_HEADERS 1

/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#define TIME_WITH_SYS_TIME 1

/* define if you have ether_ntohost() and it works */
#define USE_ETHER_NTOHOST 1

/* Define if you enable support for libsmi */
/* #undef USE_LIBSMI */

/* define if should chroot when dropping privileges */
/* #undef WITH_CHROOT */

/* define if should drop privileges by default */
/* #undef WITH_USER */

/* get BSD semantics on Irix */
/* #undef _BSD_SIGNALS */

/* define on AIX to get certain functions */
/* #undef _SUN */

/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT32_T */

/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT64_T */

/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
   <pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the
   #define below would cause a syntax error. */
/* #undef _UINT8_T */

/* define if your compiler allows __attribute__((format)) without a warning */
#define __ATTRIBUTE___FORMAT_OK 1

/* define if your compiler allows __attribute__((format)) to be applied to
   function pointers */
#define __ATTRIBUTE___FORMAT_OK_FOR_FUNCTION_POINTERS 1

/* define if your compiler allows __attribute__((noreturn)) to be applied to
   function pointers */
#define __ATTRIBUTE___NORETURN_OK_FOR_FUNCTION_POINTERS 1

/* to handle Ultrix compilers that don't support const in prototypes */
/* #undef const */

/* Define as token for inline if inlining supported */
#define inline inline

/* Define to the type of a signed integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int16_t */

/* Define to the type of a signed integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int32_t */

/* Define to the type of a signed integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef int64_t */

/* Define to the type of a signed integer type of width exactly 8 bits if such
   a type exists and the standard includes do not define it. */
/* #undef int8_t */

/* Define to `uint16_t' if u_int16_t not defined. */
/* #undef u_int16_t */

/* Define to `uint32_t' if u_int32_t not defined. */
/* #undef u_int32_t */

/* Define to `uint64_t' if u_int64_t not defined. */
/* #undef u_int64_t */

/* Define to `uint8_t' if u_int8_t not defined. */
/* #undef u_int8_t */

/* Define to the type of an unsigned integer type of width exactly 16 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint16_t */

/* Define to the type of an unsigned integer type of width exactly 32 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint32_t */

/* Define to the type of an unsigned integer type of width exactly 64 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint64_t */

/* Define to the type of an unsigned integer type of width exactly 8 bits if
   such a type exists and the standard includes do not define it. */
/* #undef uint8_t */

/* Define to the type of an unsigned integer type wide enough to hold a
   pointer, if such a type exists, and if the system does not define it. */
/* #undef uintptr_t */
zachsis commented 7 years ago

I apologize I was being an idiot lol. I didn't ./configure and make in the userland directory. I assumed that everything was there that was needed because we installed from RPM.