GNOME Bugzilla – Bug 779365
Fix build with -Wl,--as-needed
Last modified: 2017-02-28 18:58:36 UTC
Build fails with gsm_color_button.c:(.text+0x653): undefined reference to `rsvg_handle_new_from_data' if the linker command line is not ordered appropriately
Created attachment 346899 [details] [review] Fix build with -Wl,--as-needed As most distros do not ship static libraries for things like librsvg, our internal lib libgsmlegacy.a, despite being static, links librsvg-2.so dynamic. This is no problem at all and is well supported. But when we later on link gnome-system-monitor, referencing libgsmlegacy.a, we have to make sure that things it references are listed later in the command line, as otherwise --as-needed building would fail with an error like: gsm_color_button.c:(.text+0x653): undefined reference to `rsvg_handle_new_from_data'
Hello Dominique, I though that having the same libraries on the CLI would do the trick, but it totally makes sense. Thanks for the patch. Robert > is it too late for this 3.23.91 ?
(In reply to Benoît Dejean from comment #2) > Hello Dominique, I though that having the same libraries on the CLI would do > the trick, but it totally makes sense. Thanks for the patch. > > Robert > is it too late for this 3.23.91 ? As I've pushed 3.23.91 yesterday, yes, it is too late, but I'm ok with pushing 3.23.91.1, as I consider this important, maybe we should not wait until 3.23.92.