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 136872 - Build fails when compiling with the option -fdata-sections for gcc
Build fails when compiling with the option -fdata-sections for gcc
Status: RESOLVED FIXED
Product: gnome-calculator
Classification: Core
Component: general
unspecified
Other other
: Normal normal
: ---
Assigned To: Rich Burridge
Rich Burridge
Depends on:
Blocks:
 
 
Reported: 2004-03-11 10:29 UTC by Heikki Tauriainen
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix for the problem. (1.85 KB, text/plain)
2004-03-28 22:58 UTC, Rich Burridge
Details

Description Heikki Tauriainen 2004-03-11 10:29:10 UTC
Distribution: Debian testing/unstable
Package: gcalctool
Severity: minor
Version: GNOME2.5.91 unspecified
Gnome-Distributor: GARNOME
Synopsis: Build fails when compiling with the option -fdata-sections for gcc
Bugzilla-Product: gcalctool
Bugzilla-Component: general
Bugzilla-Version: unspecified
Description:
gcalctool 4.3.48 does not build successfully on gcc 3.3.3 (Debian
GNU/Linux testing/i686) when compiling with the option -fdata-sections.
Using this option causes a linker error due to multiply defined
symbols.
 
Steps to reproduce the problem:
1. Run the configure script with the argument `CFLAGS=-fdata-sections'.
2. Run make.
 
Actual Results:
The compilation fails with the following output:

gcc -fdata-sections -Wall -o gcalctool calctool.o display.o dsfuns.o
get.o functions.o graphics.o mp.o gtk.o -Wl,--export-dynamic -pthread
-Wl,--export-dynamic -pthread -Wl,--export-dynamic  -L/opt/garnome/lib
-L/usr/X11R6/lib -ldl -ldl -lm -lm -ldl -ldl -ldl
/opt/garnome/lib/libgnomeui-2.so -lm -ldl
/opt/garnome/lib/libgnome-keyring.so /usr/lib/libjpeg.so -lSM -lICE -lSM
-lICE /opt/garnome/lib/libbonoboui-2.so /opt/garnome/lib/libXcursor.so
/opt/garnome/lib/libXrender.so -lm -ldl -lSM -lICE -lm
/opt/garnome/lib/libgnomecanvas-2.so -lm -ldl
/opt/garnome/lib/libgnome-2.so -ldl /opt/garnome/lib/libesd.so
/opt/garnome/lib/libaudiofile.so -lm /opt/garnome/lib/libart_lgpl_2.so
-lm /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 -ldl
/opt/garnome/lib/libgdk_pixbuf-2.0.so -ldl -lm
/opt/garnome/lib/libpangoxft-1.0.so /opt/garnome/lib/libpangox-1.0.so
/opt/garnome/lib/libpango-1.0.so -ldl -lm -ldl -lm -ldl
/opt/garnome/lib/libgnomevfs-2.so /opt/garnome/lib/libbonobo-2.so
/opt/garnome/lib/libxml2.so -lz -lm -lssl -lcrypto -ldl -lrt
/opt/garnome/lib/libbonobo-activation.so
/opt/garnome/lib/libORBitCosNaming-2.so -lm -ldl -ldl -lm -ldl -ldl
/opt/garnome/lib/libgconf-2.so -lm -ldl /opt/garnome/lib/libORBit-2.so
-ldl /usr/lib/libpopt.so /opt/garnome/lib/libgobject-2.0.so
/opt/garnome/lib/libgthread-2.0.so -lpthread -lm
/opt/garnome/lib/libgmodule-2.0.so -ldl -ldl
/opt/garnome/lib/libglib-2.0.so -lSM -lICE -lX11 -Wl,--rpath
-Wl,/opt/garnome/lib -Wl,--rpath -Wl,/opt/garnome/lib
display.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
get.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
functions.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
graphics.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
mp.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
gtk.o(.bss.CalcVars+0x0): multiple definition of `CalcVars'
calctool.o(.bss.CalcVars+0x0): first defined here
collect2: ld returned 1 exit status
make[2]: *** [gcalctool] Error 1
make[2]: Leaving directory `/tmp/gcalctool-4.3.48/gcalctool'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/gcalctool-4.3.48'
make: *** [all-recursive-am] Error 2

Additional Information:
`CalcVars' is defined in the header file `gcalctool/calctool.h'.
Changing this definition to an extern declaration and moving the actual
definition out of the header allows the build to complete successfully
after first running `make clean' in the `gcalctool' subdirectory.




------- Bug moved to this database by unknown@bugzilla.gnome.org 2004-03-11 05:29 -------

The original reporter (heikki.tauriainen@hut.fi) of this bug does not have an account here.
Reassigning to the exporter, unknown@bugzilla.gnome.org.
Reassigning to the default owner of the component, rich.burridge@sun.com.

Comment 1 Rich Burridge 2004-03-11 15:45:49 UTC
Fair enough. I'll look at adjusting this in the GNOME 2.7/8
timeframe.
Comment 2 Rich Burridge 2004-03-28 22:58:16 UTC
Created attachment 26035 [details]
Fix for the problem.
Comment 3 Rich Burridge 2004-03-28 23:01:01 UTC
Changes checked into CVS HEAD. Bumped the gcalctool
version number in configure.in to 4.0.0 (yes the first
fix for the GNOME 2.7/2.8 series.