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 607242 - GIMP 2.7.0 fails to build against libpng 1.4.0
GIMP 2.7.0 fails to build against libpng 1.4.0
Status: RESOLVED FIXED
Product: GIMP
Classification: Other
Component: Plugins
2.7.0
Other All
: Normal major
: 2.6
Assigned To: GIMP Bugs
GIMP Bugs
: 622198 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2010-01-17 18:44 UTC by skottish
Modified: 2010-06-20 14:59 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
libpng 1.4 patch against gimp 2.7.0 (931 bytes, patch)
2010-01-20 02:43 UTC, eric
needs-work Details | Review

Description skottish 2010-01-17 18:44:14 UTC
GIMP 2.7.0 fails to build against libpng 1.4.0:

make[3]: Entering directory `/home/skottish/pkgbuilds/gimp-devel/src/gimp-2.7.0/plug-ins/file-ico'
  CC     file_ico-ico.o
  CC     file_ico-ico-dialog.o
  CC     file_ico-ico-load.o
ico-load.c: In function ‘ico_read_png’:
ico-load.c:289: warning: implicit declaration of function ‘png_set_gray_1_2_4_to_8’
  CC     file_ico-ico-save.o
  CCLD   file-ico
file_ico-ico-load.o: In function `ico_read_png':
ico-load.c:(.text+0x399): undefined reference to `png_set_gray_1_2_4_to_8'
ico-load.c:(.text+0x42d): undefined reference to `png_set_gray_1_2_4_to_8'
collect2: ld returned 1 exit status
make[3]: *** [file-ico] Error 1
make[3]: Leaving directory `/home/skottish/pkgbuilds/gimp-devel/src/gimp-2.7.0/plug-ins/file-ico'
make[2]: *** [all-recursive] Error 1

-->><<--

64 bit Arch Linux

gcc 4.4.2-4
binutils 2.20-3
Comment 1 Michael Schumacher 2010-01-18 11:38:31 UTC
http://www.libpng.org/pub/png/src/libpng-1.2.x-to-1.4.x-summary.txt

"  m. The function png_set_gray_1_2_4_to_8() was removed. It has been
      deprecated since libpng-1.0.18 and 1.2.9, when it was replaced with
      png_set_expand_gray_1_2_4_to_8() because the former function also
      expanded palette images."

Do you want to provide the patch (against git, if possible)?
Comment 2 eric 2010-01-20 02:43:02 UTC
Created attachment 151806 [details] [review]
libpng 1.4 patch against gimp 2.7.0
Comment 3 Michael Schumacher 2010-01-20 08:19:40 UTC
Review of attachment 151806 [details] [review]:

This function has been deprecated for some time, maybe this can even be replaced unconditionally? And can you provide a git-formatted patch?
Comment 4 André Klapper 2010-01-23 20:57:19 UTC
(In reply to comment #3)
> can you provide a git-formatted patch?

See http://live.gnome.org/Git/Developers
Comment 5 Michael Natterer 2010-01-31 11:00:27 UTC
Fixed differently in master:

commit 2db98792dcb466ef432ffe15a249466609beba45
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Jan 31 11:56:36 2010 +0100

    Bug 607242 - GIMP 2.7.0 fails to build against libpng 1.4.0
    
    Depend on the libpng version that is in debian testing (1.2.42) and
    use png_set_expand_gray_1_2_4_to_8() instead of the deprecated
    png_set_gray_1_2_4_to_8().

 configure.ac                 |    3 ++-
 plug-ins/file-ico/ico-load.c |    4 ++--
 2 files changed, 4 insertions(+), 3 deletions(-)
Comment 6 Michael Natterer 2010-01-31 11:32:37 UTC
Fixed in 2.6 too, using a slightly changed version of the attached patch:

commit b22eb0a8271a99257fe214cbf0adda29cf9a39dd
Author: Michael Natterer <mitch@gimp.org>
Date:   Sun Jan 31 12:28:02 2010 +0100

    Bug 607242 - GIMP 2.7.0 fails to build against libpng 1.4.0
    
    Use png_set_expand_gray_1_2_4_to_8() instead of the deprecated
    png_set_gray_1_2_4_to_8() if libpng is at least 1.2.27 (which is in
    debian stable), so plug-ins built against old versions contine to work
    when libpng 1.4 gets installed.

 plug-ins/file-ico/ico-load.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
Comment 7 Michael Schumacher 2010-06-20 14:59:58 UTC
*** Bug 622198 has been marked as a duplicate of this bug. ***