GNOME Bugzilla – Bug 678957
1.33.3: Does not compile with as needed linking
Last modified: 2012-06-28 22:09:13 UTC
Created attachment 217364 [details] build log Can provide verbose build log as well if needed This on Mageia. We do the as needed linking bit. CXXLD libgjs.la /usr/share/gobject-introspection-1.0/tests/gimarshallingtests.c: In function '_callback': /usr/share/gobject-introspection-1.0/tests/gimarshallingtests.c:3858:5: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast] .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `idle_cb': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:268: undefined reference to `g_dbus_interface_skeleton_get_type' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:270: undefined reference to `g_dbus_interface_skeleton_flush' .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `gjs_dbus_implementation_class_init': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:209: undefined reference to `g_dbus_interface_skeleton_get_type' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:221: undefined reference to `g_dbus_interface_info_get_type' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:228: undefined reference to `g_dbus_method_invocation_get_type' .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `gjs_dbus_implementation_get_type': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:33: undefined reference to `g_dbus_interface_skeleton_get_type' .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `gjs_dbus_implementation_flush': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:188: undefined reference to `g_dbus_interface_skeleton_get_object_path' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:188: undefined reference to `g_dbus_interface_skeleton_get_connection' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:188: undefined reference to `g_dbus_connection_emit_signal' .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `gjs_dbus_implementation_finalize': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:106: undefined reference to `g_dbus_interface_info_unref' .libs/libgjs_la-gjs-gdbus-wrapper.o: In function `gjs_dbus_implementation_emit_signal': /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:308: undefined reference to `g_dbus_interface_skeleton_get_type' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:310: undefined reference to `g_dbus_interface_skeleton_get_object_path' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:310: undefined reference to `g_dbus_interface_skeleton_get_connection' /home/iurt/rpm/BUILD/gjs-1.33.3/gjs-dbus/gjs-gdbus-wrapper.c:310: undefined reference to `g_dbus_connection_emit_signal' collect2: ld returned 1 exit status make[1]: *** [libgjs.la] Error 1 make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory `/home/iurt/rpm/BUILD/gjs-1.33.3' make: *** [all] Error 2 error: Bad exit status from /home/iurt/rpm/tmp/rpm-tmp.c7SYCU (%build)
Verbose build: http://pkgsubmit.mageia.org/uploads/failure/cauldron/core/release/20120627094033.ovitters.valstar.1878/log/gjs-1.33.3-1.mga3/build.0.20120627094034.log
Created attachment 217426 [details] [review] build: Link everything to gio Should fix a linker error building the test suite when using -Wl,--no-undefined. This is a fairly aggressive fix; we probably don't need to link all of the modules to gio, but on the other hand, there's really not a strong reason not to, and for people using -Wl,--as-needed any unnecessary linkage due to this will be removed.
I struggled to reproduce this locally with jhbuild; I think the error here is due to a combination of -Wl,--no-undefined AND the random hacks Mageia appears to applying into the libtool version shipped in the tarball (which incidentally is from Fedora 16). Anyways, please test.
Review of attachment 217426 [details] [review]: <bkor> adding your patch made it build It builds, ship it!
Attachment 217426 [details] pushed as a6ebdb5 - build: Link everything to gio