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 686503 - libsocialweb/test-runner needs to explicitly link to libgmodule to build with ld.gold
libsocialweb/test-runner needs to explicitly link to libgmodule to build with...
Status: RESOLVED FIXED
Product: libsocialweb
Classification: Other
Component: other
git master
Other Linux
: Normal normal
: ---
Assigned To: libsocialweb-maint
libsocialweb-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-20 02:16 UTC by Alexandre Rostovtsev
Modified: 2013-03-06 13:11 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
proposed patch (1.80 KB, patch)
2012-10-20 02:18 UTC, Alexandre Rostovtsev
needs-work Details | Review
build: explicitly check for and link to gmodule (1.94 KB, patch)
2013-03-06 11:57 UTC, Simon McVittie
accepted-commit_now Details | Review

Description Alexandre Rostovtsev 2012-10-20 02:16:35 UTC
When building either libsocialweb-0.25.21 (with the patch from bug #677445 applied), or current libsocialweb git master, on a gnome-3.6 system using ld.gold as the linker:

make check
[...]
/bin/sh ../libtool  --tag=CC   --mode=link x86_64-pc-linux-gnu-gcc -std=gnu99 -DBUILD_TESTS -I.. -I../interfaces -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -pthread -I/usr/include/libsoup-gnome-2.4 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include   -I/usr/include/libnm-glib -I/usr/include/NetworkManager -I/usr/include/dbus-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/dbus-1.0/include    -pthread -I/usr/include/rest-0.7 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libsoup-2.4 -I/usr/include/libxml2    -DSOCIALWEB_SERVICES_MODULES_DIR=\"/usr/lib64/libsocialweb/services\" -march=native -O2 -pipe -Wall -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0   -pthread -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lgthread-2.0 -lrt -lglib-2.0   -lsoup-gnome-2.4 -lsoup-2.4 -lgio-2.0 -lgobject-2.0 -lglib-2.0   -lnm-glib -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0    -lrest-0.7 -lrest-extras-0.7 -lsoup-2.4 -lxml2 -lgio-2.0 -lgobject-2.0 -lglib-2.0    ../interfaces/libsocialweb-ginterfaces.la -Wl,--as-needed -Wl,-O1 -o test-runner test_runner-test-runner.o test_runner-sw-debug.o test_runner-sw-cacheable.o test_runner-sw-core.o test_runner-sw-contact.o test_runner-sw-contact-view.o test_runner-sw-item.o test_runner-sw-item-view.o test_runner-sw-item-stream.o test_runner-sw-service.o test_runner-sw-utils.o test_runner-sw-web.o test_runner-sw-set.o test_runner-sw-cache.o test_runner-sw-online.o test_runner-sw-banned.o test_runner-sw-call-list.o test_runner-sw-client-monitor.o test_runner-sw-enum-types.o test_runner-dummy.o
libtool: link: x86_64-pc-linux-gnu-gcc -std=gnu99 -DBUILD_TESTS -I.. -I../interfaces -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -pthread -I/usr/include/libsoup-gnome-2.4 -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libnm-glib -I/usr/include/NetworkManager -I/usr/include/dbus-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/lib64/dbus-1.0/include -pthread -I/usr/include/rest-0.7 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libsoup-2.4 -I/usr/include/libxml2 -DSOCIALWEB_SERVICES_MODULES_DIR=\"/usr/lib64/libsocialweb/services\" -march=native -O2 -pipe -Wall -pthread -Wl,-O1 -o test-runner test_runner-test-runner.o test_runner-sw-debug.o test_runner-sw-cacheable.o test_runner-sw-core.o test_runner-sw-contact.o test_runner-sw-contact-view.o test_runner-sw-item.o test_runner-sw-item-view.o test_runner-sw-item-stream.o test_runner-sw-service.o test_runner-sw-utils.o test_runner-sw-web.o test_runner-sw-set.o test_runner-sw-cache.o test_runner-sw-online.o test_runner-sw-banned.o test_runner-sw-call-list.o test_runner-sw-client-monitor.o test_runner-sw-enum-types.o test_runner-dummy.o  -lgthread-2.0 -lrt -lsoup-gnome-2.4 -lnm-glib -lrest-0.7 -lrest-extras-0.7 -lsoup-2.4 -lxml2 -lgio-2.0 ../interfaces/.libs/libsocialweb-ginterfaces.a -ldbus-glib-1 -ldbus-1 -lgobject-2.0 -lglib-2.0 -Wl,--as-needed -pthread
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_open'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_symbol'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_close'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_error'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_error'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_close'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_symbol'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_error'
test_runner-sw-core.o:sw-core.c:function load_module: error: undefined reference to 'g_module_make_resident'
collect2: error: ld returned 1 exit status
make[3]: *** [test-runner] Error 1
make[3]: Leaving directory `/var/tmp/portage/net-libs/libsocialweb-0.25.21/work/libsocialweb-0.25.21/libsocialweb


As you can see, "-lgmodule-2.0" does not appear in the linking command's arguments. I am guessing that this is happening because some of libsocialweb's dependencies have moved gmodule out of the Requires: line of their pkgconfig files. So to prevent an underlinking failure when building with ld.gold, configure needs to explicitly check for gmodule, and libsocialweb/Makefile needs to explicitly add the resulting GMODULE_LIBS to LIBADD.
Comment 1 Alexandre Rostovtsev 2012-10-20 02:18:46 UTC
Created attachment 226865 [details] [review]
proposed patch

Patch for libsocialweb git master branch.
Comment 2 Simon McVittie 2013-03-06 11:56:05 UTC
(In reply to comment #1)
> proposed patch

I think this should use gmodule-no-export-2.0 - gmodule-2.0 doesn't make much sense for a library (it defeats public-ABI-control LDFLAGS, although libsocialweb doesn't seem to use those anyway).
Comment 3 Simon McVittie 2013-03-06 11:57:43 UTC
Created attachment 238191 [details] [review]
build: explicitly check for and link to gmodule

From: Alexandre Rostovtsev <tetromino@gentoo.org>

Needed to prevent underlinking failure with ld.gold and recent versions
of libsocialweb's dependencies.

Bug: https://bugzilla.gnome.org/show_bug.cgi?id=686503
[adjusted to use gmodule-no-export, not gmodule -smcv]
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Comment 4 Ross Burton 2013-03-06 12:08:20 UTC
Review of attachment 238191 [details] [review]:

Yes, that.
Comment 5 Simon McVittie 2013-03-06 13:11:32 UTC
Committed as fc6600170b, thanks.