[cairo] Building libcairo 1.6.4 on AIX

Stephen McCants stephenmccants at yahoo.com
Wed May 28 09:39:52 PDT 2008


Hello,

I'm trying to build libcairo (version 1.6.4) on AIX 5.3 (TL7), but I'm failing a compile time assert:

 /dfs/projects/opensource/bin/gcc -DHAVE_CONFIG_H -I. -I.. -I. -I/.../austin.ibm.com/fs/home/smccants/landman/include/freetype2/ -I/.../austin.ibm.com/fs/home/smccants/landman/include -I/.../austin.ibm.com/fs/home/smccants/landman/include/fontconfig -I/opt/freeware/include/libpng12 -DXTHREADS -I/opt/freeware/include -I/.../austin.ibm.com/fs/home/smccants/landman/include/pixman-1 -Wall -Wsign-compare -Werror-implicit-function-declaration -Wpointer-arith -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wnested-externs -Wpacked -Wswitch-enum -Wmissing-format-attribute -Wno-unused-parameter -Wno-long-long -Winline -fno-strict-aliasing -g -O2 -MT libcairo_la-cairo-xlib-surface.lo -MD -MP -MF .deps/libcairo_la-cairo-xlib-surface.Tpo -c cairo-xlib-surface.c  -DPIC -o .libs/libcairo_la-cairo-xlib-surface.o
cairo-xlib-surface.c:3124: error: size of array 'cairo_xlib_glyph_t_size_assertion' is negative

cairo-xlib-surface.c - line 3123-4 reads:

/* compile-time assert that #cairo_xlib_glyph_t is the same size as #cairo_glyph_t */
typedef int cairo_xlib_glyph_t_size_assertion [sizeof (cairo_xlib_glyph_t) == sizeof (cairo_glyph_t) ? 1 : -1];

The cairo_xlib_glyph_t struct (defined in cairo-xlib-surface.c) is:

typedef struct {
  unsigned long index;
  union {
    struct {
      double x;
      double y;
    } d;
    struct {
      int x;
      int y;
    } i;
  } p;
} cairo_xlib_glyph_t;

The cairo_glyph_t struct (defined in cairo.h) is:

typedef struct {
  unsigned long        index;
  double               x;
  double               y;
} cairo_glyph_t;

It seems unlikely that these two structs would be the same size under any compiler, but I suspect I'm wrong since other people must be compiling libcairo successfully.  I'm using gcc version 4.2.2:

/dfs/projects/opensource/bin/gcc --version
gcc (GCC) 4.2.2
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I'm not sure what to do to work through this problem, so any advice or ideas would be appreciated.  Thanks in advance!

Sincerely,
Stephen McCants


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080528/8709436e/attachment.html 


More information about the cairo mailing list