When tcpslice tries to link with libpcap that was built with dependencies on libnl, libusb or libdbus, the linking fails because tcpslice does not use pcap-config --libs --static to tell any extra libraries (as tcpdump does):
gcc -O2 -DHAVE_CONFIG_H -D_U_="__attribute__((unused))" -I. -I./../libpcap -o tcpslice tcpslice.o gmt2local.o gwtm2secs.o machdep.o search.o sessions.o util.o version.o strlcpy.o ./../libpcap/libpcap.a
./../libpcap/libpcap.a(pcap-linux.o): In function `nl80211_cleanup':
/home/denis/libpcap/./pcap-linux.c:673: undefined reference to `genl_family_put'
[...]
./../libpcap/libpcap.a(pcap-canusb-linux.o): In function `canusb_close':
/home/denis/libpcap/./pcap-canusb-linux.c:329: undefined reference to `pthread_join'
/home/denis/libpcap/./pcap-canusb-linux.c:333: undefined reference to `libusb_close'
[...]
./../libpcap/libpcap.a(pcap-dbus.o): In function `dbus_write':
/home/denis/libpcap/./pcap-dbus.c:114: undefined reference to `dbus_message_demarshal'
[...]
collect2: error: ld returned 1 exit status
Makefile:92: recipe for target 'tcpslice' failed
make: *** [tcpslice] Error 1
This is a low-priority issue but whoever would be willing to work on it should consider moving tcpslice-specific source files (gwrm2secs.c, search.c, sessions.c, tcpslice.c, util.c, version.c and vfprintf.c) into the tcpdump repository to avoid duplicate maintenance work in future.
When tcpslice tries to link with libpcap that was built with dependencies on libnl, libusb or libdbus, the linking fails because tcpslice does not use
pcap-config --libs --static
to tell any extra libraries (as tcpdump does):This is a low-priority issue but whoever would be willing to work on it should consider moving tcpslice-specific source files (
gwrm2secs.c
,search.c
,sessions.c
,tcpslice.c
,util.c
,version.c
andvfprintf.c
) into the tcpdump repository to avoid duplicate maintenance work in future.