tcpdump.o(.text+0x3f2): In function `main': : undefined reference to `pcap_debug' collect2: ld returned 1 exit status make: *** [tcpdump] Error 1 !!! ERROR: net-analyzer/tcpdump-3.8.1 failed. !!! Function src_compile, Line 23, Exitcode 2 !!! (no error message) I just emerged latest libpcap (after fixing tar...) Reproducible: Always Steps to Reproduce: 1. 2. 3.
Identical problem here. (Including tar fix, then libpcap.)
same here
The problem seems to come from #define HAVE_PCAP_DEBUG 1 in config.h Looks like there is a problem in the configure script.
same problem here. :(
This fails on ~sparc as well as ~x86. Does this actually work for anyone?
Works if you compile libpcap with --enable-yydebug. Was this ebuild actually tested?
x86 people, try reducing CFLAGS just to -O2 if it's -O3, that seems to fix it. now to test the same on sparc....
I can confirm that baking -O3 to -O2 works. It compiles, installs and functions fine.
Created attachment 23188 [details, diff] Compile fix for x86 & sparc at least
Fixed in CVS, thanks!
As of this morning, I still get this: tcpdump.o(.text+0x409): In function `main': : undefined reference to `pcap_debug' collect2: ld returned 1 exit status make: *** [tcpdump] Error 1 !!! ERROR: net-analyzer/tcpdump-3.8.1 failed. !!! Function src_compile, Line 27, Exitcode 2 !!! (no error message) Remerging libpcap didn't help either. Note that I am using -O2 to start with. Portage 2.0.49-r20 (default-x86-1.4, gcc-3.3.2, glibc-2.3.3_pre20031222-r0, 2.6.0) ================================================================= System uname: 2.6.0 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz Gentoo Base System version 1.4.3.12 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-march=pentium3 -mcpu=pentium4 -O2 -fstack-protector -finline-functions -falign-jumps=5 -falign-loops=5 -falign-functions=64 -pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3/share/config /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/ /var/qmail/alias /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=pentium3 -mcpu=pentium4 -O2 -fstack-protector -finline-functions -falign-jumps=5 -falign-loops=5 -falign-functions=64 -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs ccache nostrip sandbox" GENTOO_MIRRORS="ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://distro.ibiblio.org/gentoo http://gentoo.chem.wisc.edu/gentoo http://gentoo.oregonstate.edu " MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.us.gentoo.org/gentoo-portage" USE="X alsa apm arts avi berkdb bonobo cdr crypt cups encode esd foomaticdb gdbm gif gnome gpm gtk gtk2 gtkhtml guile i8x0 imlib innodb java jpeg kde kerberos ldap libg++ libwww mad mikmod motif mozilla mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdflib perl png python qt quicktime readline samba sdl slang spell sse ssl tcltk tcpd tetex tktcl truetype x86 xml2 xmms xv zlib"
tcpdump-3.8.1 on x86 is still hosed; this bug should be reopened.
It turns out -finline-functions is causing the build to fail. I guess this shouldn't be a surprise, since other people reported that -O3 caused problems, and -O3 turns on -finline-functions. The ebuild can be fixed as follows: --- tcpdump-3.8.1.ebuild 2004-01-15 09:37:48.000000000 -0500 +++ tcpdump-3.8.1-r1.ebuild 2004-02-11 09:26:35.146081000 -0500 @@ -22,6 +22,7 @@ src_compile() { replace-flags -O[3-9] -O2 + filter-flags -finline-functions econf `use_with ssl crypto` `use_enable ipv6` || die make CCOPT="$CFLAGS" || die
I am getting this identical error: ---------------------------------- tcpdump.o(.text+0x636): In function `main': : undefined reference to `pcap_debug' tcpdump.o(.text+0x63a): In function `main': : undefined reference to `pcap_debug' collect2: ld returned 1 exit status make: *** [tcpdump] Error 1 With these gcc flags: --------------------- gcc -O2 -mcpu=7400 -maltivec -mabi=altivec -pipe -fomit-frame-pointer gcc -O2 -mcpu=7450 -maltivec -mabi=altivec -pipe -fomit-frame-pointer gcc -O2 -pipe -mcpu=750 On: --- Linux 2.6.7-gentoo-r7 ppc 7457, altivec supported PowerBook5,2 GNU/Linux The only abnormal things I see in compile output are: ----------------------------------------------------- In file included from print-atm.c:41: atmuni31.h:38:1: warning: "PPC" redefined <built-in>:60:1: warning: this is the location of the previous definition ... In file included from print-sunatm.c:54: atmuni31.h:38:1: warning: "PPC" redefined <built-in>:60:1: warning: this is the location of the previous definition Anybody have any suggestions or thoughts? Can I provide any more output for input?
Same problem here, also PPC... Linux 2.6.7-gentoo-r6 #2 Sat Jul 3 16:18:54 EDT 2004 ppc 750FX PowerBook4,3 GNU/Linux CFLAGS="-O3 -mcpu=750 -pipe" tcpdump.o(.text+0x636): In function `main': : undefined reference to `pcap_debug' tcpdump.o(.text+0x63a): In function `main': : undefined reference to `pcap_debug' collect2: ld returned 1 exit status make: *** [tcpdump] Error 1 !!! ERROR: net-analyzer/tcpdump-3.8.3-r1 failed. !!! Function src_compile, Line 27, Exitcode 2 !!! (no error message)
works with -O1 on ppc ie # emerge CFLAGS="-O1 -mcpu=750 -pipe" emerge tcpdump
Does 3.8.3-r1 also suffer from this?
All three versions I have behave the same 3.8.1, 3.8.3, and 3.8.3-r1.
Reassigning to ppc for ppc related bugs.
Removing sparc that solved this some time ago...
last version fixed it on ppc, tested with O2 and O3 and using the 2004.2 toolchain. greetings