GNOME Bugzilla – Bug 686719
Missing linker flags in Camel tests
Last modified: 2012-11-27 13:42:27 UTC
Created attachment 227088 [details] [review] Patch to add explicit link to required objects Running "jhbuild build --check evolution-data-server" on Ubuntu 12.10 failed because tests failed to build with the following error: """Making check in message make[4]: Entering directory `/home/ubuntu/gnome/checkout/evolution-data-server/camel/tests/message' make test1 test2 test3 test4 make[5]: Entering directory `/home/ubuntu/gnome/checkout/evolution-data-server/camel/tests/message' CC test1-test1.o CCLD test1 /usr/bin/ld: ../../../camel/tests/lib/libcameltest.a(libcameltest_a-messages.o): undefined reference to symbol 'g_seekable_seek' /usr/bin/ld: note: 'g_seekable_seek' is defined in DSO /home/ubuntu/gnome/packages/lib64/libgio-2.0.so.0 so try adding it to the linker command line /home/ubuntu/gnome/packages/lib64/libgio-2.0.so.0: could not read symbols: Invalid operation collect2: error: ld returned 1 exit status """ The proposed patch attached addresses this issue
Hmm, I can't seem to reproduce the linker failure on my Debian machine, even when using LDFLAGS="-Wl,--as-needed". Patch looks correct but I'd first like to verify it for myself. Any idea what magic option I might be missing?
I think this is --no-add-needed, which disables the resolution of symbols through transitive library dependencies (http://wiki.debian.org/ToolChain/DSOLinking). Perhaps try to install binutils-gold? I think it does that by default.
Thanks Martin, binutils-gold did the trick. I can now reproduce the linker failure and verify the patch on my Debian machine. Note that "make check" still will not pass because the E-D-S test suite is rather broken at the moment. I'm hoping to address that by 3.8.0. But the patch is one less obstacle, at least. Committed for E-D-S 3.7.2 and 3.6.2: http://git.gnome.org/browse/evolution-data-server/commit/?id=52f87cba60b4d65a3d91718c25afc66d34db7db5 http://git.gnome.org/browse/evolution-data-server/commit/?h=gnome-3-6&id=5ce9ff162effaa170af34ff3f4b8d6d5b79692d1
*** Bug 689158 has been marked as a duplicate of this bug. ***