GNOME Bugzilla – Bug 710829
gnome-control-center 3.10.1 fails to link due to bg_flickr_source_new
Last modified: 2013-11-12 20:43:37 UTC
Created attachment 258047 [details] [review] Fix the linking of gnome-control-center 3.10.1 When compiling gnome-control-center 3.10.1 in Gentoo, with libsocialweb 0.25.21, the build fails with the following. libtool: link: x86_64-pc-linux-gnu-ranlib .libs/libbackground.a libtool: link: rm -fr .libs/libbackground.lax libtool: link: ( cd ".libs" && rm -f "libbackground.la" && ln -s "../libbackground.la" "libbackground.la" ) ./.libs/libbackground-chooser.a(cc-background-chooser-dialog.o): In function `cc_background_chooser_dialog_init': cc-background-chooser-dialog.c:(.text+0x3f4): undefined reference to `bg_flickr_source_new' collect2: error: ld returned 1 exit status It seems that bg-flickr-source.[ch] were removed from libbackground_chooser_la_SOURCES, even when cc-background-chooser-dialog.c uses bg_flickr_source_new. Adding bg-flickr-source.[ch] to libbackground_chooser_la_SOURCES and $(SOCIALWEB_LIBS) to libbackground_chooser_la_LIBADD allows me to compile the package, but I'm not entirely sure this is the right solution.
Review of attachment 258047 [details] [review]: Your patch looks correct, but I am not in a position to test it. I must point out that practically no one uses or tests the libsocialweb code, and it might not even work. So you are better off not compiling it. We are going to replace it with Grilo in the future (see bug 707569).
The problem of adding bg-flickr-source.[ch] to libbackground_chooser_la_SOURCES is that build fails when libsocialweb is not present: libtool: link: x86_64-pc-linux-gnu-ranlib .libs/libbackground.a libtool: link: rm -fr .libs/libbackground.lax libtool: link: ( cd ".libs" && rm -f "libbackground.la" && ln -s "../libbackground.la" "libbackground.la" ) ./.libs/libbackground-chooser.a(cc-background-chooser-dialog.o): In function `cc_background_chooser_dialog_init': /var/tmp/portage/gnome-base/gnome-control-center-3.8.6/work/gnome-control-center-3.8.6/panels/background/cc-background-chooser-dialog.c:195: undefined reference to `bg_flickr_source_new' collect2: error: ld returned 1 exit status make[4]: *** [test-chooser-dialog] Error 1 make[4]: Leaving directory `/var/tmp/portage/gnome-base/gnome-control-center-3.8.6/work/gnome-control-center-3.8.6/panels/background' make[3]: *** [all] Error 2 make[3]: Leaving directory `/var/tmp/portage/gnome-base/gnome-control-center-3.8.6/work/gnome-control-center-3.8.6/panels/background' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/var/tmp/portage/gnome-base/gnome-control-center-3.8.6/work/gnome-control-center-3.8.6/panels' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/gnome-base/gnome-control-center-3.8.6/work/gnome-control-center-3.8.6' make: *** [all] Error 2
Review of attachment 258047 [details] [review]: ::: gnome-control-center-3.10.1/panels/background/Makefile.am @@ +40,3 @@ bg-colors-source.c \ + bg-colors-source.h \ + bg-flickr-source.c \ This always adds the flickr files to the source, which will fail to build if libsocialweb support is used.
Fixed in gnome-3-10 and master. File a new bug if there's any more problems. commit 4605bdec3f7ce36f93af91fe3f89399656e3a19e Author: Bastien Nocera <hadess@hadess.net> Date: Tue Nov 12 08:45:43 2013 +0100 background: Fix compilation with libsocialweb support The flickr source files were added to the wrong internal shared library, so that the panel could be linked, but not the test application. https://bugzilla.gnome.org/show_bug.cgi?id=710829
Maybe would be interesting to add the patch to 3.8 branch too, since 3.8.6 introduced that regression too over 3.8.5
At last on 3.8.6, the patch cannot be applied as, later, automake fails with: panels/background/Makefile.am:52: error: libbackground_chooser_la_LIBADD must be set with '=' before using '+=' (with automake-1.13.4)
(In reply to comment #6) > At last on 3.8.6, the patch cannot be applied as, later, automake fails with: > panels/background/Makefile.am:52: error: libbackground_chooser_la_LIBADD must > be set with '=' before using '+=' > (with automake-1.13.4) You forgot to cherry-pick f08a22526c050d2032c926c5bc045927a646ea4a as well... Both cherry-picked to gnome-3-8, file a new bug if there's any more problems.