Bug 4724 - Xrender tests broken if no xrender.pc file present
Summary: Xrender tests broken if no xrender.pc file present
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.0.0
Hardware: Other other
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-09 09:09 UTC by Benny Siegert
Modified: 2007-09-04 21:27 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
proposed patch (1.40 KB, patch)
2005-10-09 09:10 UTC, Benny Siegert
Details | Splinter Review

Description Benny Siegert 2005-10-09 09:09:30 UTC
While compiling cairo-1.0.0 on MirOS (an OpenBSD derivative), I came across
this problem. The configure scripts to find Xrender have two cases: if a
.pc file is found, then there is no problem. If not, the script probes for
<X11/extensions/Xrender.h> without checking for X or adding
-I/usr/X11R6/include to CPPFLAGS. Ironically, this is done afterwards.

Then it tries a function in Xrender (XrmFinalize) while adding the right
libraries. However, these never make it into the cairo .pc file. You see,
our linker does not know about shared library dependencies, so you always
have to give it all the dependent libraries. Thus, any user of cairo also
has to link against Xrender + dependencies.

My patch shuffles the order of the tests for them to work, adds X_CFLAGS
to CPPFLAGS and introduces a new variable XRENDER_LIBS that is added to
the "Libs" line of cairo.pc if xrender.pc is not used.

(For the record, the X server here is XFree86 4.5.0 final.)
Comment 1 Benny Siegert 2005-10-09 09:10:13 UTC
Created attachment 3525 [details] [review]
proposed patch
Comment 2 Owen Taylor 2005-10-09 11:48:13 UTC
Random comment, not sure if it is relevant - XrmFinalize isn't in Xrender.
Comment 3 Behdad Esfahbod 2006-06-14 09:57:35 UTC
I also noticed that problem can happen.  Patch looks good.
Comment 4 Behdad Esfahbod 2007-09-04 21:27:20 UTC
Fixed:

commit b85032584b32af968dc8d8a0fcfc9f3e1d2770a0
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed Sep 5 00:26:56 2007 -0400

    [configure.in] Fix non-pkgconfig Xrender detection path (#4724)



Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.