GNOME Bugzilla – Bug 319632
Non buildable pango
Last modified: 2006-03-05 00:54:48 UTC
Distribution/Version: Mandriva 2006 I can't have pango building because of a problem with cairosimple.c libpangocairo is used, but one function, 'cairo_surface_write_to_png', can't be found... I have no moduleset defined in my ~/.jhbuildrc, so I think i'm using the latest version in CVS of each module... Had the problem a few weeks ago, thought it was a cvs inconsistency, but the problem is still there... Feel free to ask for more information, I just can't have the full desktop without pango... cairosimple.c: In function 'main': cairosimple.c:82: warning: implicit declaration of function 'cairo_surface_write_to_png' /bin/sh ../libtool --mode=link gcc -g -O2 -Wall -o cairosimple cairosimple.o ../pango/libpango-1.0.la ../pango/libpangocairo-1.0.la -L/opt/gnome2/lib -lfreetype -lz -lcairo gcc -g -O2 -Wall -o .libs/cairosimple cairosimple.o ../pango/.libs/libpango-1.0.so -L/opt/gnome2/lib ../pango/.libs/libpangocairo-1.0.so -L/usr/X11R6/lib /home/liberforce/cvs/gnome2/pango/pango/.libs/libpangoft2-1.0.so /home/liberforce/cvs/gnome2/pango/pango/.libs/libpango-1.0.so /opt/gnome2/lib/libgobject-2.0.so /opt/gnome2/lib/libgmodule-2.0.so -ldl /opt/gnome2/lib/libglib-2.0.so /opt/gnome2/lib/libcairo.so /opt/gnome2/lib/libXrender.so -lX11 /opt/gnome2/lib/libfontconfig.so /usr/lib/libexpat.so /usr/lib/libfreetype.so -lz -lm -Wl,--rpath -Wl,/opt/gnome2/lib cairosimple.o: In function `main': /home/liberforce/cvs/gnome2/pango/examples/cairosimple.c:82: undefined reference to `cairo_surface_write_to_png'
Met someone else (teuf) 2 hours ago on #gnome-love that had the same problem: (19:23:18) liberforce: /home/liberforce/cvs/gnome2/pango/examples/cairosimple.c:82: undefined reference to `cairo_surface_write_to_png' (19:24:30) teuf: liberforce: I removed examples/ from the Makefile when that happened to me
Build errors are not jhbuilds fault.
Well, I know this, but on http://live.gnome.org/JhbuildIssues the product specified for every kind of problem using jhbuild... is jhbuild. I just followed the procedure written there...
Added a temporary workaround here: http://live.gnome.org/JhbuildIssues_2fpango
Did you have the libpng headers installed on your system when building Cairo? If that symbol is missing, then it probably means that the Cairo PNG support was disabled during the build.
hum... how stupid... I didn't notice that the definition was enclosed in an #if CAIRO_HAS_PNG_FUNCTIONS / #endif statement But yes, I have libpng installed... [liberforce@liberforce src]$ rpm -ql libpng3-devel /usr/bin/libpng-config /usr/bin/libpng12-config /usr/include/libpng /usr/include/libpng12 /usr/include/libpng12/png.h /usr/include/libpng12/pngconf.h /usr/include/png.h /usr/include/pngconf.h /usr/lib/libpng.so /usr/lib/libpng12.so /usr/lib/pkgconfig/libpng.pc /usr/lib/pkgconfig/libpng12.pc /usr/share/doc/libpng3-devel-1.2.8 /usr/share/doc/libpng3-devel-1.2.8/CHANGES /usr/share/doc/libpng3-devel-1.2.8/README /usr/share/doc/libpng3-devel-1.2.8/TODO /usr/share/doc/libpng3-devel-1.2.8/example.c /usr/share/doc/libpng3-devel-1.2.8/libpng.txt /usr/share/man/man3/libpng.3.bz2 /usr/share/man/man3/libpngpf.3.bz2
yes, you were right... When compiling cairo, I didn't see this warning: configure: WARNING: Could not find libpng in the pkg-config search path configure: WARNING: *** To run the tests, cairo must be built with png support *** Solution: copy the libpng pkg-config files... and rebuild cairo, then pango [liberforce@liberforce cairo]$ rpm -ql libpng3-devel | grep .pc /usr/lib/pkgconfig/libpng.pc /usr/lib/pkgconfig/libpng12.pc [liberforce@liberforce cairo]$ echo $PKG_CONFIG_PATH /opt/gnome2/lib/pkgconfig:/opt/gnome2/share/pkgconfig [liberforce@liberforce cairo]$ cp /usr/lib/pkgconfig/libpng*.pc /opt/gnome2/share/pkgconfig then : jhbuild buildone cairo pango and it works :-) , thanks for your hint, James So what can be done ? Can this be considered as a "bug" ?
Maybe the pango configure script should check for PNG support in Cairo, and only build the example if it is supported. The alternative would be for Cairo to treat a missing PNG lib as a hard error.
I think cairo should build without PNG only in the same way that GTK+ does: - The user has to explicitly turn it off on the configure line - The user gets warned that building without PNG will not give you a fully functional cairo library. It's really silly for apps to have to test for Cairo having PNG support before using it. Can you file a bug in bugs.freedesktop.org against cairo?
Bug was reported as #5062 http://bugs.freedesktop.org/show_bug.cgi?id=5062
*** Bug 323361 has been marked as a duplicate of this bug. ***
*** Bug 326044 has been marked as a duplicate of this bug. ***
*** Bug 328027 has been marked as a duplicate of this bug. ***
This is fixed in 0.11.x for a while now.