Bug 9508

Summary: Compilation fails with old Xrender.h even if Xrender is disabled
Product: cairo Reporter: xzoli <xlator>
Component: xlib backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: high    
Version: 1.2.6   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description xzoli 2007-01-01 15:18:54 UTC
Using SuSE, with package xdevel-4.1.0-52 (that contains 
/usr/X11R6/include/X11/extensions/Xrender.h).

If I run configure without arguments or with --enable-xlib-xrender=no then I get
a build error:

 gcc -DHAVE_CONFIG_H -I. -I. -I.. -I. -I../pixman/src
-I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/include
-I/usr/local/include/libpng12 -I/usr/X11R6/include -Wall -Wextra -Wsign-compare
-Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings
-Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs
-Wpacked -Wswitch-enum -Wmissing-format-attribute -Wstrict-aliasing=2
-Winit-self -Wunsafe-loop-optimizations -Wdeclaration-after-statement
-Wold-style-definition -Wno-missing-field-initializers -Wno-unused-parameter
-fno-strict-aliasing -g -O2 -MT cairo-xlib-surface.lo -MD -MP -MF
.deps/cairo-xlib-surface.Tpo -c cairo-xlib-surface.c  -fPIC -DPIC -o
.libs/cairo-xlib-surface.o
cairo-xlib-surface.c: In function '_CAIRO_FORMAT_TO_XRENDER_FORMAT':
cairo-xlib-surface.c:196: error: 'PictStandardA1' undeclared (first use in this
function)
cairo-xlib-surface.c:196: error: (Each undeclared identifier is reported only once
cairo-xlib-surface.c:196: error: for each function it appears in.)
cairo-xlib-surface.c:198: error: 'PictStandardA8' undeclared (first use in this
function)
cairo-xlib-surface.c:200: error: 'PictStandardRGB24' undeclared (first use in
this function)
cairo-xlib-surface.c:203: error: 'PictStandardARGB32' undeclared (first use in
this function)
cairo-xlib-surface.c:194: warning: enumeration value 'CAIRO_FORMAT_RGB16_565'
not handled in switch
cairo-xlib-surface.c:205: error: implicit declaration of function
'XRenderFindStandardFormat'
cairo-xlib-surface.c:205: warning: nested extern declaration of
'XRenderFindStandardFormat'
cairo-xlib-surface.c:205: warning: return makes pointer from integer without a cast
cairo-xlib-surface.c: In function '_cairo_xlib_surface_set_matrix':
cairo-xlib-surface.c:903: error: 'XTransform' undeclared (first use in this
function)
cairo-xlib-surface.c:903: error: expected ';' before 'xtransform'
cairo-xlib-surface.c:908: error: 'xtransform' undeclared (first use in this
function)
cairo-xlib-surface.c:922: error: expected '=', ',', ';', 'asm' or
'__attribute__' before 'identity'
cairo-xlib-surface.c:922: error: 'identity' undeclared (first use in this function)
cairo-xlib-surface.c:934: error: implicit declaration of function
'XRenderSetPictureTransform'
cairo-xlib-surface.c:934: warning: nested extern declaration of
'XRenderSetPictureTransform'
cairo-xlib-surface.c: In function '_cairo_xlib_surface_set_filter':
cairo-xlib-surface.c:958: error: 'FilterFast' undeclared (first use in this
function)
cairo-xlib-surface.c:961: error: 'FilterGood' undeclared (first use in this
function)
cairo-xlib-surface.c:964: error: 'FilterBest' undeclared (first use in this
function)
cairo-xlib-surface.c:967: error: 'FilterNearest' undeclared (first use in this
function)
cairo-xlib-surface.c:970: error: 'FilterBilinear' undeclared (first use in this
function)
cairo-xlib-surface.c:983: error: implicit declaration of function
'XRenderSetPictureFilter'
cairo-xlib-surface.c:983: warning: nested extern declaration of
'XRenderSetPictureFilter'
cairo-xlib-surface.c: In function '_create_a8_picture':
cairo-xlib-surface.c:1463: error: 'PictStandardA8' undeclared (first use in this
function)
cairo-xlib-surface.c:1464: warning: passing argument 3 of 'XRenderCreatePicture'
makes pointer from integer without a cast
cairo-xlib-surface.c: In function '_create_trapezoid_mask':
cairo-xlib-surface.c:1488: error: 'XTrapezoid' undeclared (first use in this
function)
cairo-xlib-surface.c:1488: error: 'offset_traps' undeclared (first use in this
function)
cairo-xlib-surface.c:1489: warning: ISO C90 forbids mixed declarations and code
cairo-xlib-surface.c:1518: error: implicit declaration of function
'XRenderCompositeTrapezoids'
cairo-xlib-surface.c:1518: warning: nested extern declaration of
'XRenderCompositeTrapezoids'
cairo-xlib-surface.c: In function '_cairo_xlib_surface_composite_trapezoids':
cairo-xlib-surface.c:1575: error: 'PictStandardA1' undeclared (first use in this
function)
cairo-xlib-surface.c:1575: warning: assignment makes pointer from integer
without a cast
cairo-xlib-surface.c:1581: error: 'PictStandardA8' undeclared (first use in this
function)
cairo-xlib-surface.c:1581: warning: assignment makes pointer from integer
without a cast
cairo-xlib-surface.c:1647: error: 'XTrapezoid' undeclared (first use in this
function)
cairo-xlib-surface.c:1647: error: expected expression before ')' token
cairo-xlib-surface.c: In function '_cairo_xlib_surface_create_internal':
cairo-xlib-surface.c:1851: error: 'PictStandardA1' undeclared (first use in this
function)
cairo-xlib-surface.c:1851: warning: assignment makes pointer from integer
without a cast
cairo-xlib-surface.c: In function '_cairo_xlib_surface_add_glyph':
cairo-xlib-surface.c:2413: warning: enumeration value 'CAIRO_FORMAT_RGB16_565'
not handled in switch
cairo-xlib-surface.c: In function '_cairo_xlib_surface_show_glyphs8':
cairo-xlib-surface.c:2503: error: 'XGlyphElt8' undeclared (first use in this
function)
cairo-xlib-surface.c:2503: error: 'elts' undeclared (first use in this function)
cairo-xlib-surface.c:2504: error: expected ';' before 'stack_elts'
cairo-xlib-surface.c:2506: warning: ISO C90 forbids mixed declarations and code
cairo-xlib-surface.c:2515: error: 'stack_elts' undeclared (first use in this
function)
cairo-xlib-surface.c:2539: error: implicit declaration of function
'XRenderCompositeText8'
cairo-xlib-surface.c:2539: warning: nested extern declaration of
'XRenderCompositeText8'
cairo-xlib-surface.c: In function '_cairo_xlib_surface_show_glyphs16':
cairo-xlib-surface.c:2564: error: 'XGlyphElt16' undeclared (first use in this
function)
cairo-xlib-surface.c:2564: error: 'elts' undeclared (first use in this function)
cairo-xlib-surface.c:2565: error: expected ';' before 'stack_elts'
cairo-xlib-surface.c:2567: warning: ISO C90 forbids mixed declarations and code
cairo-xlib-surface.c:2576: error: 'stack_elts' undeclared (first use in this
function)
cairo-xlib-surface.c:2600: error: implicit declaration of function
'XRenderCompositeText16'
cairo-xlib-surface.c:2600: warning: nested extern declaration of
'XRenderCompositeText16'
cairo-xlib-surface.c: In function '_cairo_xlib_surface_show_glyphs32':
cairo-xlib-surface.c:2625: error: 'XGlyphElt32' undeclared (first use in this
function)
cairo-xlib-surface.c:2625: error: 'elts' undeclared (first use in this function)
cairo-xlib-surface.c:2626: error: expected ';' before 'stack_elts'
cairo-xlib-surface.c:2628: warning: ISO C90 forbids mixed declarations and code
cairo-xlib-surface.c:2637: error: 'stack_elts' undeclared (first use in this
function)
cairo-xlib-surface.c:2661: error: implicit declaration of function
'XRenderCompositeText32'
cairo-xlib-surface.c:2661: warning: nested extern declaration of
'XRenderCompositeText32'
cairo-xlib-surface.c: At top level:
cairo-xlib-surface.c:2013: error:
'EXT_cairo_xlib_surface_create_with_xrender_format' aliased to undefined symbol
'INT_cairo_xlib_surface_create_with_xrender_format'
make[3]: *** [cairo-xlib-surface.lo] Error 1
make[3]: Leaving directory `.../cairo-1.2.6/src'

These symbols are defined in a later version of Xrender.h.
I think that the Xrender part should not use these symbol references if the
Xrender interface is too old and not built at all if I specify
--enable-xlib-xrender=no.

The only way to skip building that part of Cairo is to do
   ./configure --enable-xlib-xrender=no --enable-xlib=no

I'm not 100% sure if this is exactly the same problem as in bug 7424.
Comment 1 Behdad Esfahbod 2007-09-04 18:29:21 UTC
Fixed.  --disable-xlib-xrender works now in git master.  Will be in 1.6

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.