[cairo] Compile error in Cairo-1.6.4

Carl Worth cworth at cworth.org
Wed Apr 23 16:29:45 PDT 2008

On Wed, 23 Apr 2008 15:09:09 -0700, Radha Gargeya wrote:
> Hi:
> I am getting a compile error while building cairo 1.6.4 in
> cairo-xlib-surface.c. I skipped 1.6.2 (because of the advisory about
> that release) and tried 1.6.0. I still get the same error.
> The build went off the tracks after it could not resolve XTransform
> while compiling cairo-xlib-surface.c which includes
> xlib-surface-private.h. XTransform is defined in
> cairo-xlib-xrender-private.h. Everything looks good and I thought this
> might be an issue with lurking yet invisible special characters. So I
> retyped the relevant lines. No luck.
> I am attaching the excerpt from the build log as well as configure.log.
> The system details:
> Linux butters 2.4.9-e.57enterprise #1 SMP Thu Dec 2 20:45:51 EST 2004
> i686 unknown
> Thank you for your help.

Hi there.

The cairo mailing list rejected your post due to the rather large

So I'm just replying here, quoting the entire message (above), and
(small!) parts of the attachments (below).

> In file included from cairo-xlib-surface.c:42:
> cairo-xlib-surface-private.h:93: parse error before `XTransform'
> cairo-xlib-surface-private.h:93: warning: no semicolon at end of struct or union
> cairo-xlib-surface-private.h:99: parse error before `}'

That's really all of the compile output that's necessary. This error
means you don't have a valid cairo_xlib_surface_t structure, so the
rest of the implementation just falls over trying to use it.

So the compiler is not ever seeing a definition for XTransform. This
is intended to come from the Xrender.h header file, (the definition
you saw in cairo-xlib-surface-private.h is a red herring---that exists
only to allow cairo-xlib-surface.c to be compiled on a system without
the Xrender library).

So, from the configure output you provided:

> configure:24079: checking for cairo's Xlib Xrender backend
> configure:24100: checking for xlib_xrender
> configure:24108: $PKG_CONFIG --exists --print-errors "$xlib_xrender_REQUIRES"
> Package xrender was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xrender.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xrender' found
> configure:24111: $? = 1
> configure:24126: $PKG_CONFIG --exists --print-errors "$xlib_xrender_REQUIRES"
> Package xrender was not found in the pkg-config search path.
> Perhaps you should add the directory containing `xrender.pc'
> to the PKG_CONFIG_PATH environment variable
> No package 'xrender' found
> configure:24129: $? = 1
> No package 'xrender' found
> configure:24157: result: no
> configure:24159: result: no
> configure:24174: checking X11/extensions/Xrender.h usability
> configure:24191: gcc -c -g -O2    -I/usr/X11R6/include  conftest.c >&5
> configure:24197: $? = 0
> configure:24211: result: yes
> configure:24215: checking X11/extensions/Xrender.h presence
> configure:24230: gcc -E    -I/usr/X11R6/include  conftest.c
> configure:24236: $? = 0
> configure:24250: result: yes
> configure:24283: checking for X11/extensions/Xrender.h
> configure:24290: result: yes
> configure:24465: checking whether cairo's Xlib Xrender backend could be enabled
> configure:24468: result: yes

Cairo is finding Xrender.h, (though not any xrender.pc file as would
be supplied by a recent "modular" Xrender library). So does your
X11/extensions/Xrender.h file not define the XTransform structure?

If so, we may need to require a new-enough Xrender for cairo to build
the cairo-xlib-xrender stuff, (but without an xrender.pc file we don't
have any good way to query a version).

My guess is that your Xrender library is just too old for cairo to
use, but cairo doesn't understand that. You should be able to pass
--disable-xlib-xrender to get things to build, but you should probably
also consider installing a new-enough Xrender library to get better
performance from cairo.

I hope that's of some help. Please ask more if you have further
questions. And have fun!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.cairographics.org/archives/cairo/attachments/20080423/6d0067af/attachment.pgp 

More information about the cairo mailing list