Bug 18385 - 1.8.2: Build of xlib backend fails against old XRender (RepeatNone undeclared)
1.8.2: Build of xlib backend fails against old XRender (RepeatNone undeclared)
Status: RESOLVED FIXED
Product: cairo
Classification: Unclassified
Component: xlib backend
1.8.2
All Mac OS X (All)
: medium blocker
Assigned To: Carl Worth
cairo-bugs mailing list
:
: 18331 18478 18485 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2008-11-05 08:44 UTC by Benjamin Reed
Modified: 2008-11-14 00:43 UTC (History)
3 users (show)

See Also:
i915 platform:
i915 features:


Attachments
simple patch to define the missing constants (823 bytes, patch)
2008-11-05 08:45 UTC, Benjamin Reed
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Reed 2008-11-05 08:44:22 UTC
This commit:

commit 8ea9cb187a198c64bfb79af8001d95eab29715b4
Author: Carl Worth <cworth@cworth.org>
Date:   Wed Oct 1 14:12:18 2008 -0700

    Use symbolic constants for Render repeat modes.
    
    Names like RepeatNone and RepeatNormal are much easier to
    read and understand than bare 0 and 1.

 src/cairo-xlib-surface.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

...adds a dependency on the RepeatNone and RepeatNormal constants, which are defined in Xrender 0.10.  The Xrender checks check for >= 0.6, and if you have 0.6, cairo defines it's own internal Xrender header in  cairo-xlib-xrender-private.h, but for 0.8, it's in a no-man's land where it includes the headers, but doesn't define the constants.

You end up with this build failure:

gcc -DHAVE_CONFIG_H -I. -I.. -I. -I/sw/lib/fontconfig2/include -I/sw/include/pixman-1 -I/sw/lib/freetype219/include/freetype2 -I/sw/lib/freetype219/include -I/sw/lib/fontconfig2/include -I/sw/include -I/sw/include/libpng12 -Wall -Wextra -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wstrict-aliasing=2 -Winit-self -Wdeclaration-after-statement -Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter -Wno-long-long -Winline -fno-strict-aliasing -fno-common -Wp,-D_FORTIFY_SOURCE=2 -I/usr/X11R6/include -I/sw/lib/fontconfig2/include -I/sw/include -Os -c cairo-xlib-surface.c  -fno-common -DPIC -o .libs/cairo-xlib-surface.o
cairo-xlib-surface.c: In function '_cairo_xlib_surface_set_attributes':
cairo-xlib-surface.c:1440: error: 'RepeatNone' undeclared (first use in this function)
cairo-xlib-surface.c:1440: error: (Each undeclared identifier is reported only once
cairo-xlib-surface.c:1440: error: for each function it appears in.)
cairo-xlib-surface.c:1443: error: 'RepeatNormal' undeclared (first use in this function)
make[3]: *** [cairo-xlib-surface.lo] Error 1
make[2]: *** [all] Error 2
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
Comment 1 Benjamin Reed 2008-11-05 08:45:32 UTC
Created attachment 20069 [details] [review]
simple patch to define the missing constants

Attached is a simple patch to add the defines if the Xrender version is < 0.10.
Comment 2 Behdad Esfahbod 2008-11-05 08:51:35 UTC
Thanks, I pushed a slightly modified patch.

commit 43cfaec39cc742ddfbf566b36391d620400e10be
Author: Behdad Esfahbod <behdad@behdad.org>
Date:   Wed Nov 5 11:50:20 2008 -0500

    Define RepeatNone, etc if the available Render version doesn't (#18385)

Comment 3 Behdad Esfahbod 2008-11-05 08:53:22 UTC
*** Bug 18331 has been marked as a duplicate of this bug. ***
Comment 4 Carl Worth 2008-11-13 06:10:48 UTC
*** Bug 18485 has been marked as a duplicate of this bug. ***
Comment 5 Carl Worth 2008-11-14 00:43:53 UTC
*** Bug 18478 has been marked as a duplicate of this bug. ***