Good time.
In case libpcap (current git) was built on system with libnl installed,
tcpreplay fails to build with the following error:
libtool: link: gcc -I../libopts -I.. -I/usr/include -DTCPREPLAY
"-D_U_=__attribute__((unused))" -Wall -O3 -std=gnu99 -Wextra
-Wno-variadic-macros -Wfatal-errors -I/usr/include -o tcpreplay
tcpreplay-tcpreplay_opts.o tcpreplay-send_packets.o tcpreplay-signal_handler.o
tcpreplay-tcpreplay.o tcpreplay-sleep.o ./common/libcommon.a ../lib/libstrl.a
/usr/lib/libpcap.a -L/usr/lib /usr/lib/libdnet.so ../libopts/.libs/libopts.a
-lrt -lnsl
/usr/lib/libpcap.a(pcap.o): In function `pcap_datalink_val_to_name':
(.text+0x290): multiple definition of `pcap_datalink_val_to_name'
./common/libcommon.a(fakepcap.o):fakepcap.c:(.text+0x20): first defined here
/usr/lib/libpcap.a(pcap.o): In function `pcap_datalink_val_to_description':
(.text+0x2e0): multiple definition of `pcap_datalink_val_to_description'
./common/libcommon.a(fakepcap.o):fakepcap.c:(.text+0x0): first defined here
/usr/lib/libpcap.a(pcap-linux.o): In function `nl80211_init':
(.text+0x73f): undefined reference to `nl_handle_alloc'
(take a look on bugs.gentoo.org/274813 for full build output, and
theor.ran.gpi.ru/tcpreplay-config.log for config.log)
This is cased because linking with libpcap requires -lnl and this check
is missed in configure script. Since libnl does not have static version
(at least libnl developers don't provides us with such build option in
the latest release) I'm unsure how to fix this problem correctly. In
Gentoo we use --enable-shared switch so we could detect if libnl is
required for linking with libpcap. Probably just by modifying the
following code
if test $dynamic_link = yes; then
if test -f "${testdir}/lib64/libpcap${shrext_cmds}" ; then
LPCAPLIB="-L${testdir}/lib64 -lpcap"
elif test -f "${testdir}/lib/libpcap${shrext_cmds}" ; then
LPCAPLIB="-L${testdir}/lib -lpcap"
else
AC_ERROR([Unable to find libpcap in ${testdir}])
fi
with something like
AC_SEARCH_LIBS(pcap_close,pcap,
LPCAPLIB="$LIBS"
,AC_ERROR([Unable to find libpcap in ${testdir}])
,-lnl)
but I'm unsure how good such solution is. Any suggestions how to fix
this problem correctly are welcome.
Another problem I've encountered is that distribution specifies
ACLOCAL_AMFLAGS = -I m4
while there is no m4 directory and thus autoreconf fails. Probably
ACLOCAL_AMFLAGS = -I libopts/m4
was assumed there.
And last, I have not filled this bug report in trac since I'm unable to
register there. It failed with the following error:
Trac detected an internal error:
URLError: <urlopen error (2, 'Temporary failure in name resolution')>
Thank you in advance for your time,
--
Peter.
------------------------------------------------------------------------------
Are you an open source citizen? Join us for the Open Source Bridge conference!
Portland, OR, June 17-19. Two days of sessions, one day of unconference: $250.
Need another reason to go? 24-hour hacker lounge. Register today!
http://ad.doubleclick.net/clk;215844324;13503038;v?http://opensourcebridge.org
_______________________________________________
Tcpreplay-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tcpreplay-users
Support Information: http://tcpreplay.synfin.net/trac/wiki/Support