[cairo] Undefined symbol error after building py2cairo and importing cairo
Vincent de Vos
vin.de.vos at gmail.com
Fri May 10 07:39:05 PDT 2013
It seems that when i try to build using that "waf" installer thingy, the
linking goes bad...
I have setup the following environment variables:
export CFLAGS="-lpython2.6 -fgnu89-inline"
export CAIRO_LIBS="-L/home/vdevos/cairo/lib -lcairo"
export CAIRO_CFLAGS=-I/home/vdevos/cairo/include/cairo
Issue the following installer commands (without any errors, just fine)
python2.6 ./waf configure --prefix=/home/vdevos/pycairo
python2.6 ./waf build
python2.6 ./waf install
Then when i inspect the generated object file using ldd:
ldd -r /homevdevos/pycairo/lib/pytldd: warning: you do not have execution
permission for
`/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so'
linux-gate.so.1 => (0xffffe000)
libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb77d9000)
libm.so.6 => /lib/libm.so.6 (0xb77b3000)
libpthread.so.0 => /lib/libpthread.so.0 (0xb779b000)
libdl.so.2 => /lib/libdl.so.2 (0xb7797000)
libutil.so.1 => /lib/libutil.so.1 (0xb7792000)
libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0xb761b000)
libc.so.6 => /lib/libc.so.6 (0xb74c0000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7450000)
libz.so.1 => /usr/lib/libz.so.1 (0xb743c000)
libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0xb7415000)
libpng12.so.0 => /home/src/logsystem/graphite/libpng/lib/libpng12.so.0
(0xb73f3000)
libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb73eb000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7324000)
libpixman-1.so.0 =>
/home/src/logsystem/graphite/pixman/lib/libpixman-1.so.0 (0xb7294000)
/lib/ld-linux.so.2 (0xb7860000)
libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7274000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb7265000)
undefined symbol: cairo_surface_get_fallback_resolution
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
undefined symbol: cairo_toy_font_face_get_slant
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
undefined symbol: cairo_scaled_font_get_scale_matrix
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
undefined symbol: cairo_toy_font_face_get_weight
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
undefined symbol: cairo_toy_font_face_get_family
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
undefined symbol: cairo_toy_font_face_create
(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)
hon2.6/site-packages/cairo/_cairo.so
As you can see it uses [/usr/lib/libcairo.so.2] used instead of [/home
/vdevos/cairo/lib/libcairo.so.2].
This is weird because issuing pkg-config tells me it finds: /home/vdevos
/cairo/lib/libcairo.so.2.
2013/5/10 Vincent de Vos <vin.de.vos at gmail.com>
>
> 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!
>
>
>
>
>
>
>
>
--
Met vriendelijke groet,
Vincent de Vos
*[* www.vdevos.nl *|* LinkedIn <http://nl.linkedin.com/in/vdevos1989> *|*
@vdevos <https://twitter.com/#!/vdevos> *]*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo/attachments/20130510/163c6d38/attachment.html>
More information about the cairo
mailing list