Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 157308

Summary: can't compile (link) ethereal 0.10.11 with gcc-3.4: undefined reference to `.LC770'
Product: [Fedora] Fedora Reporter: Jeff Morriss <jeff.morriss>
Component: gccAssignee: Jakub Jelinek <jakub>
Status: CLOSED ERRATA QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: 3CC: guy, rvokal, sundaram
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
URL: http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=156
Whiteboard:
Fixed In Version: 3.4.4-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2005-09-05 08:46:42 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 164808    
Attachments:
Description Flags
packet-diameter.c run through the preprocessor (added "-E" to gcc command line) none

Description Jeff Morriss 2005-05-10 14:30:23 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.3) Gecko/20040910

Description of problem:
I (and several others) are not able to compile (actually link) the current version of Ethereal (0.10.11) using an up-to-date FC3 system.  This was filed as Ethereal bug #156:

http://bugs.ethereal.com/bugzilla/show_bug.cgi?id=156

Some analysis by people there has us believing that this is a compiler bug (see below or the Ethereal bug for more details).

I am putting this as a "High" severity bug since it was originally considered a "blocker" bug for Ethereal (until it was thought to be a compiler bug with a workaround).  That and compiler bugs scare me.  Feel free to downgrade if you feel it appropriate.

Version-Release number of selected component (if applicable):
gcc-3.4.3-22.fc3

How reproducible:
Always

Steps to Reproduce:
1. download the ethereal-0.10.11 source or the FC3 SRPM
2. ./configure --without-ucd-snmp (or ./configure --with-ssl)
3. make
(2 & 3 can be replaced with "rpmbuild -ba")


Actual Results:  Linking failed with this error:

/bin/sh ./libtool --mode=link --tag=CC gcc  -DINET6 -D_U_="__attribute__((unused))" -Wall -W  -g -O2 -I/usr/local/include -DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/include/freetype2 -I/usr/include/freetype2/config -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include     -L/usr/local/lib -L/usr/local/lib -o mergecap  mergecap.o merge.o wiretap/libwiretap.la -Wl,--export-dynamic -lgmodule-2.0 -ldl -lglib-2.0   -lz 
epan/.libs/libethereal.so: undefined reference to `.LC771'
epan/.libs/libethereal.so: undefined reference to `.LC770'
epan/.libs/libethereal.so: undefined reference to `.LC772'
collect2: ld returned 1 exit status
make[2]: *** [ethereal] Error 1


Expected Results:  Binary should have been created.

Additional info:

NOTE that if I use "gcc32" (gcc32-3.2.3-6) (by doing "CC=gcc32 ./configure --without-ucd-snmp") instead of "gcc" Ethereal compiles/links just fine (thus supporting the hypothesis that this is a 'gcc' problem not an Ethereal problem).

NOTE that someone found another "workaround" for this problem: eliminating having the same string constant in 2 .o files, see:

http://www.ethereal.com/lists/ethereal-dev/200505/msg00069.html

NOTE that I experienced the same problem attempting to build the ethereal-0.10.11 SRPM released by FC3 (I had been hoping someone had patched something before generating that SRPM but now I think that maybe the machine used to build the binary RPM isn't at the latest (released) compiler version?).

Comment 1 Jakub Jelinek 2005-05-10 15:13:42 UTC
Please find out from which *.o file the undefined .LC770 etc. references are
(nm -u) and then attach here preprocessed source for that file and
GCC command line used to compile it.

Comment 2 Jeff Morriss 2005-05-11 09:55:16 UTC
Created attachment 114239 [details]
packet-diameter.c run through the preprocessor (added "-E" to gcc command line)

(In reply to comment #1)
> Please find out from which *.o file the undefined .LC770 etc. references are
> (nm -u) and then attach here preprocessed source for that file and
> GCC command line used to compile it.

The references appear to come from "packet-diameter.o":

mozart [~/Projects/ethereal/source/epan/dissectors/]> nm -u
.libs/packet-diameter.o|egrep LC77[0-2]
	 U .LC770
	 U .LC771
	 U .LC772

which was compiled (via libtool) thus:

if /bin/sh ../../libtool --mode=compile --tag=CC gcc -DHAVE_CONFIG_H -I. -I.
-I../.. -I./../.. -I./..  -I/usr/local/include	 -DINET6
-D_U_="__attribute__((unused))" -Wall -W  -g -O2 -I/usr/local/include
-DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include    -MT packet-diameter.lo -MD -MP -MF
".deps/packet-diameter.Tpo" -c -o packet-diameter.lo packet-diameter.c; \
then mv -f ".deps/packet-diameter.Tpo" ".deps/packet-diameter.Plo"; else rm -f
".deps/packet-diameter.Tpo"; exit 1; fi
 gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../.. -I./.. -I/usr/local/include
-DINET6 "-D_U_=__attribute__((unused))" -Wall -W -g -O2 -I/usr/local/include
-DXTHREADS -D_REENTRANT -DXUSE_MTSAFE_API -pthread -I/usr/include/gtk-2.0
-I/usr/lib/gtk-2.0/include -I/usr/X11R6/include -I/usr/include/atk-1.0
-I/usr/include/pango-1.0 -I/usr/include/freetype2
-I/usr/include/freetype2/config -I/usr/include/glib-2.0
-I/usr/lib/glib-2.0/include -MT packet-diameter.lo -MD -MP -MF
.deps/packet-diameter.Tpo -c packet-diameter.c	-fPIC -DPIC -o
.libs/packet-diameter.o
packet-diameter.c: In function `dissect_avps':
packet-diameter.c:1853: warning: comparison between signed and unsigned
packet-diameter.c: In function `proto_register_diameter':
packet-diameter.c:2165: warning: dereferencing type-punned pointer will break
strict-aliasing rules

Comment 4 Jakub Jelinek 2005-05-16 14:09:24 UTC
Or http://gcc.gnu.org/ml/gcc-patches/2005-05/msg01541.html

Comment 5 Jakub Jelinek 2005-05-17 07:44:47 UTC
In rawhide, this is fixed in gcc-4.0.0-6.

Comment 6 Jakub Jelinek 2005-07-25 14:03:11 UTC
Should be fixed in gcc-3.4.4-2{,.fc3}.