[Cairo] python-cairo compile error

James Henstridge james at daa.com.au
Wed Nov 26 04:58:45 PST 2003


On 26/11/03 15:24, Jesse David Andrews wrote:

>I managed to messup something on my new machine, when I try to compile
>python-cairo I get:
>
>% make
>
>...
>
>gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/python2.2
>-I/usr/include/freetype2 -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include
>-I/usr/include/atk-1.0 -I/usr/include/pango-1.0 -I/usr/X11R6/include
>-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
>-I/usr/include/pygtk-2.0 -g -O2 -Wall -std=c9x -MT cairomodule.lo -MD -MP
>-MF .deps/cairomodule.Tpo -c cairomodule.c  -fPIC -DPIC -o cairomodule.lo
>cairomodule.c: In function `init_cairo':
>cairomodule.c:128: warning: dereferencing type-punned pointer will break
>strict-aliasing rules
>cairomodule.c:129: warning: dereferencing type-punned pointer will break
>strict-aliasing rules
>cairomodule.c:130: warning: dereferencing type-punned pointer will break
>strict-aliasing rules
>cairomodule.c:131: warning: dereferencing type-punned pointer will break
>strict-aliasing rules
>/bin/sh ../libtool --mode=link gcc  -g -O2 -Wall -std=c9x   -o _cairo.la
>-rpath /usr/lib/python2.2/site-packages/cairo -module -avoid-version
>-export-symbols-regex init_cairo pycairo-matrix.lo pycairo-surface.lo
>pycairo-font.lo pycairo-context.lo cairomodule.lo -lcairo -lm -lfreetype
>-lz -lfontconfig -lic -lpixregion
>rm -fr .libs/_cairo.la .libs/_cairo.* .libs/_cairo.*
>generating symbol list for `_cairo.la'
>/usr/bin/nm -B  pycairo-matrix.lo pycairo-surface.lo pycairo-font.lo
>pycairo-context.lo cairomodule.lo  | sed -n -e 's/^.*[
>]\([ABCDGISTW][ABCDGISTW]*\)[  ][
>]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' | sed 's/.* //' | sort |
>uniq > .libs/_cairo.exp
>egrep -e "init_cairo" ".libs/_cairo.exp" > ".libs/_cairo.expT"
>mv -f ".libs/_cairo.expT" ".libs/_cairo.exp"
>gcc "{ global:" > .libs/_cairo.ver
>gcc: { global:: No such file or directory
>gcc: no input files
>make[2]: *** [_cairo.la] Error 1
>make[2]: Leaving directory
>`/home/jdandr2/cvs/freedesktop/Cairo/python-cairo/cairo'
>make[1]: *** [all-recursive] Error 1
>make[1]: Leaving directory
>`/home/jdandr2/cvs/freedesktop/Cairo/python-cairo'
>make: *** [all] Error 2
>looks like it got through everything but linking...
>
>  
>
I don't see that error when I build python-cairo.

The strict aliasing warnings can't be helped, since Python's 
implementation of polymorphism breaks those rules (it makes use of 
structure definitions sharing the first few fields, and the aliasing 
rules are violated when you cast between them).  I'll have to make some 
changes to the configure script to add -Wno-strict-aliasing when 
applicable.  I doubt it is the cause of the error.

If you do a "make clean" first, does it clear up the problem?

James.

-- 
Email: james at daa.com.au
WWW:   http://www.daa.com.au/~james/







More information about the cairo mailing list