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 684787 - gtk+-2.24.13 fails to build due to underlinking; libgtk-x11-2.0 need to link to gmodule
gtk+-2.24.13 fails to build due to underlinking; libgtk-x11-2.0 need to link ...
Status: RESOLVED DUPLICATE of bug 692810
Product: gtk+
Classification: Platform
Component: Widget: Other
2.24.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2012-09-25 14:38 UTC by Alexandre Rostovtsev
Modified: 2013-02-10 14:19 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (953 bytes, patch)
2012-09-25 14:42 UTC, Alexandre Rostovtsev
none Details | Review

Description Alexandre Rostovtsev 2012-09-25 14:38:11 UTC
When using GNU gold as the linker, the gtk tests in gtk+-2.24.13 fail to build:

/bin/sh ../../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc  -DGDK_PIXBUF_DISABLE_DEPRECATED -march=native -O2 -pipe -ggdb -Wall  -Wl,--as-needed -Wl,-O1 -o testing testing.o ../../gdk/libgdk-x11-2.0.la ../../gtk/libgtk-x11-2.0.la -lpangocairo-1.0 -lX11 -lXcomposite -lXdamage -lXfixes -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lm 
libtool: link: x86_64-pc-linux-gnu-gcc -DGDK_PIXBUF_DISABLE_DEPRECATED -march=native -O2 -pipe -ggdb -Wall -Wl,-O1 -o .libs/testing testing.o  -Wl,--as-needed ../../gdk/.libs/libgdk-x11-2.0.so -L/usr/lib64 -L/lib64 ../../gtk/.libs/libgtk-x11-2.0.so /var/tmp/portage/x11-libs/gtk+-2.24.13/work/gtk+-2.24.13/gdk/.libs/libgdk-x11-2.0.so -lXext -lXrender -lXinerama -lXi -lXrandr -lXcursor -lpangocairo-1.0 -lXcomposite /usr/lib64/libXdamage.so -lX11 -lxcb -lXau -lXdmcp -ldl -lXfixes -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lglib-2.0 -lm
../../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

This is happening because libgtk-x11-2.0 uses gmodule functions in many places, but does not explicitly link to it. To fix the problem, GMODULE_LIBS should be added libadd in gtk+-2.24.x's gtk/Makefile.am, like was already done in gtk+-3.4/3.6.
Comment 1 Alexandre Rostovtsev 2012-09-25 14:42:06 UTC
Created attachment 225138 [details] [review]
proposed patch
Comment 2 David King 2013-01-15 15:56:50 UTC
Alexandre's fix works for me, and allows me to build GTK+ 2 in jhbuild. For reference, the (similar) GTK+ 3 fix was in bug 665326. This patch would also allow Fedora to drop a downstream patch in the GTK+ 2 package: http://pkgs.fedoraproject.org/cgit/gtk2.git/tree/gtk2-fixdso.patch
Comment 3 David King 2013-02-10 14:19:19 UTC

*** This bug has been marked as a duplicate of bug 692810 ***