After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 153726 - [PATCH] Fix build with -fno-common
[PATCH] Fix build with -fno-common
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other Linux
: Normal trivial
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2004-09-25 14:40 UTC by Heikki Tauriainen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: 2.7/2.8


Attachments
Add an extern specifier to the declaration of `parser_state' in `gcalctool/ce_parser.y' (373 bytes, patch)
2004-09-25 14:42 UTC, Heikki Tauriainen
none Details | Review

Description Heikki Tauriainen 2004-09-25 14:40:42 UTC
Building gcalctool 5.5.5 fails when using the -fno-common option for gcc (3.3.4)
because of multiple definitions of objects (not permitted according to a strict
interpretation of the C standard). This also breaks compilation with some
optimization switches (-fdata-sections, similar to bug 136872).

The exact error message is as follows:

gcc -fno-common -Wall -o gcalctool calctool.o display.o dsfuns.o get.o
functions.o graphics.o mp.o mpmath.o parser.o gtk.o ce_parser.o lr_parser.o
syntax_translation.o -Wl,--export-dynamic -Wl,--export-dynamic -pthread
-Wl,--export-dynamic -pthread  -L/opt/garnome/lib -L/usr/X11R6/lib
/opt/garnome/lib/libgnomeui-2.so /opt/garnome/lib/libgnome-keyring.so
/usr/lib/libjpeg.so /opt/garnome/lib/libbonoboui-2.so -lSM -lICE -lX11
/opt/garnome/lib/libgnomecanvas-2.so /opt/garnome/lib/libgnome-2.so
/opt/garnome/lib/libesd.so /opt/garnome/lib/libaudiofile.so
/opt/garnome/lib/libart_lgpl_2.so /opt/garnome/lib/libpangoft2-1.0.so
/opt/garnome/lib/libgtk-x11-2.0.so /opt/garnome/lib/libgdk-x11-2.0.so
/opt/garnome/lib/libatk-1.0.so /opt/garnome/lib/libgdk_pixbuf-2.0.so
/opt/garnome/lib/libpangoxft-1.0.so /opt/garnome/lib/libpangox-1.0.so
/opt/garnome/lib/libpango-1.0.so /opt/garnome/lib/libgnomevfs-2.so
/opt/garnome/lib/libbonobo-2.so /opt/garnome/lib/libxml2.so -lz -lssl -lcrypto
/opt/garnome/lib/libhowl.so -lresolv -lrt
/opt/garnome/lib/libbonobo-activation.so /opt/garnome/lib/libORBitCosNaming-2.so
/opt/garnome/lib/libgconf-2.so /opt/garnome/lib/libORBit-2.so
/usr/lib/libpopt.so /opt/garnome/lib/libgobject-2.0.so -lm
/opt/garnome/lib/libgmodule-2.0.so -ldl /opt/garnome/lib/libgthread-2.0.so
-lpthread /opt/garnome/lib/libglib-2.0.so libparser.a -Wl,--rpath
-Wl,/opt/garnome/lib -Wl,--rpath -Wl,/opt/garnome/lib
libparser.a(ce_parser.tab.o)(.bss+0x0): multiple definition of `parser_state'
parser.o(.bss+0x0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [gcalctool] Error 1
make[2]: Leaving directory `/tmp/gcalctool-5.5.5/gcalctool'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gcalctool-5.5.5'
make: *** [all] Error 2

It looks like there is an `extern' specifier missing in the declaration of
`parser_state' in `gcalctool/ce_parser.y'.
Comment 1 Heikki Tauriainen 2004-09-25 14:42:50 UTC
Created attachment 31934 [details] [review]
Add an extern specifier to the declaration of `parser_state' in `gcalctool/ce_parser.y'
Comment 2 Rich Burridge 2004-09-27 15:21:55 UTC
Fix checked into CVS. I've bumped the version number
in configure.in to 5.5.6, but haven't created a new
tarbal yet (want to fix a few more things first). Thanks!