<div dir="ltr">It seems that when i try to build using that "waf" installer thingy, the linking goes bad...<div><br></div><div style>I have setup the following environment variables:</div><div style><div><br>export CFLAGS="-lpython2.6 -fgnu89-inline"</div>
<div>export CAIRO_LIBS="-L/home/vdevos/cairo/lib -lcairo"</div><div>export CAIRO_CFLAGS=-I/home/vdevos/cairo/include/cairo</div><div><br></div><div style>Issue the following installer commands (without any errors, just fine)</div>
<div style><div>python2.6 ./waf configure --prefix=/home/vdevos/pycairo<br></div><div>python2.6 ./waf build<br></div><div>python2.6 ./waf install<br></div><div><br></div><div style>Then when i inspect the generated object file using ldd:</div>
<div>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'</div><div><span class="" style="white-space:pre"> </span>linux-gate.so.1 => (0xffffe000)</div>
<div><span class="" style="white-space:pre"> </span>libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb77d9000)</div><div><span class="" style="white-space:pre"> </span>libm.so.6 => /lib/libm.so.6 (0xb77b3000)</div><div><span class="" style="white-space:pre"> </span>libpthread.so.0 => /lib/libpthread.so.0 (0xb779b000)</div>
<div><span class="" style="white-space:pre"> </span>libdl.so.2 => /lib/libdl.so.2 (0xb7797000)</div><div><span class="" style="white-space:pre"> </span>libutil.so.1 => /lib/libutil.so.1 (0xb7792000)</div><div><span class="" style="white-space:pre"> </span>libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0xb761b000)</div>
<div><span class="" style="white-space:pre"> </span>libc.so.6 => /lib/libc.so.6 (0xb74c0000)</div><div><span class="" style="white-space:pre"> </span>libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7450000)</div><div>
<span class="" style="white-space:pre"> </span>libz.so.1 => /usr/lib/libz.so.1 (0xb743c000)</div><div><span class="" style="white-space:pre"> </span>libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0xb7415000)</div>
<div><span class="" style="white-space:pre"> </span>libpng12.so.0 => /home/src/logsystem/graphite/libpng/lib/libpng12.so.0 (0xb73f3000)</div><div><span class="" style="white-space:pre"> </span>libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb73eb000)</div>
<div><span class="" style="white-space:pre"> </span>libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb7324000)</div><div><span class="" style="white-space:pre"> </span>libpixman-1.so.0 => /home/src/logsystem/graphite/pixman/lib/libpixman-1.so.0 (0xb7294000)</div>
<div><span class="" style="white-space:pre"> </span>/lib/ld-linux.so.2 (0xb7860000)</div><div><span class="" style="white-space:pre"> </span>libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7274000)</div><div><span class="" style="white-space:pre"> </span>libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb7265000)</div>
<div>undefined symbol: cairo_surface_get_fallback_resolution<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div><div>undefined symbol: cairo_toy_font_face_get_slant<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div>
<div>undefined symbol: cairo_scaled_font_get_scale_matrix<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div><div>undefined symbol: cairo_toy_font_face_get_weight<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div>
<div>undefined symbol: cairo_toy_font_face_get_family<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div><div>undefined symbol: cairo_toy_font_face_create<span class="" style="white-space:pre"> </span>(/home/src/logsystem/graphite/pycairo/lib/python2.6/site-packages/cairo/_cairo.so)</div>
<div>hon2.6/site-packages/cairo/_cairo.so<br></div><div><br></div><div>As you can see it uses [<span style="font-size:13px;font-family:arial,sans-serif">/usr/lib/libcairo.so.2] </span><span style="font-size:13px;font-family:arial,sans-serif">used instead of [</span><span style="font-size:13px;font-family:arial,sans-serif">/home</span><span style="font-size:13px;font-family:arial,sans-serif">/vdevos</span><span style="font-size:13px;font-family:arial,sans-serif">/cairo</span><span style="font-size:13px;font-family:arial,sans-serif">/lib</span><span style="font-size:13px;font-family:arial,sans-serif">/</span><span style="font-size:13px;font-family:arial,sans-serif">libcairo.so.2]. </span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><font face="arial, sans-serif">This is weird because issuing pkg-config tells me it finds: </font><span style="font-size:13px;font-family:arial,sans-serif">/home</span><span style="font-size:13px;font-family:arial,sans-serif">/vdevos</span><span style="font-size:13px;font-family:arial,sans-serif">/cairo</span><span style="font-size:13px;font-family:arial,sans-serif">/lib</span><span style="font-size:13px;font-family:arial,sans-serif">/</span><span style="font-size:13px;font-family:arial,sans-serif">libcairo.so.2.</span></div>
</div><div style><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div style><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div style><span style="font-size:13px;font-family:arial,sans-serif"><br>
</span></div></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">2013/5/10 Vincent de Vos <span dir="ltr"><<a href="mailto:vin.de.vos@gmail.com" target="_blank">vin.de.vos@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div><br></div><div>After building py2cairo-1.10.0 with the following:</div><div>> export PYTHON=/usr/bin/python2.6</div><div>> python2.6 ./waf configure --prefix=$HOME<br></div>
<div>> python2.6 ./waf build</div><div>> python2.6 ./waf install<br></div><div><br></div><div>I get the following errors after importing cairo with the following:</div><div>cd $HOME/pycairo/lib/python2.6/site-packages/cairo</div>
<div>python2.6<br></div><div>>> import cairo</div><div><div>>> ImportError: ./cairo.so: undefined symbol: cairo_surface_get_fallback_resolution</div><div><br></div><div>ldd -r cairo.so gives:</div>
<div><div>ldd: warning: you do not have execution permission for `./cairo.so'</div><div><span style="white-space:pre-wrap"> </span>linux-gate.so.1 => (0xffffe000)</div><div><span style="white-space:pre-wrap"> </span>libcairo.so.2 => /usr/lib/libcairo.so.2 (0xb7769000)</div>
<div><span style="white-space:pre-wrap"> </span>libm.so.6 => /lib/libm.so.6 (0xb7743000)</div><div><span style="white-space:pre-wrap"> </span>libpthread.so.0 => /lib/libpthread.so.0 (0xb772b000)</div><div><span style="white-space:pre-wrap"> </span>libdl.so.2 => /lib/libdl.so.2 (0xb7727000)</div>
<div><span style="white-space:pre-wrap"> </span>libutil.so.1 => /lib/libutil.so.1 (0xb7722000)</div><div><span style="white-space:pre-wrap"> </span>libpython2.6.so.1.0 => /usr/lib/libpython2.6.so.1.0 (0xb75ab000)</div>
<div><span style="white-space:pre-wrap"> </span>libc.so.6 => /lib/libc.so.6 (0xb7450000)</div><div><span style="white-space:pre-wrap"> </span>libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb73e0000)</div><div>
<span style="white-space:pre-wrap"> </span>libz.so.1 => /usr/lib/libz.so.1 (0xb73cc000)</div><div><span style="white-space:pre-wrap"> </span>libfontconfig.so.1 => /usr/X11R6/lib/libfontconfig.so.1 (0xb73a5000)</div>
<div><span style="white-space:pre-wrap"> </span>libpng12.so.0 => /home/vdevos/libpng/lib/libpng12.so.0 (0xb7383000)</div><div><span style="white-space:pre-wrap"> </span>libXrender.so.1 => /usr/X11R6/lib/libXrender.so.1 (0xb737b000)</div>
<div><span style="white-space:pre-wrap"> </span>libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0xb72b4000)</div><div><span style="white-space:pre-wrap"> </span>libpixman-1.so.0 => /home/vdevos/pixman/lib/libpixman-1.so.0 (0xb7224000)</div>
<div><span style="white-space:pre-wrap"> </span>/lib/ld-linux.so.2 (0xb77f0000)</div><div><span style="white-space:pre-wrap"> </span>libexpat.so.0 => /usr/lib/libexpat.so.0 (0xb7204000)</div><div><span style="white-space:pre-wrap"> </span>libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0xb71f5000)</div>
<div>undefined symbol: cairo_surface_get_fallback_resolution<span style="white-space:pre-wrap"> </span>(./cairo.so)</div><div>undefined symbol: cairo_toy_font_face_get_slant<span style="white-space:pre-wrap"> </span>(./cairo.so)</div>
<div>undefined symbol: cairo_scaled_font_get_scale_matrix<span style="white-space:pre-wrap"> </span>(./cairo.so)</div><div>undefined symbol: cairo_toy_font_face_get_weight<span style="white-space:pre-wrap"> </span>(./cairo.so)</div>
<div>undefined symbol: cairo_toy_font_face_get_family<span style="white-space:pre-wrap"> </span>(./cairo.so)</div><div>undefined symbol: cairo_toy_font_face_create<span style="white-space:pre-wrap"> </span>(./cairo.so)</div>
<div><br></div><div>I'm using the following version of Python and Cairo:</div><div><br></div><div>pkg-config --modversion cairo: <br></div></div><div>1.12.14</div></div><div><br></div><div>python --version</div>
<div>Python 2.6.4</div><div><br></div><div>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).</div>
<div><br></div><div>Thanks in advance!</div><div><br></div><div><br></div><div><br></div><div><br></div><br clear="all"><div><br></div><br>
</div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><span style="font-family:verdana,sans-serif"><font color="#333333">Met vriendelijke groet,</font></span></div><div><span style="font-family:verdana,sans-serif"><font color="#333333"><br>
</font></span></div><div><span style="font-family:verdana,sans-serif"><font color="#333333">Vincent de Vos</font></span></div><div><span style="font-family:verdana,sans-serif"><font color="#333333"><br></font></span></div>
<div><span style="font-family:verdana,sans-serif"><b><font color="#666666">[</font></b><font color="#333333"> </font><a href="http://www.vdevos.nl" style="color:rgb(51,51,51)" target="_blank">www.vdevos.nl</a> <b><font color="#666666">|</font></b> <a href="http://nl.linkedin.com/in/vdevos1989" style="color:rgb(51,51,51)" target="_blank">LinkedIn</a><font color="#333333"> </font><b><font color="#666666">|</font></b><font color="#333333"> </font></span><a href="https://twitter.com/#!/vdevos" style="color:rgb(51,51,51);font-family:verdana,sans-serif" target="_blank">@vdevos</a><font color="#333333"> </font><b><font color="#666666">]</font></b></div>
</div>