First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 136452
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Karol Wojtaszek (RETIRED) <sekretarz@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: David Nadlinger <david.nadlinger@gmail.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
imagemagick-pnglib-version.patch Patch that works for me - not sure if it is correct. patch David Nadlinger 2006-06-11 11:09 0000 875 bytes Details | Diff
libpng.log emerge-log of libpng-1.2.10 with patch proposed in netbsd-mailing-list text/plain Gen2 2006-06-25 03:29 0000 40.99 KB Details
libpng-1.2.10-no-assembler.patch Patch for libpng that fixes the PNG_NO_ASSEMBLER_CODE bug patch David Nadlinger 2006-06-29 09:11 0000 1.86 KB Details | Diff
imagemagick-6.2.5.5-r1.ebuild imagemagick-6.2.5.5-r1.ebuild text/plain Michael A. Smith 2006-07-07 08:24 0000 2.79 KB Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 136452 depends on: Show dependency tree
Bug 136452 blocks: 138736 140188
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2006-06-11 11:06 0000
Building imagemagick-6.2.6.0 against libpng-2.6.10 fails with the following
error:

if /bin/sh ./libtool --silent --tag=CC --mode=compile x86_64-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I. -I./magick -I./wand -O2 -march=k8 -fomit-frame-pointer
-pipe -ftracer -fweb -frename-registers -Wall -pthread -MT
coders/coders_ept_la-ept.lo -MD -MP -MF "coders/.deps/coders_ept_la-ept.Tpo" -c
-o coders/coders_ept_la-ept.lo `test -f 'coders/ept.c' || echo
./'`coders/ept.c; \
        then mv -f "coders/.deps/coders_ept_la-ept.Tpo"
"coders/.deps/coders_ept_la-ept.Plo"; else rm -f
"coders/.deps/coders_ept_la-ept.Tpo"; exit 1; fi

coders/png.c: In function 'ReadOnePNGImage':
coders/png.c:1756: warning: implicit declaration of function
'png_access_version'
coders/png.c:1765: error: 'png_ptr' undeclared (first use in this function)
coders/png.c:1765: error: (Each undeclared identifier is reported only once
coders/png.c:1765: error: for each function it appears in.) 


Reproducible: Always
Steps to Reproduce:
1) emerge =media-libs/libpng-2.6.10 
2) USE=${USE} png" emerge =media-gfx/imagemagick-6.2.6.0

After a quick look at the code, I think this is simply a bug in imagemagick or
- maybe more correct - in the version that is in portage. My theory is that it
has not shown out yet because the block is only active if PNG_LIBPNG_VER >=
10200 and libpng-2.6.10 has just come into portage.

[coders/png.c,1753]
#if defined(PNG_USE_PNGGCCRD) && defined(PNG_ASSEMBLER_CODE_SUPPORTED) \
&& (PNG_LIBPNG_VER >= 10200)
  /* Disable thread-unsafe features of pnggccrd */
  if (png_access_version() >= 10200)
  {
    png_uint_32 mmx_disable_mask=0;
    png_uint_32 asm_flags;

    mmx_disable_mask |= ( PNG_ASM_FLAG_MMX_READ_COMBINE_ROW  \
                        | PNG_ASM_FLAG_MMX_READ_FILTER_SUB   \
                        | PNG_ASM_FLAG_MMX_READ_FILTER_AVG   \
                        | PNG_ASM_FLAG_MMX_READ_FILTER_PAETH );
    asm_flags=png_get_asm_flags(png_ptr);
    png_set_asm_flags(png_ptr, asm_flags & ~mmx_disable_mask);
  }
#endif


The bug has been confimed at the Gentoo forums.

Quick'n'dirty patch that works for me is attatched (ping is used in this
function like png_prt in others, libpng doesn't export png_access_version() but
png_access_version_number() )


---

Portage 2.1 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla,
glibc-2.4.90.20060516-r0, 2.6.17-rc3-no2 x86_64)
=================================================================
System uname: 2.6.17-rc3-no2 x86_64 AMD Athlon(tm) 64 Processor 3000+
Gentoo Base System version 1.12.1
ccache version 2.4 [enabled]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.93, 2.17.50.0.2
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=k8 -fomit-frame-pointer -pipe -ftracer -fweb
-frename-registers"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf
/etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O2 -march=k8 -fomit-frame-pointer -pipe -ftracer -fweb
-frename-registers -fvisibility-inlines-hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache confcache distlocks metadata-transfer
parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.inode.at/ http://files.gentoo.org/"
LANG="de_AT.utf8"
LC_ALL="de_AT.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common"
LINGUAS="de en"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_EXTRA_OPTS="--exclude-from=/etc/portage/rsync-excludes"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/conrad /usr/local/overlays/misc
/usr/portage/local/layman/portage-xgl /usr/portage/local/layman/initng"
SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"
USE="amd64 X aac alsa arts avi bash-completion berkdb bitmap-fonts bzip2 cairo
cli crypt cups dri eds emboss encode exif fbcon foomaticdb fortran gif glitz
gnome gpm gstreamer gtk gtk2 icq imlib ipv6 isdnlog jpeg kde kdeenablefinal
logitech-mouse lzw lzw-tiff mp3 mpeg ncurses nls nptl nptlonly nvidia ogg
opengl pam pcre pdflib perl png pppd python qt quicktime readline reflection
sdl session spell spl sse3 ssl svg tcpd tiff truetype-fonts type1-fonts unicode
usb vorbis xcomposite xorg xpm xv zlib elibc_glibc initng_plugins_also
initng_plugins_bash_launcher initng_plugins_chdir initng_plugins_chroot
initng_plugins_conflict initng_plugins_cpout initng_plugins_critical
initng_plugins_cron initng_plugins_daemon initng_plugins_dev
initng_plugins_dllaunch initng_plugins_envparser initng_plugins_find
initng_plugins_fstat initng_plugins_history initng_plugins_idleprobe
initng_plugins_initctl initng_plugins_interactive initng_plugins_iparser
initng_plugins_last initng_plugins_limit initng_plugins_logfile
initng_plugins_netprobe initng_plugins_ngc4 initng_plugins_pause
initng_plugins_pidfile initng_plugins_reload initng_plugins_renice
initng_plugins_rlparser initng_plugins_simple_launcher initng_plugins_stcmd
initng_plugins_stdout initng_plugins_suid initng_plugins_syncron
initng_plugins_syslog initng_plugins_unneeded initng_plugins_provide
input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux
linguas_de linguas_en userland_GNU video_cards_nvidia video_cards_nv
video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK

------- Comment #1 From David Nadlinger 2006-06-11 11:09:11 0000 -------
Created an attachment (id=88929) [details]
Patch that works for me - not sure if it is correct.

------- Comment #2 From Mateusz Kotyrba 2006-06-12 06:45:41 0000 -------
same here, but patch works for me also.

------- Comment #3 From Antoine Raillon (RETIRED) 2006-06-13 03:07:01 0000 -------
same problem here, and patch + modified ebuilds provided in
http://forums.gentoo.org/viewtopic-t-470245.html works for me

thx

------- Comment #4 From Daniel Drake 2006-06-13 11:30:13 0000 -------
(In reply to comment #0)
> Building imagemagick-6.2.6.0 against libpng-2.6.10 fails 

libpng-2.6.10 doesnt exist. I assume you mean 1.2.10?

------- Comment #5 From Daniel Drake 2006-06-13 11:58:08 0000 -------
Patch is correct.

The situation is that PNG_USE_PNGGCCRD was not defined by libpng before 1.2.10.
Now that it is defined, some new code gets compiled in, and it has some
problems as David pointed out. Presumably we're the first people to test it,
since it wouldn't have compiled anywhere, not even on 1.2.0 (which is the first
version which the code gets enabled for).

OK for me to commit this?

David, have you sent this upstream?

------- Comment #6 From David Nadlinger 2006-06-13 13:39:58 0000 -------
(In reply to comment #4)
> (In reply to comment #0)
> > Building imagemagick-6.2.6.0 against libpng-2.6.10 fails 
> 
> libpng-2.6.10 doesnt exist. I assume you mean 1.2.10?
> 
Of course 1.2.10... *embarrassed*

I just discovered that the bug was already reported upstream quite a while ago
by someone else ([1]) and has been fixed in SVN ([2]). So go ahead and commit
it.


Another thing: Now I get a runtime error now when ReadOnePNGImage() is called:

convert: symbol lookup error:
/usr/lib64/ImageMagick-6.2.6/modules-Q16/coders/png.so: undefined symbol:
png_get_asm_flags

Any ideas? I have the bad feeling that I am just 
missing the forest through the trees... I have already tried to remerge libpng
and imagemagick with safer flags, but it didn't disappear.



[1]
http://studio.imagemagick.org/pipermail/magick-developers/2006-April/002550.html
[2]https://subversion.imagemagick.org/subversion/ImageMagick/trunk/coders/png.c

------- Comment #7 From Paul Taylor 2006-06-17 14:47:11 0000 -------
The same bug exists in graphicsmagick-1.1.7:

[snip]
png.c: In function 'ReadOnePNGImage':
png.c:1712: warning: implicit declaration of function 'png_access_version'
png.c:1721: error: 'png_ptr' undeclared (first use in this function)
png.c:1721: error: (Each undeclared identifier is reported only once
png.c:1721: error: for each function it appears in.)
png.c:1772: warning: dereferencing type-punned pointer will break
strict-aliasing rules
make[1]: *** [png.lo] Error 1
make[1]: Leaving directory
`/var/tmp/portage/graphicsmagick-1.1.7/work/GraphicsMagick-1.1.7/coders'
make: *** [all-recursive] Error 1

!!! ERROR: media-gfx/graphicsmagick-1.1.7 failed.
Call stack:
  ebuild.sh, line 1540:   Called dyn_compile
  ebuild.sh, line 940:   Called src_compile
  graphicsmagick-1.1.7.ebuild, line 79:   Called die

!!! compile problem
!!! If you need support, post the topmost build error, and the call stack if
relevant.

------- Comment #8 From Karol Wojtaszek (RETIRED) 2006-06-18 08:51:47 0000 -------
Fixed in portage, thanks for help

------- Comment #9 From Gustavo Felisberto 2006-06-18 10:51:11 0000 -------
humpback@sam ~ $ convert hump-2006.png /tmp/jhgasda.jpg
convert: symbol lookup error:
/usr/lib64/ImageMagick-6.2.6/modules-Q16/coders/png.so: undefined symbol:
png_get_asm_flags

after the upgrade to the "fixed" version

------- Comment #10 From Mike Dilger 2006-06-18 13:58:14 0000 -------
I got the original (png_ptr undefined) problem too.

I just used the patch on an ebuild overlay and it lets it compile (at least).

Converting png to jpg worked fine for me:

# convert basn6a16.png ./test.jpg
# xv basn6a16.png
# xv test.jpg

------- Comment #11 From Aleksey Lazar 2006-06-18 18:19:27 0000 -------
I had this problem with 6.2.6.0. Version 6.2.8.0 emerged with no problems.
Should this bug be closed?

------- Comment #12 From Gustavo Felisberto 2006-06-19 06:52:03 0000 -------
Same problem with 6.2.8:

humpback@sam ~ $ convert hump-2006.png /tmp/jhgasda.jpg
convert: symbol lookup error:
/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/png.so: undefined symbol:
png_get_asm_flags
humpback@sam ~ $ file hump-2006.png 
hump-2006.png: PNG image data, 624 x 657, 8-bit/color RGBA, non-interlaced

------- Comment #13 From Barry Schwartz 2006-06-19 17:12:13 0000 -------
I have observed that png_get_asm_flags is defined in x86 libpng.so but not in
amd64 libpng.so. So I did a quick google on png_get_asm_flags. We aren’t the
only ones having problems with this; for example:

http://mail-index.netbsd.org/pkgsrc-bugs/2006/04/22/0024.html
http://mail-index.netbsd.org/pkgsrc-bugs/2006/05/04/0007.html

I haven’t checked and may not be able to get to it myself, but my
interpretation of the second message is that ImageMagick (or something else?)
is being built with PNG_ASSEMBLER_CODE_SUPPORTED defined when probably it
should be undefined.

------- Comment #14 From Barry Schwartz 2006-06-19 17:12:13 0000 -------
I have observed that png_get_asm_flags is defined in x86 libpng.so but not in
amd64 libpng.so. So I did a quick google on png_get_asm_flags. We aren’t
the only ones having problems with this; for example:

http://mail-index.netbsd.org/pkgsrc-bugs/2006/04/22/0024.html
http://mail-index.netbsd.org/pkgsrc-bugs/2006/05/04/0007.html

I haven’t checked and may not be able to get to it myself, but my
interpretation of the second message is that ImageMagick (or something else?)
is being built with PNG_ASSEMBLER_CODE_SUPPORTED defined when probably it
should be undefined.

------- Comment #15 From Gen2 2006-06-25 03:26:09 0000 -------
Did anybody have a look at this? From what i could see here
(http://mail-index.netbsd.org/pkgsrc-bugs/2006/05/04/0008.html) i guess it's a
combination of problems with libpng-1.2.10 and imagemagick-6.2.8..

I tried to apply the patch they proposed there for libpng 1.2.10 (as you can
see in my attachment it's applied to all files that get compiled) and reemerged
imagemagick again afterwards and tried out convert again but it didn't help... 

Still the same error so i guess there's a problem in imagemagick code too...

------- Comment #16 From Gen2 2006-06-25 03:29:12 0000 -------
Created an attachment (id=90082) [details]
emerge-log of libpng-1.2.10 with patch proposed in netbsd-mailing-list

------- Comment #17 From Jakub Moc (RETIRED) 2006-06-25 05:27:29 0000 -------
*** Bug 137930 has been marked as a duplicate of this bug. ***

------- Comment #18 From merwan kashouty 2006-06-26 08:09:33 0000 -------
same here... i found this after trying bmg and it called for tango-icon-theme
and its extras pkg... imagemagick and libpng compile and install fine but i
havent played with imagemagick to see what if anything else is b0rked in it...

[ebuild   R   ] media-gfx/imagemagick-6.2.8.0
[ebuild   R   ] media-libs/libpng-1.2.10


coders/png.so: undefined symbol: png_get_asm_flags
/usr/bin/convert: symbol lookup error:
/usr/lib64/ImageMagick-6.2.8/modules-Q16/coders/png.so: undefined symbol:
png_get_asm_flags
make[3]: *** [install-data-local] Error 127
make[3]: Leaving directory
`/var/tmp/portage/tango-icon-theme-0.7.0/work/tango-icon-theme-0.7.0/22x22/actions'
make[2]: *** [install-am] Error 2
make[2]: Leaving directory
`/var/tmp/portage/tango-icon-theme-0.7.0/work/tango-icon-theme-0.7.0/22x22/actions'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory
`/var/tmp/portage/tango-icon-theme-0.7.0/work/tango-icon-theme-0.7.0/22x22'
make: *** [install-recursive] Error 1


JaiBaba-amd64 ~ # emerge --info
Portage 2.1.1_pre1-r2 (default-linux/amd64/2006.0, gcc-4.1.1/amd64-vanilla,
glibc-2.4-r3, 2.6.17-gentoo x86_64)
=================================================================
System uname: 2.6.17-gentoo x86_64 AMD Athlon(tm) 64 FX-53 Processor
Gentoo Base System version 1.12.1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/gcc-config: [Not Present]
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.16
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -msse3"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/mozilla/defaults/pref /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/eselect/compiler /etc/gconf
/etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=athlon64 -pipe -msse3"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.chem.wisc.edu/gentoo/ http://adelie.polymtl.ca/
http://ftp.snt.utwente.nl/pub/os/linux/gentoo"
LINGUAS="en"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/overlays/portage /usr/local/overlays/bmg-main"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X aac acpi aim aimextras alsa applet artworkextra asf audacious
audiofile avi bash-completion berkdb bitmap-fonts buttons cairo cddb cdio
cdparanoia cdrom chroot ck-plus cli cpudetection crypt css cups dbus dga dio
directfb dlloader dpms dri dvb dvd dvdr dvdread eds emboss encode fbcon ffmpeg
firefox flac foomaticdb fortran gdbm gif gimp gnome gpm gstreamer gtk gtk+ gtk2
hal imagemagick imlib ipod ipv6 isdnlog jpeg kerberos lavc ldap libsdl
lm_sensors lzw lzw-tiff mad mjpeg mono mozilla mp3 mpeg mpeg2 mpg4 mplayer
ncurses nls nptl nptlonly nsplugin nvidia opengl pam pcre pda pdf pdflib perl
png pppd python qt quicktime readline reflection rhythmbox sdl session spell
spl ssl svg tcpd tiff transcode truetype-fonts type1-fonts usb v4l vlm wma wmv
xine xine-lib xorg xpm xv xvid zlib elibc_glibc input_devices_evdev
input_devices_vesa input_devices_void input_devices_fbdev input_devices_vga
input_devices_keyboard input_devices_tseng input_devices_v4l
input_devices_joystick input_devices_mouse input_devices_nv kernel_linux
linguas_en userland_GNU video_cards_nv video_cards_nvidia"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS

------- Comment #19 From Gen2 2006-06-26 10:03:17 0000 -------
Well as it is atm i would advice all amd64-users to use
media-libs/libpng-1.2.8-r1 as media-libs/libpng-1.2.10 seems to be seriously
broken at the moment...

------- Comment #20 From Ian Abbott 2006-06-26 16:44:12 0000 -------
Same problem here. libpng-1.2.10 and imagemagick-6.2.8.0 emerge fine, but
running 'display' or 'convert' on PNG files results in the symbol lookup error
for png_get_asm_flags mentioned earlier. I noticed it while trying to emerge
app-doc/gimp-help, which runs convert on hundreds of PNG files

------- Comment #21 From David Nadlinger 2006-06-27 13:14:58 0000 -------
During the last 2 weeks I had no time to work on this bug, but I think I got
very close to the solution today.

As we already know, the png_ptr/ping bug is not the only problem we have.

The second bug has its origins in libpng. Some of the pieces of assembler code
in pnggccrd.c fail on x86_64. This is known and so configure prevents this
sections from being built by passing -DPNG_NO_ASSEMBLER_CODE to gcc. Therefore
PNG_ASSEMBLER_CODE_SUPPORTED is not defined in pngconf.h and everything is
fine.

Well - it is fine until some program or library like imagemagick that wants to
do some special things with the assembler-support is built against libpng.
Because PNG_NO_ASSEMBLER_CODE is not recorded anywhere,
PNG_ASSEMBLER_CODE_SUPPORTED is defined, which obviously leads into troubles.

After all this seems like an upstream problem to me.

------- Comment #22 From Daniel Black 2006-06-29 06:07:28 0000 -------
maybe fixed in 1.2.12?
(libpng security bug 138433)

------- Comment #23 From David Nadlinger 2006-06-29 07:22:53 0000 -------
No, it isn't fixed in libpng-1.2.12, but in libpng-1.4.0beta8.

The magic is done by some hackish stuff in the Makefile - but if I see that
correctly providing a working backport should not be difficult. Maybe I can
finish it today.

------- Comment #24 From David Nadlinger 2006-06-29 09:07:17 0000 -------
Sucessfully backported the workaround from libpng-1.4.0beta8. The "hackish
stuff" only looked hackish to me because a couple of constants were renamed in
libpng-1.4.

The patch attached should be ready to go into portage, but remember that the
ebuild has to be modified to execute ./autogen.sh in src_unpack(). This is
needed because the patch only includes the changes to Makefile.am and
configure.ac, and not the changes to the generated files.

------- Comment #25 From David Nadlinger 2006-06-29 09:11:27 0000 -------
Created an attachment (id=90440) [details]
Patch for libpng that fixes the PNG_NO_ASSEMBLER_CODE bug

*remember to execute autogen.sh*

------- Comment #26 From Daniel Black 2006-06-29 17:25:31 0000 -------
Danger - compile failure imagemagick-6.2.5.5(stable) with libpng-1.2.10 and
libpng-1.2.12 (the security fixed version from bug 138433)

if /bin/sh ./libtool --silent --tag=CC --mode=compile i686-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I. -I./magick -I./wand   -I/usr/include/freetype2
-I/usr/include/libxml2  -march=athlon-xp -O2 -pipe -Wall -pthread -MT
coders/coders_png_la-png.lo -MD -MP -MF "coders/.deps/coders_png_la-png.Tpo" -c
-o coders/coders_png_la-png.lo `test -f 'coders/png.c' || echo
'./'`coders/png.c; \
then mv -f "coders/.deps/coders_png_la-png.Tpo"
"coders/.deps/coders_png_la-png.Plo"; else rm -f
"coders/.deps/coders_png_la-png.Tpo"; exit 1; fi
coders/png.c: In function 'ReadOnePNGImage':
coders/png.c:1755: warning: implicit declaration of function
'png_access_version'
coders/png.c:1764: error: 'png_ptr' undeclared (first use in this function)
coders/png.c:1764: error: (Each undeclared identifier is reported only once
coders/png.c:1764: error: for each function it appears in.)
make: *** [coders/coders_png_la-png.lo] Error 1
make: *** Waiting for unfinished jobs....

!!! ERROR: media-gfx/imagemagick-6.2.5.5 failed.

David - I've put a ref to your patch on bug 138433

------- Comment #27 From David Nadlinger 2006-06-30 00:49:45 0000 -------
Please dont't get confused, this bug (136452) basically consists of two
different bugs in terms of source code: the png_ptr-bug in *imagemagick* and
the PNG_NO_ASSEMBLER_CODE-bug in *libpng*.

The bug in imagemagick only appears with >=libpng-1.2.10, but is a bug in
imagemagick (png_ptr instead of ping).
It is fixed in =imagemagick-6.2.8.0 (though I can't find any information about
it in the official ChangeLog).

The second bug which is in libpng - or more correctly: in the libpng building
system - is in any 1.2 version >=libpng-1.2.10beta8.
It doesn't break every package that uses libpng, but only packages that use
some assembler/mmx-related functions. Becasue not every system supports the
assembler code libpng uses, the programs have to include a check for
PNG_ASSEMBLER_CODE_SUPPORTED - which is correct but useless due to the bug in
libpng.
It is not fixed in any libpng-1.2, but my patch should also work for
=libpng-1.2.12.

Note: The security bug and this bug are not related in any way.


So please stable imagemagick-6.2.8.0 and patch libpng if you stable
libpng-1.2.12 - otherwise stable-users who will run into serious trouble.

------- Comment #28 From Pacho Ramos 2006-06-30 17:26:12 0000 -------
Same problem here if I try to reemerge imagemagick-6.2.5.5 (STABLE) against
libpng-1.2.10

When will be it fixed "officialy" in portage tree?

Thanks a lot :-)

------- Comment #29 From Jakub Moc (RETIRED) 2006-07-01 11:31:52 0000 -------
*** Bug 138742 has been marked as a duplicate of this bug. ***

------- Comment #30 From Brandon Captain 2006-07-01 17:32:48 0000 -------
root@helix/etc/X11/xinit# emerge --info
Portage 2.1-r1 (default-linux/x86/2005.1, gcc-3.4.6, glibc-2.3.6-r4,
2.6.16-gentoo-r9 i686)
=================================================================
System uname: 2.6.16-gentoo-r9 i686 Intel(R) Pentium(R) 4 CPU 2.60GHz
Gentoo Base System version 1.6.15
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-Os -march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config
/usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/lib/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-Os -march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://gentoo.osuosl.org/ http://adelie.polymtl.ca/
ftp://cs.ubishops.ca/pub/gentoo
ftp://distro.ibiblio.org/pub/linux/distributions/gentoo/
http://distro.ibiblio.org/pub/linux/distributions/gentoo/
ftp://ftp.gtlib.gatech.edu/pub/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa arts asf avi bash-completion berkdb bitmap-fonts
cdparanoia cdr cli crypt cups dri dvd dvdr dvdread eds emboss encode ethereal
foomaticdb fortran gdbm gif gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde
libg++ libwww mad mikmod motif mp3 mpeg ncurses nls ogg oggvorbis openal opengl
oss pam pcre pdflib perl png pppd python qt qt3 qt4 quicktime readline real
reflection samba scanner sdl session spell spl ssl tcpd tiff truetype
truetype-fonts type1-fonts vorbis win32codecs xml2 xmms xorg xv zlib
elibc_glibc input_devices_keyboard input_devices_mouse kernel_linux
userland_GNU video_cards_fglrx video_cards_vesa video_cards_fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY




if /bin/sh ./libtool --silent --tag=CC --mode=compile i686-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I. -I./magick -I./wand   -I/usr/include/freetype2  -Os
-march=pentium4 -pipe -Wall -pthread -MT coders/coders_jpeg_la-jpeg.lo -MD -MP
-MF "coders/.deps/coders_jpeg_la-jpeg.Tpo" -c -o coders/coders_jpeg_la-jpeg.lo
`test -f 'coders/jpeg.c' || echo './'`coders/jpeg.c; \
then mv -f "coders/.deps/coders_jpeg_la-jpeg.Tpo"
"coders/.deps/coders_jpeg_la-jpeg.Plo"; else rm -f
"coders/.deps/coders_jpeg_la-jpeg.Tpo"; exit 1; fi
/bin/sh ./libtool --silent --tag=CC --mode=link i686-pc-linux-gnu-gcc  -Os
-march=pentium4 -pipe -Wall -pthread  -lfreetype -lz -o coders/jpeg.la -rpath
/usr/lib/ImageMagick-6.2.5/modules-Q16/coders -no-undefined -module
-avoid-version coders/coders_jpeg_la-jpeg.lo magick/libMagick.la -ljpeg
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libtiff.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libjpeg.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libXext.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libSM.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libICE.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libX11.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libXt.la' seems to be moved
libtool: link: warning:
`/usr/lib/gcc/i686-pc-linux-gnu/3.4.6/../../..//libfreetype.la' seems to be
moved
if /bin/sh ./libtool --silent --tag=CC --mode=compile i686-pc-linux-gnu-gcc
-DHAVE_CONFIG_H -I. -I. -I./magick -I./wand   -I/usr/include/freetype2  -Os
-march=pentium4 -pipe -Wall -pthread -MT coders/coders_png_la-png.lo -MD -MP
-MF "coders/.deps/coders_png_la-png.Tpo" -c -o coders/coders_png_la-png.lo
`test -f 'coders/png.c' || echo './'`coders/png.c; \
then mv -f "coders/.deps/coders_png_la-png.Tpo"
"coders/.deps/coders_png_la-png.Plo"; else rm -f
"coders/.deps/coders_png_la-png.Tpo"; exit 1; fi
coders/png.c: In function `ReadOnePNGImage':
coders/png.c:1755: warning: implicit declaration of function
`png_access_version'
coders/png.c:1764: error: `png_ptr' undeclared (first use in this function)
coders/png.c:1764: error: (Each undeclared identifier is reported only once
coders/png.c:1764: error: for each function it appears in.)
make: *** [coders/coders_png_la-png.lo] Error 1

!!! ERROR: media-gfx/imagemagick-6.2.5.5 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  imagemagick-6.2.5.5.ebuild, line 86:   Called die

!!! compile problem
!!! If you need support, post the topmost build error, and the call stack if
relevant.

------- Comment #31 From Ryan Hill 2006-07-01 18:05:57 0000 -------
thanks, but we don't really need more error output, especially when it's
identical to the other half dozen already posted. ;)

if you just want to indicate that you're hitting this bug as well the best way
is to add yourself to the CC list.

------- Comment #32 From Sven 2006-07-02 04:43:03 0000 -------
I just compiled imagemagick 6.2.5.5 against libpng-1.2.12 (which has been
marked stable recently) without any problems.

So does the problem with libpng-1.2.10 still matter?

------- Comment #33 From Charles C. Van Tilburg 2006-07-02 07:22:58 0000 -------
There is another problem, at least for me: 

the gconf-2.12.1 dep tree has libpng-1.2.12, while the gimp-print dep tree 
wants libpng-1.2.8-r1, leading to a loop.

------- Comment #34 From Jakub Moc (RETIRED) 2006-07-02 07:50:12 0000 -------
(In reply to comment #32)
> the gconf-2.12.1 dep tree has libpng-1.2.12, while the gimp-print dep tree 
> wants libpng-1.2.8-r1, leading to a loop.

Unrelated, this bug is about imagemagick *only*. Such generic stuff goes to Bug
138736.

------- Comment #35 From Jakub Moc (RETIRED) 2006-07-02 10:41:55 0000 -------
*** Bug 138888 has been marked as a duplicate of this bug. ***

------- Comment #36 From Pacho Ramos 2006-07-02 15:50:28 0000 -------
(In reply to comment #31)
> I just compiled imagemagick 6.2.5.5 against libpng-1.2.12 (which has been
> marked stable recently) without any problems.
> 
> So does the problem with libpng-1.2.10 still matter?
> 

I cannot recompile imagemagick 6.2.5.5 againsta libpng-1.2.12, I must use
libpng-1.2.8 :(

------- Comment #37 From Juan Aguado 2006-07-03 03:30:30 0000 -------
Same problem here.

------- Comment #38 From Charles C. Van Tilburg 2006-07-03 07:46:32 0000 -------
(In reply to comment #33)
> (In reply to comment #32)
> > the gconf-2.12.1 dep tree has libpng-1.2.12, while the gimp-print dep tree 
> > wants libpng-1.2.8-r1, leading to a loop.
> 
> Unrelated, this bug is about imagemagick *only*. Such generic stuff goes to Bug
> 138736.
> 

Imagemagick is part of the gimp-print dep tree.  

Further, the participation in the creation of a dep loop is an 
imagemagick *only* issue...

------- Comment #39 From David Nadlinger 2006-07-03 08:44:29 0000 -------
(In reply to comment #31)
> I just compiled imagemagick 6.2.5.5 against libpng-1.2.12 (which has been
> marked stable recently) without any problems.
> 
> So does the problem with libpng-1.2.10 still matter?
> 

Could you provide us some more information (e.g. emerge --info)? AFAIK it
shouldn't build - not even for you ;).

------- Comment #40 From Jakub Moc (RETIRED) 2006-07-03 11:37:19 0000 -------
(In reply to comment #36)
> Same problem here.
> 

Yeah, like 30 comments above. Enough really, please... "me too" is not useful.

------- Comment #41 From David Nadlinger 2006-07-03 12:03:24 0000 -------
The "undefined symbol: png_get_asm_flags" thing doesn't really belong to this
bug - although I have caused that mistake.

Please post everything related to "undefined symbol: png_get_asm_flags" into
bug 139052.


(In reply to comment #37)
> Imagemagick is part of the gimp-print dep tree.  
> 
> Further, the participation in the creation of a dep loop is an 
> imagemagick *only* issue...
>

Please open a new bug if nobody else has filed this yet. This bug is only about
the compiler errors - not the ebuild itself.

------- Comment #42 From Drake Wyrm 2006-07-04 02:54:30 0000 -------
Success report:

I can currently successfully compile imagemagick against libpng as follows:

[ebuild   R   ] media-libs/libpng-1.2.12  USE="doc" 0 kB 
[ebuild   R   ] media-gfx/imagemagick-6.2.8.0  USE="X bzip2 doc graphviz jpeg
mpeg perl png tiff truetype zlib -fpx -gs -jbig -jpeg2k -lcms -minimal -nocxx
-wmf -xml" 0 kB 

with the following system:
Gentoo Base System version 1.6.15
Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4,
2.6.14-gentoo-r5 i686)
=================================================================
System uname: 2.6.14-gentoo-r5 i686 AMD Athlon(tm) processor
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-tbird -O3 -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="-march=athlon-tbird -O3 -pipe"
DISTDIR="/var/cache/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms
strict test"
MAKEOPTS="-j2 -w"
USE="x86 3dnow X aalib acl alsa bash-completion berkdb bzip2 cjk crypt dga
directfb doc esd fbcon flac gdbm gif gnome gpm gtk gtk2 ipv6 java jpeg ldap mad
mbox mmx mpeg mysql ncurses nls offensive ogg oggvorbis opengl oss pam perl png
python readline sdl skey slang ssl svga tcltk tcpd tetex tiff truetype unicode
xv zlib elibc_glibc input_devices_evdev input_devices_jamstudio
input_devices_keyboard input_devices_mouse kernel_linux userland_GNU
video_cards_fbdev video_cards_r128 video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS,
LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS

Many thanks to everybody who worked on this!

------- Comment #43 From Jakub Moc (RETIRED) 2006-07-04 04:57:28 0000 -------
*** Bug 139163 has been marked as a duplicate of this bug. ***

------- Comment #44 From Stephan 2006-07-04 07:03:55 0000 -------
No problems with libpng-1.2.12 and imagemagick-6.2.8.0 here (like Drake Wyrm),
so please mark version 6.2.8.0 stable and close that bug.

Had the same error mentioned above until I unmasked the latest imagemagick
version.

Many thanks to all who fixed that one :)

------- Comment #45 From Jakub Moc (RETIRED) 2006-07-05 05:47:03 0000 -------
*** Bug 139298 has been marked as a duplicate of this bug. ***

------- Comment #46 From SpanKY 2006-07-05 21:24:41 0000 -------
fixed with libpng-1.2.12-r1

------- Comment #47 From Aquila 2006-07-06 02:34:10 0000 -------
When is this going into stable? (I'm a little bit confused by the bug being
closed before any arches have marked the revision stable.)

------- Comment #48 From Jakub Moc (RETIRED) 2006-07-06 06:23:37 0000 -------
*** Bug 139416 has been marked as a duplicate of this bug. ***

------- Comment #49 From Michael A. Smith 2006-07-06 19:58:10 0000 -------
Request this bug be reopened until a *stable* version of imagemagick compiles
with the stable libpng. It is, after all, blocking a security bug.

------- Comment #50 From Thomas Cort (RETIRED) 2006-07-06 19:59:18 0000 -------
(In reply to comment #48)
> Request this bug be reopened until a *stable* version of imagemagick compiles
> with the stable libpng. It is, after all, blocking a security bug.

re-opening

------- Comment #51 From Michael A. Smith 2006-07-07 08:24:02 0000 -------
Created an attachment (id=91141) [details]
imagemagick-6.2.5.5-r1.ebuild

David's patch works fine and should help move this bug along.

Instructions for users using this bug to help get imagemagick working:
1) save patch (id=88929) into your overlay as
$PORTDIR_OVERLAY/media-gfx/imagemagick/files/imagemagick-6.2.5.5-pnglib-version.patch
2) save the ebuild attached to this comment into your overlay as
$PORTDIR_OVERLAY/media-gfx/imagemagick/imagemagick-6.2.5.5-r1.ebuild
3) as root, run emerge --digest -1a imagemagick. If it says it's going to
emerge 6.2.5.5-r1, say Yes. If not, Something Is Wrong (tm)

I hope this ebuild or something like it gets into the stable tree soon.

------- Comment #52 From Jakub Moc (RETIRED) 2006-07-08 03:44:34 0000 -------
*** Bug 139652 has been marked as a duplicate of this bug. ***

------- Comment #53 From Decibels 2006-07-08 11:37:49 0000 -------
Was getting the problem with spumux (dvdauthor) and once got the imagemagick
and libpng that would compile. Still had problem another problem. Looks like
libpng-1.2.12-r1 fixed that and spumux is working now.

------- Comment #54 From Christophe PEREZ 2006-07-08 15:56:14 0000 -------
(In reply to comment #50)
> 3) as root, run emerge --digest -1a imagemagick. If it says it's going to
> emerge 6.2.5.5-r1, say Yes. If not, Something Is Wrong (tm)

didn't you forgot to explain you need too :
/usr/portage/media-gfx/imagemagick/files/imagemagick-6.2.5.4-docs.patch
/usr/portage/media-gfx/imagemagick/files/imagemagick-perlmagick.patch
?

------- Comment #55 From Jakub Moc (RETIRED) 2006-07-10 09:18:37 0000 -------
*** Bug 139894 has been marked as a duplicate of this bug. ***

------- Comment #56 From Jakub Moc (RETIRED) 2006-07-10 10:04:52 0000 -------
*** Bug 139900 has been marked as a duplicate of this bug. ***

------- Comment #57 From Michael A. Smith 2006-07-10 19:03:01 0000 -------
(In reply to comment #53)
> (In reply to comment #50)
> > 3) as root, run emerge --digest -1a imagemagick. If it says it's going to
> > emerge 6.2.5.5-r1, say Yes. If not, Something Is Wrong (tm)
> 
> didn't you forgot to explain you need too :
> /usr/portage/media-gfx/imagemagick/files/imagemagick-6.2.5.4-docs.patch
> /usr/portage/media-gfx/imagemagick/files/imagemagick-perlmagick.patch
> ?

Yep, sorry, gotta copy the stuff from the files directory in PORTDIR to the
files directory in the overlay. My mistake. (And bugzilla doesn't let me make
corrections.)

------- Comment #58 From Daniel Black 2006-07-10 21:27:45 0000 -------
*** Bug 139949 has been marked as a duplicate of this bug. ***

------- Comment #59 From Jakub Moc (RETIRED) 2006-07-10 23:27:49 0000 -------
*** Bug 139951 has been marked as a duplicate of this bug. ***

------- Comment #60 From Jakub Moc (RETIRED) 2006-07-11 10:34:54 0000 -------
*** Bug 140012 has been marked as a duplicate of this bug. ***

------- Comment #61 From Dizzy 2006-07-12 04:11:03 0000 -------
I got this bug once I switched to gcc 4.1.1 and used revdep-rebuild to
recompile everyting depending on stdlibc++. But of course probably its not
related to neither gcc version or the fact that I have gentoo amd64. Another
interesting thing, imagemagick-6.2.6.0 compiled just fine on libpng 1.2.12.
There seems to be a lot of variables here...

------- Comment #62 From Matthias Langer 2006-07-12 17:10:50 0000 -------
i can confirm comment 43: 
libpng-1.2.12 works well with imagemagick-6.2.8.0  USE="X bzip2 jpeg jpeg2k
lcms mpeg perl png tiff truetype xml zlib -doc -fpx -graphviz -gs -jbig
-minimal -nocxx -wmf" on my stable x86 system. As gnome-2.14.2 has just been
stabled for x86, lot's of people will suffer from this bug, as updating gnome
will very likely rebuild imagemagick (this happened two times to me and at
least one time to another person) and fail without adding imagemagick-6.2.8.0
to package.keywords.

------- Comment #63 From Jakub Moc (RETIRED) 2006-07-12 23:58:49 0000 -------
*** Bug 140185 has been marked as a duplicate of this bug. ***

------- Comment #64 From Jakub Moc (RETIRED) 2006-07-13 02:21:22 0000 -------
*** Bug 140196 has been marked as a duplicate of this bug. ***

------- Comment #65 From Jakub Moc (RETIRED) 2006-07-13 09:18:24 0000 -------
amd64, ppc, ppc64, x86 covered by Bug 140188. Everyone else, do the same and
mark 6.2.8.0 stable ASAP, please. This is getting ridiculous and breaking lots
of stuff that depends on imagemagick in stable.

------- Comment #66 From Gustavo Zacarias (RETIRED) 2006-07-13 10:07:57 0000 -------
sparc stable, was just waiting for someone to call us (being using it since the
libpng bump).

------- Comment #67 From carlos 2006-07-16 11:21:10 0000 -------
Found a mention of the same bug with a patch at this URL if anyone's
interested.

http://mail-index.netbsd.org/pkgsrc-bugs/2006/04/21/0014.html

------- Comment #68 From SpanKY 2006-08-20 00:29:21 0000 -------
should be all set

First Last Prev Next    No search results available      Search page      Enter new bug