[cairo] Undefined symbol error after building py2cairo and importing cairo

Vincent de Vos vin.de.vos at gmail.com
Fri May 10 02:12:42 PDT 2013


After building py2cairo-1.10.0 with the following:
> export PYTHON=/usr/bin/python2.6
> python2.6 ./waf configure --prefix=$HOME
> python2.6 ./waf build
> python2.6 ./waf install

I get the following errors after importing cairo with the following:
cd $HOME/pycairo/lib/python2.6/site-packages/cairo
python2.6
>> import cairo
>> ImportError: ./cairo.so: undefined symbol:
cairo_surface_get_fallback_resolution

ldd -r cairo.so gives:
ldd: warning: you do not have execution permission for `./cairo.so'
linux-gate.so.1 =>  (0xffffe000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb7769000)
libm.so.6 => /lib/libm.so.6 (0xb7743000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb772b000)
libdl.so.2 => /lib/libdl.so.2 (0xb7727000)
libutil.so.1 => /lib/libutil.so.1 (0xb7722000)
libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0xb75ab000)
libc.so.6 => /lib/libc.so.6 (0xb7450000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb73e0000)
libz.so.1 => /usr/lib/libz.so.1 (0xb73cc000)
libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0xb73a5000)
libpng12.so.0 => /home/vdevos/libpng/lib/libpng12.so.0 (0xb7383000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb737b000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb72b4000)
libpixman-1.so.0 => /home/vdevos/pixman/lib/libpixman-1.so.0 (0xb7224000)
/lib/ld-linux.so.2 (0xb77f0000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7204000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb71f5000)
undefined symbol: cairo_surface_get_fallback_resolution (./cairo.so)
undefined symbol: cairo_toy_font_face_get_slant (./cairo.so)
undefined symbol: cairo_scaled_font_get_scale_matrix (./cairo.so)
undefined symbol: cairo_toy_font_face_get_weight (./cairo.so)
undefined symbol: cairo_toy_font_face_get_family (./cairo.so)
undefined symbol: cairo_toy_font_face_create (./cairo.so)

I'm using the following version of Python and Cairo:

pkg-config --modversion cairo:
1.12.14

python --version
Python 2.6.4

I have rebuild Cairo (needed to rebuild pixman, glib and libpng for this)
but I keep ending up with the same problem and I can't find the problem (or
better; the solution).

Thanks in advance!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130510/5e7c6323/attachment.html>


More information about the cairo mailing list