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 746692 - undefined reference to 'XRenderFindStandardFormat' when using gold linker
undefined reference to 'XRenderFindStandardFormat' when using gold linker
Status: RESOLVED FIXED
Product: mutter
Classification: Core
Component: general
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: mutter-maint
mutter-maint
Depends on:
Blocks:
 
 
Reported: 2015-03-24 15:25 UTC by Calvin Walton
Modified: 2015-03-28 12:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
build log (556.34 KB, text/plain)
2015-03-24 15:25 UTC, Calvin Walton
  Details
include-xrender-as-dependency.patch (889 bytes, patch)
2015-03-24 15:26 UTC, Calvin Walton
committed Details | Review

Description Calvin Walton 2015-03-24 15:25:13 UTC
Created attachment 300202 [details]
build log

When building mutter 3.16.0 on Linux with the gold linker (system built with -Wl,--as-needed), I get the following error printed several times:

./.libs/libmutter.so: error: undefined reference to 'XRenderFindStandardFormat'

(full build log attached)

It looks like this is caused by libmutter being underlinked; the function XRenderFindStandardFormat is referenced in src/x11/iconcache.c, but the Xrender library is not linked. The bfd linker pulls in libXrender indirectly, hiding the problem.
Comment 1 Calvin Walton 2015-03-24 15:26:53 UTC
Created attachment 300203 [details] [review]
include-xrender-as-dependency.patch

This is the simplest fix to the issue - since mutter is using a function from libXrender, add xrender to the pkg-config dependencies. This causes the libmutter link command to include -lXrender, fixing the issue.
Comment 2 Jasper St. Pierre (not reading bugmail) 2015-03-24 15:50:04 UTC
Review of attachment 300203 [details] [review]:

Nice catch, thanks!
Comment 3 drago01 2015-03-28 12:44:52 UTC
Comment on attachment 300203 [details] [review]
include-xrender-as-dependency.patch

Thanks, I pushed that to both master and 3.14.