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 339402 - build failure with libpng 1.2.9. Works with 1.2.8
build failure with libpng 1.2.9. Works with 1.2.8
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
unspecified
Other Linux
: Normal normal
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 339485 342588 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2006-04-22 14:12 UTC by George Sherwood
Modified: 2006-05-22 17:46 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description George Sherwood 2006-04-22 14:12:45 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
Comment 1 Sven Neumann 2006-04-22 16:39:21 UTC
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.
Comment 2 George Sherwood 2006-04-22 17:28:10 UTC
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.
Comment 3 Sven Neumann 2006-04-22 19:34:47 UTC
Deprecated or not, they cannot just remove the API.
Comment 4 Manish Singh 2006-04-22 19:45:22 UTC
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.
Comment 5 Manish Singh 2006-04-23 07:01:58 UTC
2006-04-23  Manish Singh  <yosh@gimp.org>

        * plug-ins/common/png.c: don't use long deprecated libpng API.
        Fixes bug #339402.
Comment 6 Manish Singh 2006-04-23 07:20:34 UTC
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.
Comment 7 Karine Delvare 2006-04-23 18:51:38 UTC
*** Bug 339485 has been marked as a duplicate of this bug. ***
Comment 8 Manish Singh 2006-05-22 17:46:39 UTC
*** Bug 342588 has been marked as a duplicate of this bug. ***