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 779365 - Fix build with -Wl,--as-needed
Fix build with -Wl,--as-needed
Status: RESOLVED FIXED
Product: system-monitor
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: System-monitor maintainers
System-monitor maintainers
Depends on:
Blocks:
 
 
Reported: 2017-02-28 11:45 UTC by Dominique Leuenberger
Modified: 2017-02-28 18:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix build with -Wl,--as-needed (1.30 KB, patch)
2017-02-28 11:45 UTC, Dominique Leuenberger
none Details | Review

Description Dominique Leuenberger 2017-02-28 11:45:37 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
Comment 1 Dominique Leuenberger 2017-02-28 11:45:41 UTC
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'
Comment 2 Benoît Dejean 2017-02-28 17:48:17 UTC
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 ?
Comment 3 Robert Roth 2017-02-28 18:58:36 UTC
(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.