After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 319632 - Non buildable pango
Non buildable pango
Status: RESOLVED FIXED
Product: pango
Classification: Platform
Component: general
unspecified
Other Linux
: Normal major
: ---
Assigned To: pango-maint
pango-maint
: 323361 326044 328027 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-10-24 19:11 UTC by Luis Menina
Modified: 2006-03-05 00:54 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Luis Menina 2005-10-24 19:11:27 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'
Comment 1 Luis Menina 2005-10-24 19:22:29 UTC
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

Comment 2 Olav Vitters 2005-10-24 21:09:05 UTC
Build errors are not jhbuilds fault.
Comment 3 Luis Menina 2005-10-24 21:31:55 UTC
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...
Comment 4 Luis Menina 2005-10-25 00:30:41 UTC
Added a temporary workaround here: http://live.gnome.org/JhbuildIssues_2fpango
Comment 5 James Henstridge 2005-10-25 00:32:15 UTC
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.
Comment 6 Luis Menina 2005-10-25 00:54:01 UTC
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
Comment 7 Luis Menina 2005-10-25 01:17:59 UTC
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" ?
Comment 8 James Henstridge 2005-10-25 02:47:03 UTC
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.
Comment 9 Owen Taylor 2005-11-14 06:05:27 UTC
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?
Comment 10 Luis Menina 2005-11-15 17:56:51 UTC
Bug was reported as #5062
http://bugs.freedesktop.org/show_bug.cgi?id=5062
Comment 11 Owen Taylor 2005-12-31 14:34:02 UTC
*** Bug 323361 has been marked as a duplicate of this bug. ***
Comment 12 Behdad Esfahbod 2006-01-07 14:24:42 UTC
*** Bug 326044 has been marked as a duplicate of this bug. ***
Comment 13 James Henstridge 2006-01-22 03:37:46 UTC
*** Bug 328027 has been marked as a duplicate of this bug. ***
Comment 14 Behdad Esfahbod 2006-03-05 00:54:48 UTC
This is fixed in 0.11.x for a while now.