GNOME Bugzilla – Bug 746692
undefined reference to 'XRenderFindStandardFormat' when using gold linker
Last modified: 2015-03-28 12:45:07 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.
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.
Review of attachment 300203 [details] [review]: Nice catch, thanks!
Comment on attachment 300203 [details] [review] include-xrender-as-dependency.patch Thanks, I pushed that to both master and 3.14.