GNOME Bugzilla – Bug 339402
build failure with libpng 1.2.9. Works with 1.2.8
Last modified: 2006-05-22 17:46:39 UTC
After updating libpng to version 1.2.9 gimp 2.2.11 and 2.2.10 fails to build with this error: if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../.. -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/ glib-2.0/include -I/usr/include/freetype2 -I/usr/X11R6/include -I/usr/include -I/usr/include -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE -O -march=athlon-xp -mmmx -mfpmath =sse -msse -m3dnow -pipe -O3 -fomit-frame-pointer -Wall -MT png.o -MD -MP -MF ".deps/png.Tpo" -c -o png.o png.c; \ then mv -f ".deps/png.Tpo" ".deps/png.Po"; else rm -f ".deps/png.Tpo"; exit 1; fi /bin/sh ../../libtool --tag=CC --mode=link gcc -O -march=athlon-xp -mmmx -mfpmath=sse -msse -m3dnow -pipe -O3 -fomit-frame-pointer -Wall -s -o png png.o ../../libgimp/libgimpui-2.0.la ../../libgimpw idgets/libgimpwidgets-2.0.la ../../libgimp/libgimp-2.0.la ../../libgimpcolor/libgimpcolor-2.0.la ../../libgimpbase/libgimpbase-2.0.la -lpng -lz -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -l m -lpangocairo-1.0 -lpango-1.0 -lcairo -lgobject-2.0 -lgmodule-2.0 -ldl -lglib-2.0 gcc -O -march=athlon-xp -mmmx -mfpmath=sse -msse -m3dnow -pipe -O3 -fomit-frame-pointer -Wall -s -o .libs/png png.o ../../libgimp/.libs/libgimpui-2.0.so ../../libgimpwidgets/.libs/libgimpwidgets-2.0.s o ../../libgimp/.libs/libgimp-2.0.so ../../libgimpcolor/.libs/libgimpcolor-2.0.so ../../libgimpbase/.libs/libgimpbase-2.0.so /usr/lib/libpng12.so -lz /usr/lib/libgtk-x11-2.0.so /usr/lib/libgdk-x11-2.0. so /usr/lib/libatk-1.0.so /usr/lib/libgdk_pixbuf-2.0.so -lm /usr/lib/libpangocairo-1.0.so /usr/lib/libpango-1.0.so /usr/lib/libcairo.so /usr/lib/libgobject-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/l ib/libglib-2.0.so make[3]: Leaving directory `/usr/src/gimp-2.2.10/plug-ins/common' make[2]: Leaving directory `/usr/src/gimp-2.2.10/plug-ins' make[1]: Leaving directory `/usr/src/gimp-2.2.10' png.o: In function `load_image': png.c:(.text+0x8f7): undefined reference to `png_read_destroy' png.o: In function `save_image': png.c:(.text+0x18c2): undefined reference to `png_write_destroy' collect2: ld returned 1 exit status make[3]: *** [png] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 Downgrading to libpng 1.2.8 fixes the problem. make: *** [all] Error 2
Then obviously libpng 1.2.9 breaks compatibility (but perhaps it is only broken in your installation). Why do you report this here? You should file a bug-report against libpng.
The reason I reported he is because it looks like load_image save_image are being deprecated in libpng. At least according to this message: http://sourceforge.net/mailarchive/message.php?msg_id=12848112 Just trying to give you a heads up. It isn't just broke on my installation.
Deprecated or not, they cannot just remove the API.
Looks like it's been deprecated since libpng 1.0.0. We shouldn't be using this function. It looks like they only recently landed mechanism to enforce private API. Private API shouldn't be in public headers, libpng is definately in the wrong there. If they'd done things sanely this would've been noticed long ago.
2006-04-23 Manish Singh <yosh@gimp.org> * plug-ins/common/png.c: don't use long deprecated libpng API. Fixes bug #339402.
And on HEAD: 2006-04-23 Manish Singh <yosh@gimp.org> * plug-ins/common/png.c: don't use long deprecated libpng API, and drop support for ancient libpng versions. Fixes bug #339402. * configure.in: use pkg-config to detect libpng. This means we now require at least libpng 1.2.2, but that's over four years old, so that shouldn't be that big a deal.
*** Bug 339485 has been marked as a duplicate of this bug. ***
*** Bug 342588 has been marked as a duplicate of this bug. ***