Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 354985

Summary: media-gfx/gimp-2.6.11: compilation fails with media-libs/libpng-1.5.x
Product: Gentoo Linux Reporter: Lars Wendler (Polynomial-C) (RETIRED) <polynomial-c>
Component: Current packagesAssignee: Hanno Böck <hanno>
Status: RESOLVED FIXED    
Severity: normal CC: renatogallo
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
URL: https://bugzilla.gnome.org/show_bug.cgi?id=640409
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 354557    
Bug Blocks: 354479    
Attachments: libpng-1.5 support

Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2011-02-15 09:22:39 UTC
i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -pthread -DQT_SHARED -
I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/i
nclude/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/inclu
de/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/f
reetype2 -I/usr/include/libpng15 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore   -I/usr/include  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -march=barcelona -O2 -pipe -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -MT file-mng.o -MD -MP -MF .deps/file-mng.Tpo -c -o file-mng.o file-mng.c
file-mng.c: In function ‘mng_save_image’:
file-mng.c:972:11: error: dereferencing pointer to incomplete type
file-mng.c:984:19: error: dereferencing pointer to incomplete type
file-mng.c:985:19: error: dereferencing pointer to incomplete type
file-mng.c:986:19: error: dereferencing pointer to incomplete type
file-mng.c:987:19: error: dereferencing pointer to incomplete type
file-mng.c:992:23: error: dereferencing pointer to incomplete type
file-mng.c:995:23: error: dereferencing pointer to incomplete type
file-mng.c:998:23: error: dereferencing pointer to incomplete type
file-mng.c:1001:23: error: dereferencing pointer to incomplete type
file-mng.c:1004:23: error: dereferencing pointer to incomplete type
file-mng.c:1005:23: error: dereferencing pointer to incomplete type
file-mng.c:1006:23: error: dereferencing pointer to incomplete type
file-mng.c:1008:23: error: dereferencing pointer to incomplete type
file-mng.c:1011:23: error: dereferencing pointer to incomplete type
file-mng.c:1024:24: error: dereferencing pointer to incomplete type
file-mng.c:1026:27: error: dereferencing pointer to incomplete type
file-mng.c:1027:25: error: dereferencing pointer to incomplete type
file-mng.c:1028:32: error: dereferencing pointer to incomplete type
file-mng.c:1029:25: error: dereferencing pointer to incomplete type
file-mng.c:1030:32: error: dereferencing pointer to incomplete type
file-mng.c:1031:25: error: dereferencing pointer to incomplete type
file-mng.c:1041:24: error: dereferencing pointer to incomplete type
file-mng.c:1042:24: error: dereferencing pointer to incomplete type
file-mng.c:1068:32: error: dereferencing pointer to incomplete type
file-mng.c:1080:35: error: dereferencing pointer to incomplete type
file-mng.c:1234:17: warning: ignoring return value of ‘fread’, declared with attribute warn_unused_result
make[3]: *** [file-mng.o] Error 1


There is an upstream bug (see URL) with a patch that has some compatibility fixes but unfortunately it doesn't fix the error shown above.
Comment 1 Jory A. Pratt gentoo-dev 2011-02-16 04:57:23 UTC
Created attachment 262679 [details, diff]
libpng-1.5 support

This is the latest upstream patch, working fine have been using gimp with libpng-1.5 for a few hours now.
Comment 2 Hanno Böck gentoo-dev 2011-02-16 11:18:49 UTC
anarchy: this patch is incomplete, only works with -mng.

Anyway, now an mng patch is also in the upstream bug report, so I committed it.
Comment 3 Rafał Mużyło 2011-02-16 14:35:27 UTC
The committed patch is incomplete:
file-png.c:657:3: warning: ‘jmpbuf’ is deprecated (declared at /usr/include/libpng14/png.h:1104)
file-png.c: In function ‘load_image’:
file-png.c:1098:5: warning: passing argument 5 of ‘png_get_iCCP’ from incompatible pointer type
/usr/include/libpng14/png.h:2379:14: note: expected ‘png_charpp’ but argument is of type ‘png_byte **’
Comment 4 Rafał Mużyło 2011-02-16 14:50:07 UTC
Well, OK, so perhaps it is complete in a way:
line 657 is covered by the patch only for libpng 1.5 (I'm testing it with 1.4),
if it was in the form 'longjmp (png_jmpbuf(png_ptr), 1);', it would still work for >=libpng-1.2
It's bit silly though, as later lines use png_jmpbuf without any guards

The other line is a different matter, likely unrelated to libpng upgrade.

Feel free to re-resolved it as fixed, unless you want to address this.
Comment 5 Rafał Mużyło 2011-02-16 17:46:44 UTC
OK, so that second line is actually a libpng 1.5 problem - that function has changed its signature - c++ programs will simply love it.
Comment 6 Hanno Böck gentoo-dev 2011-04-20 06:35:08 UTC
Should now be fixed for good, please refer with the best longterm solution to the upstream bug report.
Comment 7 Hanno Böck gentoo-dev 2011-04-20 06:35:18 UTC
done
Comment 8 renato gallo 2011-05-06 14:40:57 UTC
libtool: link: x86_64-pc-linux-gnu-gcc -O2 -pipe -march=native -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -Wl,-O1 -o .libs/file-html-table file-html-table.o -pthread  -Wl,--as-needed ../../libgimp/.libs/libgimpui-2.0.so ../../libgimpwidgets/.libs/libgimpwidgets-2.0.so ../../libgimpmodule/.libs/libgimpmodule-2.0.so ../../libgimp/.libs/libgimp-2.0.so ../../libgimpmath/.libs/libgimpmath-2.0.so ../../libgimpconfig/.libs/libgimpconfig-2.0.so ../../libgimpcolor/.libs/libgimpcolor-2.0.so ../../libgimpbase/.libs/libgimpbase-2.0.so -lgtk-x11-2.0 -lgdk-x11-2.0 /usr/lib64/libatk-1.0.so /usr/lib64/libgio-2.0.so -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng15 -lpango-1.0 /usr/lib64/libfreetype.so /usr/lib64/libfontconfig.so /usr/lib64/libgobject-2.0.so /usr/lib64/libgmodule-2.0.so /usr/lib64/libgthread-2.0.so -lrt /usr/lib64/libglib-2.0.so -pthread
x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -I../.. -pthread -D_REENTRANT -DQT_SHARED -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/directfb -I/usr/include/libpng15 -I/usr/include/qt4 -I/usr/include/qt4/QtGui -I/usr/include/libdrm -I/usr/include/qt4/QtCore   -I/usr/include  -DGIMP_DISABLE_DEPRECATED -DGDK_MULTIHEAD_SAFE -DGTK_MULTIHEAD_SAFE  -O2 -pipe -march=native -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wold-style-definition -MT file-mng.o -MD -MP -MF .deps/file-mng.Tpo -c -o file-mng.o file-mng.c
file-mng.c: In function 'mng_save_image':
file-mng.c:972: error: dereferencing pointer to incomplete type
file-mng.c:984: error: dereferencing pointer to incomplete type
file-mng.c:985: error: dereferencing pointer to incomplete type
file-mng.c:986: error: dereferencing pointer to incomplete type
file-mng.c:987: error: dereferencing pointer to incomplete type
file-mng.c:992: error: dereferencing pointer to incomplete type
file-mng.c:995: error: dereferencing pointer to incomplete type
file-mng.c:998: error: dereferencing pointer to incomplete type
file-mng.c:1001: error: dereferencing pointer to incomplete type
file-mng.c:1004: error: dereferencing pointer to incomplete type
file-mng.c:1005: error: dereferencing pointer to incomplete type
file-mng.c:1006: error: dereferencing pointer to incomplete type
file-mng.c:1008: error: dereferencing pointer to incomplete type
file-mng.c:1011: error: dereferencing pointer to incomplete type
file-mng.c:1024: error: dereferencing pointer to incomplete type
file-mng.c:1026: error: dereferencing pointer to incomplete type
file-mng.c:1027: error: dereferencing pointer to incomplete type
file-mng.c:1028: error: dereferencing pointer to incomplete type
file-mng.c:1029: error: dereferencing pointer to incomplete type
file-mng.c:1030: error: dereferencing pointer to incomplete type
file-mng.c:1031: error: dereferencing pointer to incomplete type
file-mng.c:1041: error: dereferencing pointer to incomplete type
file-mng.c:1042: error: dereferencing pointer to incomplete type
file-mng.c:1068: error: dereferencing pointer to incomplete type
file-mng.c:1080: error: dereferencing pointer to incomplete type
file-mng.c:1234: warning: ignoring return value of 'fread', declared with attribute warn_unused_result
make[3]: *** [file-mng.o] Error 1
make[3]: Leaving directory `/var/tmp/portage/media-gfx/gimp-2.6.11-r2/work/gimp-2.6.11/plug-ins/common'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/media-gfx/gimp-2.6.11-r2/work/gimp-2.6.11/plug-ins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/media-gfx/gimp-2.6.11-r2/work/gimp-2.6.11'
make: *** [all] Error 2
emake failed
 * ERROR: media-gfx/gimp-2.6.11-r2 failed (compile phase)
Comment 9 renato gallo 2011-05-06 14:41:58 UTC
emerge --info
Portage 2.1.9.42 (default/linux/amd64/10.0, gcc-4.4.5, libc-0-r0, 2.6.38-gentoo-r3 x86_64)
=================================================================
System uname: Linux-2.6.38-gentoo-r3-x86_64-Intel-R-_Core-TM-_i5_CPU_760_@_2.80GHz-with-gentoo-2.0.2
Timestamp of tree: Fri, 06 May 2011 11:45:01 +0000
app-shells/bash:     4.1_p9
dev-java/java-config: 2.1.11-r3
dev-lang/python:     2.7.1-r1, 3.1.3-r1
dev-util/cmake:      2.8.4-r1
sys-apps/baselayout: 2.0.2
sys-apps/openrc:     0.8.2-r1::poly-c
sys-apps/sandbox:    2.4
sys-devel/autoconf:  2.13, 2.65-r1
sys-devel/automake:  1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.20.1-r1
sys-devel/gcc:       4.4.5
sys-devel/gcc-config: 1.4.1-r1
sys-devel/libtool:   2.2.10
sys-devel/make:      3.81-r2
sys-kernel/linux-headers: 2.6.36.1
sys-libs/glibc:      2.11.3
virtual/os-headers:  0
ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -march=native"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/config /usr/share/gnupg/qualified.txt /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -march=native"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests binpkg-logs distlocks fixlafiles fixpackages news parallel-fetch protect-owned sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS=""
GENTOO_MIRRORS="http://mirror.switch.ch/ftp/mirror/gentoo/"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LINGUAS="nb"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/var/lib/layman/luksans-arduino /var/lib/layman /var/lib/layman/vmware /var/lib/layman/zugaina /var/lib/layman/wirelay /var/lib/layman/stuff /var/lib/layman/sabayon /var/lib/layman/nikai /var/lib/layman/dev-zero /var/lib/layman/pentoo /var/lib/layman/damex-overlay /var/lib/layman/nelchael /var/lib/layman/pcsx2 /var/lib/layman/poly-c /var/lib/layman/sunrise /var/lib/layman/amielke-overlay /var/lib/layman/benf"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="3dnow X a52 aac aacs aalib acl alsa amd64 apng ares atmo auto-hinter bash-completion berkdb bidi bittorrent bl bluetooth bluray bs2b bzip2 cairo cdda cddb cdparanoia cdr cjk cli cracklib crypt cups curl cxx dbus dc1394 desktopglobe devfs-compat device-mapper dga dirac directfb dri dts dv dvb dvd dvdr eds encode examples exif expat extras faac fbcon ffmpeg flac fluidsynth fontconfig fontforge foomaticdb fortran frei0r ftp gd gdbm gdu ggi gif gimp gles glsl gme gnome gnome-keyring gphoto2 gpm gsm gstreamer gtk httpd iconv id3tag ieee1394 imagemagick ipod ipv6 java jce jpeg jpeg2k kate kde kdrive ladspa lame lapack lcms ldap libass libcaca libmpeg2 libnotify libproxy libtiger libv4l2 lirc live lua lzma lzo mad matroska md5sum metalink mjpeg mmx mng modplug modules mp3 mpeg mpg123 mtp mudflap multilib musepack musicbrainz nas nautilus ncurses network nls nptl nptlonly nsplugin nspluginwrapper nut nuv odbc odk ogg openexr opengl openmp openvg optimisememory oss pam pango pasteafter pcre pdf perl phonon php plasma playlist png pnm postproc ppds pppd projectm ps pvr python qalculate qt-faststart qt4 quicktime qwt radio raw readline reiserfs remoteosd rtmp rtsp run-as-root samba schroedinger scim screensaver script scripts sdk sdl sdl-image semantic-desktop session shine shout skins smp sqlite sse sse2 ssl ssse3 startup-notification stream svg sysfs system-libvncserver taglib tcpd templates tga theora threads tiff tilepath tk tools truetype truetype-debugger twolame type3 udev unicode upnp usb utils v4l2 vaapi vcdx vdpau vix vlm vmware_guest_freebsd vmware_guest_linux vmware_guest_netware vmware_guest_solaris vmware_guest_winPre2k vmware_guest_windows vorbis vpx webkit wma-fixed wmf x264 xanim xcb xine xinerama xml xmlrpc xmp xorg xosd xv xvid xvmc yv12 zlib zvbi" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="ptp2 adc65 agfa_cl20 aox ax203 barbie canon casio_qv clicksmart310 digigr8 digita dimagev dimera3500 directory enigma13 fuji gsmart300 hp215 iclick jamcam jd11 jl2005a kodak_dc120 kodak_dc210 kodak_dc240 kodak_dc3200 kodak_ez200 konica konica_qm150 largan lg_gsm mars mustek panasonic_coolshot panasonic_dc1000 panasonic_dc1580 panasonic_l859 pccam300 pccam600 polaroid_pdc320 polaroid_pdc640 polaroid_pdc700 ricoh ricoh_g3 samsung sierra sipix_blink sipix_blink2 sipix_web2 smal sonix sony_dscf1 sony_dscf55 soundvision spca50x sq905 st2205 stv0674 stv0680 sx330z template topfield toshiba_pdrm11" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="nb" PHP_TARGETS="php5-3" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, MAKEOPTS, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS