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 692810 - [GTK+2] Fails to build with the gold linker due to missing reference to gmodule-2.0
[GTK+2] Fails to build with the gold linker due to missing reference to gmodu...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
: 684787 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-01-29 15:02 UTC by Emanuele Aina
Modified: 2013-02-10 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build: Fix building with the gold linker by referencing gmodule-2.0 (1.10 KB, patch)
2013-01-29 15:06 UTC, Emanuele Aina
committed Details | Review

Description Emanuele Aina 2013-01-29 15:02:59 UTC
Since the GNU gold linker uses '--no-copy-dt-needed-entries'/'--no-add-needed' by default, every reference to symbols coming from indireclty referenced libraries will cause linking to fail:

libtool: link: gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -g -O2 -Wall -o .libs/testing testing.o  -L/home/em/dev/gnome-world-3.8/build/lib64 ../../gdk/.libs/libgdk-x11-2.0.so ../../gtk/.libs/libgtk-x11-2.0.so -lpangocairo-1.0 -lX11 -lXcomposite -lXdamage -lXfixes -latk-1.0 /usr/lib/x86_64-linux-gnu/libcairo.so -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 /usr/lib/x86_64-linux-gnu/libfreetype.so /home/em/dev/gnome-world-3.8/build/lib64/libfontconfig.so -lgobject-2.0 -lglib-2.0 -lm -pthread -Wl,-rpath -Wl,/home/em/dev/gnome-world-3.8/build/lib64
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_symbol'
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_open'
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_supported'
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_close'
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_error'
../../gtk/.libs/libgtk-x11-2.0.so: error: undefined reference to 'g_module_build_path'
collect2: error: ld returned 1 exit status
make[4]: *** [testing] Error 1

(Occurred under jhbuild on a Debian machine with binutils-gold installed)
Comment 1 Emanuele Aina 2013-01-29 15:06:21 UTC
Created attachment 234743 [details] [review]
build: Fix building with the gold linker by referencing gmodule-2.0

With the binutils-gold linker the '--no-copy-dt-needed-entries' flag is
active by default and using any symbol from indirectly loaded libraries
will result in undefined reference errors.
Comment 2 Matthias Clasen 2013-02-03 20:53:42 UTC
Attachment 234743 [details] pushed as 65ea14d - build: Fix building with the gold linker by referencing gmodule-2.0
Comment 3 David King 2013-02-10 14:19:19 UTC
*** Bug 684787 has been marked as a duplicate of this bug. ***