Page 1 of 1

failed to handle png files on CentOS

Posted: 2011-04-13T09:30:55-07:00
by joelap
ImageMagick worked fine on my local environment (MacOS), but with my hosting that uses CentOS 5, I have experienced several issues. CentOS 5 does not support glibc 2.7, which is needed by ImageMagick. After various attempts, we were able to build ImageMagick from source.

Everything works great except processing PNG files. It crashes.
-sh-3.2$ identify -ping main-feature.png
identify: no decode delegate for this image format `main-feature.png' @ error/constitute.c/ReadImage/532.
-sh-3.2$ convert -list configure
Path: /usr/local/lib/ImageMagick-6.6.7/config/configure.xml
DELEGATES bzlib gs jpeg lcms2 lzma tiff x11 zlib
After some research, I have installed the extra png libraries (libpng-1.5.0.tar.gz and lpng150.zip) from http://www.imagemagick.org/download/delegates/ and re-compiled ImageMagick. Still no luck, except it gives a different error.
-sh-3.2$ identify -ping main-feature.png
Segmentation fault


Grateful if someone can give me a hint. Thanks.
P.S. The above command line was for testing purpose only. I am building a Rails application that requires Rmagick gem and Paperclip. The actual error message was-
<NotIdentifiedByImageMagickError: /tmp/stream20110223-25605-r8dgk.png is not recognized by the 'identify' command.>
-sh-3.2$ convert -list configure
Path: /usr/local/lib/ImageMagick-6.6.7/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CONFIGURE ./configure '--prefix=/usr/local' '--with-bzlib=yes' '--with-fontconfig=yes' '--with-freetype=yes' '--with-gslib=yes' '--with-gvc=yes' '--with-jpeg=yes' '--with-jp2=yes' '--with-png=yes' '--with-tiff=yes'
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib freetype gs jpeg jng lcms2 lzma png tiff x11 zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-fontpath= --with-perl=no
EXEC-PREFIX /usr/local
FEATURES OpenMP
HOST x86_64-unknown-linux-gnu
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x667
LIB_VERSION_NUMBER 6,6,7,9
LIBS -lMagickCore -llcms2 -ltiff -lfreetype -ljpeg -lgs -lpng -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2011-04-13
VERSION 6.6.7
WEBSITE http://www.imagemagick.org

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
NAME ImageMagick
-sh-3.2$

Re: failed to handle png files on CentOS

Posted: 2011-04-13T09:54:14-07:00
by fmw42
I don't know if this is relevant as I am on a Mac and never used Linux. But the PNG format has undergone much developement (and at times broke things until they were fixed.) So the best thing would be to upgrade to the latest IM 6.6.9.4 as that seems rather stable regarding PNG. You can see all the changes in the change log at http://www.imagemagick.org/script/changelog.php

Re: failed to handle png files on CentOS

Posted: 2011-04-13T09:59:37-07:00
by joelap
Thanks fmw42. I'd give a try - except my tech guy kept saying there is (was) an issue with Cent OS 5 (Linux) and the latest ImageMagick.

Just to give a bit more info regarding the detailed error log. Thank you in advance!
-sh-3.2$ catchsegv identify -ping main-feature.png
*** Segmentation fault
Register dump:

RAX: 0000000000000001 RBX: 00007fff8fb60260 RCX: 0000000000000007
RDX: 00007fff8fb602a0 RSI: 00002ba70b3e443c RDI: 0000000000000001
RBP: 00007fff8fb600d0 R8 : 000000000000000b R9 : 0000000000000001
R10: 00007fff8fb643d0 R11: 00002ba70cf009d0 R12: 0000000000000001
R13: 0000000000000073 R14: 000000000000000c R15: 00002ba70b42c521
RSP: 00007fff8fb5fa28

RIP: 00002ba70ec327c0 EFLAGS: 00010213

CS: 0083 FS: 0000 GS: 0000

Trap: 0000000e Error: 00000004 OldMask: 00000000 CR2: 00000001

FPUCW: 0000037f FPUSW: 00000000 TAG: 00000000
RIP: 00000000 RDP: 00000000

ST(0) 0000 0000000000000000 ST(1) 0000 0000000000000000
ST(2) 0000 0000000000000000 ST(3) 0000 0000000000000000
ST(4) 0000 0000000000000000 ST(5) 0000 0000000000000000
ST(6) 0000 0000000000000000 ST(7) 0000 0000000000000000
mxcsr: 1fa0
XMM0: 00000000000000000000000095000000 XMM1: 00000000000000000000000095000000
XMM2: 00000000000000000000000095000000 XMM3: 00000000000000000000000095000000
XMM4: 00000000000000000000000095000000 XMM5: 00000000000000000000000095000000
XMM6: 00000000000000000000000095000000 XMM7: 00000000000000000000000095000000
XMM8: 00000000000000000000000095000000 XMM9: 00000000000000000000000095000000
XMM10: 00000000000000000000000095000000 XMM11: 00000000000000000000000095000000
XMM12: 00000000000000000000000095000000 XMM13: 00000000000000000000000095000000
XMM14: 00000000000000000000000095000000 XMM15: 00000000000000000000000095000000

Backtrace:
/lib64/libc.so.6(strlen+0x10)[0x2ba70ec327c0]
/lib64/libc.so.6(_IO_vfprintf+0x4479)[0x2ba70ebffb69]
/lib64/libc.so.6(vsnprintf+0x9a)[0x2ba70ec2288a]
/usr/local/lib/libMagickCore.so.4(FormatMagickStringList+0x19)[0x2ba70b2d5d39]
/usr/local/lib/libMagickCore.so.4(FormatMagickString+0x83)[0x2ba70b2d5de3]
/usr/local/lib/libMagickCore.so.4(GetLocaleExceptionMessage+0x42)[0x2ba70b22ef32]
/usr/local/lib/libMagickCore.so.4(ThrowMagickExceptionList+0x4a)[0x2ba70b22f81a]
/usr/local/lib/libMagickCore.so.4(ThrowMagickException+0x8a)[0x2ba70b22fa8a]
/usr/local/lib/libMagickCore.so.4[0x2ba70b3aae4e]
/usr/local/lib/libpng15.so.15[0x2ba70cf009ec]
/usr/local/lib/libMagickCore.so.4[0x2ba70b3aae5b]
/usr/lib64/libpng12.so.0(png_error+0x44)[0x2ba70baa5904]
/usr/lib64/libpng12.so.0(png_create_read_struct_2+0x2a5)[0x2ba70ba9c445]
/usr/local/lib/libMagickCore.so.4[0x2ba70b3ab0cb]
/usr/local/lib/libMagickCore.so.4[0x2ba70b3adf1d]
/usr/local/lib/libMagickCore.so.4(ReadImage+0x94d)[0x2ba70b1d107d]
/usr/local/lib/libMagickCore.so.4(ReadStream+0x12b)[0x2ba70b2d2f7b]
/usr/local/lib/libMagickCore.so.4(PingImage+0x74)[0x2ba70b1d0214]
/usr/local/lib/libMagickCore.so.4(PingImages+0x15c)[0x2ba70b1d045c]
/usr/local/lib/libMagickWand.so.4(IdentifyImageCommand+0x3e2)[0x2ba70b7d99e2]
/usr/local/lib/libMagickWand.so.4(MagickCommandGenesis+0x325)[0x2ba70b80ad15]
identify(main+0x5f)[0x4009df]
/lib64/libc.so.6(__libc_start_main+0xf4)[0x2ba70ebd6994]
identify(IdentifyImageCommand+0x99)[0x4008c9]

Memory map:

00400000-00401000 r-xp 00000000 fd:03 46399537 /usr/local/bin/identify
00600000-00601000 rw-p 00000000 fd:03 46399537 /usr/local/bin/identify
064fb000-06581000 rw-p 064fb000 00:00 0 [heap]
2ba70ad04000-2ba70ad20000 r-xp 00000000 fd:03 1541593 /lib64/ld-2.5.so
2ba70ad20000-2ba70ad22000 rw-p 2ba70ad20000 00:00 0
2ba70af1f000-2ba70af20000 r--p 0001b000 fd:03 1541593 /lib64/ld-2.5.so
2ba70af20000-2ba70af21000 rw-p 0001c000 fd:03 1541593 /lib64/ld-2.5.so
2ba70af21000-2ba70af24000 r-xp 00000000 fd:03 1540744 /lib64/libSegFault.so
2ba70af24000-2ba70b124000 ---p 00003000 fd:03 1540744 /lib64/libSegFault.so
2ba70b124000-2ba70b125000 r--p 00003000 fd:03 1540744 /lib64/libSegFault.so
2ba70b125000-2ba70b126000 rw-p 00004000 fd:03 1540744 /lib64/libSegFault.so
2ba70b126000-2ba70b44b000 r-xp 00000000 fd:03 46137362 /usr/local/lib/libMagickCore.so.4.0.1
2ba70b44b000-2ba70b64a000 ---p 00325000 fd:03 46137362 /usr/local/lib/libMagickCore.so.4.0.1
2ba70b64a000-2ba70b730000 rw-p 00324000 fd:03 46137362 /usr/local/lib/libMagickCore.so.4.0.1
2ba70b730000-2ba70b74a000 rw-p 2ba70b730000 00:00 0
2ba70b74a000-2ba70b879000 r-xp 00000000 fd:03 46137401 /usr/local/lib/libMagickWand.so.4.0.1
2ba70b879000-2ba70ba79000 ---p 0012f000 fd:03 46137401 /usr/local/lib/libMagickWand.so.4.0.1
2ba70ba79000-2ba70ba7d000 rw-p 0012f000 fd:03 46137401 /usr/local/lib/libMagickWand.so.4.0.1
2ba70ba7d000-2ba70ba7e000 r--p 00000000 fd:03 1869242 /usr/lib/locale/en_US.utf8/LC_IDENTIFICATION
2ba70ba7e000-2ba70ba85000 r--s 00000000 fd:03 1803104 /usr/lib64/gconv/gconv-modules.cache
2ba70ba85000-2ba70ba86000 r--p 00000000 fd:03 1902046 /usr/lib/locale/en_US.utf8/LC_MEASUREMENT
2ba70ba86000-2ba70ba87000 r--p 00000000 fd:03 1902045 /usr/lib/locale/en_US.utf8/LC_TELEPHONE
2ba70ba87000-2ba70ba88000 r--p 00000000 fd:03 1868794 /usr/lib/locale/en_US.utf8/LC_ADDRESS
2ba70ba88000-2ba70ba89000 r--p 00000000 fd:03 1902078 /usr/lib/locale/en_US.utf8/LC_NAME
2ba70ba89000-2ba70ba8a000 r--p 00000000 fd:03 1902058 /usr/lib/locale/en_US.utf8/LC_PAPER
2ba70ba8a000-2ba70ba8b000 rw-p 2ba70ba8a000 00:00 0
2ba70ba8b000-2ba70baae000 r-xp 00000000 fd:03 1675174 /usr/lib64/libpng12.so.0.10.0
2ba70baae000-2ba70bcae000 ---p 00023000 fd:03 1675174 /usr/lib64/libpng12.so.0.10.0
2ba70bcae000-2ba70bcaf000 rw-p 00023000 fd:03 1675174 /usr/lib64/libpng12.so.0.10.0
2ba70bcaf000-2ba70bcf2000 r-xp 00000000 fd:03 56623124 /usr/local/lib/liblcms2.so.2.0.1
2ba70bcf2000-2ba70bef2000 ---p 00043000 fd:03 56623124 /usr/local/lib/liblcms2.so.2.0.1
2ba70bef2000-2ba70bef7000 rw-p 00043000 fd:03 56623124 /usr/local/lib/liblcms2.so.2.0.1
2ba70bef7000-2ba70bf4e000 r-xp 00000000 fd:03 1675250 /usr/lib64/libtiff.so.3.8.2
2ba70bf4e000-2ba70c14e000 ---p 00057000 fd:03 1675250 /usr/lib64/libtiff.so.3.8.2
2ba70c14e000-2ba70c151000 rw-p 00057000 fd:03 1675250 /usr/lib64/libtiff.so.3.8.2
2ba70c151000-2ba70c152000 rw-p 2ba70c151000 00:00 0
2ba70c152000-2ba70c1d1000 r-xp 00000000 fd:03 1675442 /usr/lib64/libfreetype.so.6.3.10
2ba70c1d1000-2ba70c3d1000 ---p 0007f000 fd:03 1675442 /usr/lib64/libfreetype.so.6.3.10
2ba70c3d1000-2ba70c3d6000 rw-p 0007f000 fd:03 1675442 /usr/lib64/libfreetype.so.6.3.10
2ba70c3d6000-2ba70c3f7000 r-xp 00000000 fd:03 1675279 /usr/lib64/libjpeg.so.62.0.0
2ba70c3f7000-2ba70c5f6000 ---p 00021000 fd:03 1675279 /usr/lib64/libjpeg.so.62.0.0
2ba70c5f6000-2ba70c5f7000 rw-p 00020000 fd:03 1675279 /usr/lib64/libjpeg.so.62.0.0
2ba70c5f7000-2ba70c96b000 r-xp 00000000 fd:03 41451725 /usr/lib64/libgs.so.8.15
2ba70c96b000-2ba70cb6b000 ---p 00374000 fd:03 41451725 /usr/lib64/libgs.so.8.15
2ba70cb6b000-2ba70cd6c000 rw-p 00374000 fd:03 41451725 /usr/lib64/libgs.so.8.15
2ba70cd6c000-2ba70cefa000 rw-p 2ba70cd6c000 00:00 0
2ba70cefa000-2ba70cf1e000 r-xp 00000000 fd:03 46137346 /usr/local/lib/libpng15.so.15.0.0
2ba70cf1e000-2ba70d11e000 ---p 00024000 fd:03 46137346 /usr/local/lib/libpng15.so.15.0.0
2ba70d11e000-2ba70d11f000 rw-p 00024000 fd:03 46137346 /usr/local/lib/libpng15.so.15.0.0
2ba70d11f000-2ba70d12f000 r-xp 00000000 fd:03 1676269 /usr/lib64/libXext.so.6.4.0
2ba70d12f000-2ba70d32f000 ---p 00010000 fd:03 1676269 /usr/lib64/libXext.so.6.4.0
2ba70d32f000-2ba70d330000 rw-p 00010000 fd:03 1676269 /usr/lib64/libXext.so.6.4.0
2ba70d330000-2ba70d38b000 r-xp 00000000 fd:03 1676267 /usr/lib64/libXt.so.6.0.0
2ba70d38b000-2ba70d58a000 ---p 0005b000 fd:03 1676267 /usr/lib64/libXt.so.6.0.0
2ba70d58a000-2ba70d590000 rw-p 0005a000 fd:03 1676267 /usr/lib64/libXt.so.6.0.0
2ba70d590000-2ba70d592000 rw-p 2ba70d590000 00:00 0
2ba70d592000-2ba70d5b1000 r-xp 00000000 fd:03 26314182 /usr/lib64/liblzma.so.0.0.0
2ba70d5b1000-2ba70d7b1000 ---p 0001f000 fd:03 26314182 /usr/lib64/liblzma.so.0.0.0
2ba70d7b1000-2ba70d7b2000 rw-p 0001f000 fd:03 26314182 /usr/lib64/liblzma.so.0.0.0
2ba70d7b2000-2ba70d7c1000 r-xp 00000000 fd:03 1675285 /usr/lib64/libbz2.so.1.0.3
2ba70d7c1000-2ba70d9c0000 ---p 0000f000 fd:03 1675285 /usr/lib64/libbz2.so.1.0.3
2ba70d9c0000-2ba70d9c2000 rw-p 0000e000 fd:03 1675285 /usr/lib64/libbz2.so.1.0.3
2ba70d9c2000-2ba70d9d6000 r-xp 00000000 fd:03 1675316 /usr/lib64/libz.so.1.2.3
2ba70d9d6000-2ba70dbd5000 ---p 00014000 fd:03 1675316 /usr/lib64/libz.so.1.2.3
2ba70dbd5000-2ba70dbd6000 rw-p 00013000 fd:03 1675316 /usr/lib64/libz.so.1.2.3
2ba70dbd6000-2ba70dbd7000 rw-p 2ba70dbd6000 00:00 0
2ba70dbd7000-2ba70dbed000 r-xp 00000000 fd:03 1540619 /lib64/libpthread-2.5.so
2ba70dbed000-2ba70ddec000 ---p 00016000 fd:03 1540619 /lib64/libpthread-2.5.so
2ba70ddec000-2ba70dded000 r--p 00015000 fd:03 1540619 /lib64/libpthread-2.5.so
2ba70dded000-2ba70ddee000 rw-p 00016000 fd:03 1540619 /lib64/libpthread-2.5.so
2ba70ddee000-2ba70ddf2000 rw-p 2ba70ddee000 00:00 0
2ba70ddf2000-2ba70ddf4000 r-xp 00000000 fd:03 1540599 /lib64/libdl-2.5.so
2ba70ddf4000-2ba70dff4000 ---p 00002000 fd:03 1540599 /lib64/libdl-2.5.so
2ba70dff4000-2ba70dff5000 r--p 00002000 fd:03 1540599 /lib64/libdl-2.5.so
2ba70dff5000-2ba70dff6000 rw-p 00003000 fd:03 1540599 /lib64/libdl-2.5.so
2ba70dff6000-2ba70dfff000 r-xp 00000000 fd:03 1676265 /usr/lib64/libSM.so.6.0.0
2ba70dfff000-2ba70e1ff000 ---p 00009000 fd:03 1676265 /usr/lib64/libSM.so.6.0.0
2ba70e1ff000-2ba70e200000 rw-p 00009000 fd:03 1676265 /usr/lib64/libSM.so.6.0.0
2ba70e200000-2ba70e201000 rw-p 2ba70e200000 00:00 0
2ba70e201000-2ba70e218000 r-xp 00000000 fd:03 1676263 /usr/lib64/libICE.so.6.3.0
2ba70e218000-2ba70e417000 ---p 00017000 fd:03 1676263 /usr/lib64/libICE.so.6.3.0
2ba70e417000-2ba70e419000 rw-p 00016000 fd:03 1676263 /usr/lib64/libICE.so.6.3.0
2ba70e419000-2ba70e41c000 rw-p 2ba70e419000 00:00 0
2ba70e41c000-2ba70e521000 r-xp 00000000 fd:03 1676252 /usr/lib64/libX11.so.6.2.0
2ba70e521000-2ba70e721000 ---p 00105000 fd:03 1676252 /usr/lib64/libX11.so.6.2.0
2ba70e721000-2ba70e728000 rw-p 00105000 fd:03 1676252 /usr/lib64/libX11.so.6.2.0
2ba70e728000-2ba70e735000 r-xp 00000000 fd:03 1675473 /usr/lib64/libgomp.so.1.0.0
2ba70e735000-2ba70e934000 ---p 0000d000 fd:03 1675473 /usr/lib64/libgomp.so.1.0.0
2ba70e934000-2ba70e935000 rw-p 0000c000 fd:03 1675473 /usr/lib64/libgomp.so.1.0.0
2ba70e935000-2ba70e936000 rw-p 2ba70e935000 00:00 0
2ba70e936000-2ba70e9b8000 r-xp 00000000 fd:03 1540825 /lib64/libm-2.5.so
2ba70e9b8000-2ba70ebb7000 ---p 00082000 fd:03 1540825 /lib64/libm-2.5.so
2ba70ebb7000-2ba70ebb8000 r--p 00081000 fd:03 1540825 /lib64/libm-2.5.so
2ba70ebb8000-2ba70ebb9000 rw-p 00082000 fd:03 1540825 /lib64/libm-2.5.so
2ba70ebb9000-2ba70ed07000 r-xp 00000000 fd:03 1540597 /lib64/libc-2.5.so
2ba70ed07000-2ba70ef06000 ---p 0014e000 fd:03 1540597 /lib64/libc-2.5.so
2ba70ef06000-2ba70ef0a000 r--p 0014d000 fd:03 1540597 /lib64/libc-2.5.so
2ba70ef0a000-2ba70ef0b000 rw-p 00151000 fd:03 1540597 /lib64/libc-2.5.so
2ba70ef0b000-2ba70ef11000 rw-p 2ba70ef0b000 00:00 0
2ba70ef11000-2ba70ef27000 r-xp 00000000 fd:03 1671350 /usr/lib64/libcupsimage.so.2
2ba70ef27000-2ba70f127000 ---p 00016000 fd:03 1671350 /usr/lib64/libcupsimage.so.2
2ba70f127000-2ba70f128000 rw-p 00016000 fd:03 1671350 /usr/lib64/libcupsimage.so.2
2ba70f128000-2ba70f15d000 r-xp 00000000 fd:03 1679804 /usr/lib64/libcups.so.2
2ba70f15d000-2ba70f35d000 ---p 00035000 fd:03 1679804 /usr/lib64/libcups.so.2
2ba70f35d000-2ba70f360000 rw-p 00035000 fd:03 1679804 /usr/lib64/libcups.so.2
2ba70f360000-2ba70f38c000 r-xp 00000000 fd:03 1675201 /usr/lib64/libgssapi_krb5.so.2.2
2ba70f38c000-2ba70f58c000 ---p 0002c000 fd:03 1675201 /usr/lib64/libgssapi_krb5.so.2.2
2ba70f58c000-2ba70f58e000 rw-p 0002c000 fd:03 1675201 /usr/lib64/libgssapi_krb5.so.2.2
2ba70f58e000-2ba70f58f000 rw-p 2ba70f58e000 00:00 0
2ba70f58f000-2ba70f620000 r-xp 00000000 fd:03 1675345 /usr/lib64/libkrb5.so.3.3
2ba70f620000-2ba70f820000 ---p 00091000 fd:03 1675345 /usr/lib64/libkrb5.so.3.3
2ba70f820000-2ba70f824000 rw-p 00091000 fd:03 1675345 /usr/lib64/libkrb5.so.3.3
2ba70f824000-2ba70f848000 r-xp 00000000 fd:03 1675245 /usr/lib64/libk5crypto.so.3.1
2ba70f848000-2ba70fa47000 ---p 00024000 fd:03 1675245 /usr/lib64/libk5crypto.so.3.1
2ba70fa47000-2ba70fa49000 rw-p 00023000 fd:03 1675245 /usr/lib64/libk5crypto.so.3.1
2ba70fa49000-2ba70fa4b000 r-xp 00000000 fd:03 1540748 /lib64/libcom_err.so.2.1
2ba70fa4b000-2ba70fc4a000 ---p 00002000 fd:03 1540748 /lib64/libcom_err.so.2.1
2ba70fc4a000-2ba70fc4b000 rw-p 00001000 fd:03 1540748 /lib64/libcom_err.so.2.1
2ba70fc4b000-2ba70fc4c000 rw-p 2ba70fc4b000 00:00 0
2ba70fc4c000-2ba70fc55000 r-xp 00000000 fd:03 1540635 /lib64/libcrypt-2.5.so
2ba70fc55000-2ba70fe54000 ---p 00009000 fd:03 1540635 /lib64/libcrypt-2.5.so
2ba70fe54000-2ba70fe55000 r--p 00008000 fd:03 1540635 /lib64/libcrypt-2.5.so
2ba70fe55000-2ba70fe56000 rw-p 00009000 fd:03 1540635 /lib64/libcrypt-2.5.so
2ba70fe56000-2ba70fe84000 rw-p 2ba70fe56000 00:00 0
2ba70fe84000-2ba70ff6a000 r-xp 00000000 fd:03 1675290 /usr/lib64/libstdc++.so.6.0.8
2ba70ff6a000-2ba710169000 ---p 000e6000 fd:03 1675290 /usr/lib64/libstdc++.so.6.0.8
2ba710169000-2ba71016f000 r--p 000e5000 fd:03 1675290 /usr/lib64/libstdc++.so.6.0.8
2ba71016f000-2ba710172000 rw-p 000eb000 fd:03 1675290 /usr/lib64/libstdc++.so.6.0.8
2ba710172000-2ba710184000 rw-p 2ba710172000 00:00 0
2ba710184000-2ba710186000 r-xp 00000000 fd:03 1676009 /usr/lib64/libXau.so.6.0.0
2ba710186000-2ba710385000 ---p 00002000 fd:03 1676009 /usr/lib64/libXau.so.6.0.0
2ba710385000-2ba710386000 rw-p 00001000 fd:03 1676009 /usr/lib64/libXau.so.6.0.0
2ba710386000-2ba710387000 rw-p 2ba710386000 00:00 0
2ba710387000-2ba71038c000 r-xp 00000000 fd:03 1676011 /usr/lib64/libXdmcp.so.6.0.0
2ba71038c000-2ba71058b000 ---p 00005000 fd:03 1676011 /usr/lib64/libXdmcp.so.6.0.0
2ba71058b000-2ba71058c000 rw-p 00004000 fd:03 1676011 /usr/lib64/libXdmcp.so.6.0.0
2ba71058c000-2ba710593000 r-xp 00000000 fd:03 1540595 /lib64/librt-2.5.so
2ba710593000-2ba710793000 ---p 00007000 fd:03 1540595 /lib64/librt-2.5.so
2ba710793000-2ba710794000 r--p 00007000 fd:03 1540595 /lib64/librt-2.5.so
2ba710794000-2ba710795000 rw-p 00008000 fd:03 1540595 /lib64/librt-2.5.so
2ba710795000-2ba710796000 rw-p 2ba710795000 00:00 0
2ba710796000-2ba710810000 r-xp 00000000 fd:03 1675182 /usr/lib64/libgnutls.so.13.0.6
2ba710810000-2ba710a0f000 ---p 0007a000 fd:03 1675182 /usr/lib64/libgnutls.so.13.0.6
2ba710a0f000-2ba710a1a000 rw-p 00079000 fd:03 1675182 /usr/lib64/libgnutls.so.13.0.6
2ba710a1a000-2ba710a22000 r-xp 00000000 fd:03 1675339 /usr/lib64/libkrb5support.so.0.1
2ba710a22000-2ba710c21000 ---p 00008000 fd:03 1675339 /usr/lib64/libkrb5support.so.0.1
2ba710c21000-2ba710c22000 rw-p 00007000 fd:03 1675339 /usr/lib64/libkrb5support.so.0.1
2ba710c22000-2ba710c24000 r-xp 00000000 fd:03 1540630 /lib64/libkeyutils-1.2.so
2ba710c24000-2ba710e23000 ---p 00002000 fd:03 1540630 /lib64/libkeyutils-1.2.so
2ba710e23000-2ba710e24000 rw-p 00001000 fd:03 1540630 /lib64/libkeyutils-1.2.so
2ba710e24000-2ba710e25000 rw-p 2ba710e24000 00:00 0
2ba710e25000-2ba710e36000 r-xp 00000000 fd:03 1540646 /lib64/libresolv-2.5.so
2ba710e36000-2ba711036000 ---p 00011000 fd:03 1540646 /lib64/libresolv-2.5.so
2ba711036000-2ba711037000 r--p 00011000 fd:03 1540646 /lib64/libresolv-2.5.so
2ba711037000-2ba711038000 rw-p 00012000 fd:03 1540646 /lib64/libresolv-2.5.so
2ba711038000-2ba71103a000 rw-p 2ba711038000 00:00 0
2ba71103a000-2ba711047000 r-xp 00000000 fd:03 1540626 /lib64/libgcc_s-4.1.2-20080825.so.1
2ba711047000-2ba711247000 ---p 0000d000 fd:03 1540626 /lib64/libgcc_s-4.1.2-20080825.so.1
2ba711247000-2ba711248000 rw-p 0000d000 fd:03 1540626 /lib64/libgcc_s-4.1.2-20080825.so.1
2ba711248000-2ba711249000 rw-p 2ba711248000 00:00 0
2ba711249000-2ba7112b8000 r-xp 00000000 fd:03 1675274 /usr/lib64/libgcrypt.so.11.5.2
2ba7112b8000-2ba7114b7000 ---p 0006f000 fd:03 1675274 /usr/lib64/libgcrypt.so.11.5.2
2ba7114b7000-2ba7114bb000 rw-p 0006e000 fd:03 1675274 /usr/lib64/libgcrypt.so.11.5.2
2ba7114bb000-2ba7114be000 r-xp 00000000 fd:03 1675353 /usr/lib64/libgpg-error.so.0.3.0
2ba7114be000-2ba7116bd000 ---p 00003000 fd:03 1675353 /usr/lib64/libgpg-error.so.0.3.0
2ba7116bd000-2ba7116be000 rw-p 00002000 fd:03 1675353 /usr/lib64/libgpg-error.so.0.3.0
2ba7116be000-2ba7116d3000 r-xp 00000000 fd:03 1540621 /lib64/libselinux.so.1
2ba7116d3000-2ba7118d3000 ---p 00015000 fd:03 1540621 /lib64/libselinux.so.1
2ba7118d3000-2ba7118d5000 rw-p 00015000 fd:03 1540621 /lib64/libselinux.so.1
2ba7118d5000-2ba7118d7000 rw-p 2ba7118d5000 00:00 0
2ba7118d7000-2ba711912000 r-xp 00000000 fd:03 1540585 /lib64/libsepol.so.1
2ba711912000-2ba711b12000 ---p 0003b000 fd:03 1540585 /lib64/libsepol.so.1
2ba711b12000-2ba711b13000 rw-p 0003b000 fd:03 1540585 /lib64/libsepol.so.1
2ba711b13000-2ba711b20000 rw-p 2ba711b13000 00:00 0
2ba711b20000-2ba711b21000 r--p 00000000 fd:03 1902108 /usr/lib/locale/en_US.utf8/LC_MESSAGES/SYS_LC_MESSAGES
2ba711b21000-2ba711b22000 r--p 00000000 fd:03 1869243 /usr/lib/locale/en_US.utf8/LC_MONETARY
2ba711b22000-2ba711bf9000 r--p 00000000 fd:03 1868060 /usr/lib/locale/en_US.utf8/LC_COLLATE
2ba711bf9000-2ba711bfa000 r--p 00000000 fd:03 1869244 /usr/lib/locale/en_US.utf8/LC_TIME
2ba711bfa000-2ba711bfb000 r--p 00000000 fd:03 1868157 /usr/lib/locale/en_US.utf8/LC_NUMERIC
2ba711bfb000-2ba711c36000 r--p 00000000 fd:03 1868047 /usr/lib/locale/en_US.utf8/LC_CTYPE
2ba711c37000-2ba711c42000 r--p 00000000 fd:03 62325309 /home/woha/public_html/main-feature.png
7fff8fb54000-7fff8fb6e000 rw-p 7ffffffe5000 00:00 0 [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0 [vdso]
-sh-3.2$

Re: failed to handle png files on CentOS

Posted: 2011-04-13T10:06:07-07:00
by fmw42
Sorry, your printout is way above my head.

There are CentOS binaries at http://www.imagemagick.org/script/binary-releases.php. Have you tried those or install from source?

Re: failed to handle png files on CentOS

Posted: 2011-04-13T10:33:34-07:00
by magick
ImageMagick works fine under CentOS and has no special requirements. We use CentOS as one of our development machines. One way to install the latest version of ImageMagick is to download the source distribution and type
  • tar xvfz ImageMagick-6.6.9-4.tar.gz
    cd ImageMagick-6.6.9-4
    su
    yum install ImageMagick-devel
    ./configure
    make
    make install
We tried your command with the latest release and it completed without complaint.

Re: failed to handle png files on CentOS

Posted: 2011-04-13T14:52:46-07:00
by joelap
Thanks magick. I tried to install ImageMagick-6.6.9-4 as per your instruction but it produces the following error :? Grateful if you can offer some further help. Really appreciated.

make all-am
make[1]: Entering directory `/usr/src/ImageMagick-6.6.9-4'
CCLD utilities/animate
magick/.libs/libMagickCore.so: undefined reference to `png_longjmp'
magick/.libs/libMagickCore.so: undefined reference to `png_set_longjmp_fn'
collect2: ld returned 1 exit status
make[1]: *** [utilities/animate] Error 1
make[1]: Leaving directory `/usr/src/ImageMagick-6.6.9-4'
make: *** [all] Error 2

Re: failed to handle png files on CentOS

Posted: 2011-04-13T15:10:27-07:00
by magick

Re: failed to handle png files on CentOS

Posted: 2011-04-13T19:42:57-07:00
by joelap
Thanks again! it works!
-sh-3.2$ identify -ping main-feature.png
main-feature.png PNG 548x357 548x357+0+0 8-bit PseudoClass 256c 44.4KB 0.000u 0:00.000
-sh-3.2$convert -list configure

Path: /usr/local/share/ImageMagick-6.6.9/configure.xml

Name Value
-------------------------------------------------------------------------------
CC gcc -std=gnu99 -std=gnu99
CFLAGS -fopenmp -g -O2 -Wall -pthread
CODER_PATH /usr/local/lib/ImageMagick-6.6.9/modules-Q16/coders
CONFIGURE ./configure
CONFIGURE_PATH /usr/local/etc/ImageMagick/
COPYRIGHT Copyright (C) 1999-2011 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include/ImageMagick
CXX g++
CXXFLAGS -g -O2 -pthread
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib freetype jpeg jng lcms2 lzma png tiff x11 zlib
DISTCHECK_CONFIG_FLAGS --disable-deprecated --with-quantum-depth=16 --with-umem=no --with-autotrace=no --with-gslib=no --with-fontpath= --with-perl=no
DOCUMENTATION_PATH /usr/local/share/doc/ImageMagick-6.6.9/
EXEC-PREFIX /usr/local
EXECUTABLE_PATH /usr/local/bin
FEATURES OpenMP
FILTER_PATH /usr/local/lib/ImageMagick-6.6.9/modules-Q16/filters
HOST x86_64-unknown-linux-gnu
LDFLAGS -L/usr/local/lib
LIB_VERSION 0x669
LIB_VERSION_NUMBER 6,6,9,4
LIBRARY_PATH /usr/local/lib/ImageMagick-6.6.9
LIBS -lMagickCore -llcms2 -ltiff -lfreetype -ljpeg -lpng -lXext -lXt -lSM -lICE -lX11 -llzma -lbz2 -lz -lm -lgomp -lpthread
NAME ImageMagick
PCFLAGS -fopenmp
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 2011-04-14
SHARE_PATH /usr/local/share/ImageMagick-6.6.9
SVN_REVISION exported
VERSION 6.6.9
WEBSITE http://www.imagemagick.org

Path: [built-in]

Name Value
-------------------------------------------------------------------------------
NAME ImageMagick

However, now I have encountered another issue - when I start my Rails application (Ruby 1.9.2, Rails 3.0.5, RMagic gem installed). Grateful if you can give me some hint.

libpng12.so.0: cannot open shared object file: No such file or directory - /usr/local/lib/ruby/gems/1.9.1/gems/rmagick-2.13.1/lib/RMagick2.so
-sh-3.2$ ls -ld $(locate -r libpng.*\.so.*)
ls: /usr/lib64/libpng12.so: No such file or directory
ls: /usr/lib64/libpng12.so.0: No such file or directory
ls: /usr/lib64/libpng12.so.0.10.0: No such file or directory
lrwxrwxrwx 1 root root 11 Feb 23 22:48 /usr/lib64/libpng.so -> libpng12.so
lrwxrwxrwx 1 root root 16 Sep 24 2010 /usr/lib64/libpng.so.3 -> libpng.so.3.10.0
-rwxr-xr-x 1 root root 160184 Jul 14 2010 /usr/lib64/libpng.so.3.10.0
lrwxrwxrwx 1 root root 18 Feb 23 22:48 /usr/lib/libpng12.so -> libpng12.so.0.10.0
lrwxrwxrwx 1 root root 18 Feb 18 05:10 /usr/lib/libpng12.so.0 -> libpng12.so.0.10.0
-rwxr-xr-x 1 root root 151996 Jul 14 2010 /usr/lib/libpng12.so.0.10.0
lrwxrwxrwx 1 root root 11 Feb 23 22:48 /usr/lib/libpng.so -> libpng12.so
lrwxrwxrwx 1 root root 16 Feb 18 05:10 /usr/lib/libpng.so.3 -> libpng.so.3.10.0
-rwxr-xr-x 1 root root 162336 Jul 14 2010 /usr/lib/libpng.so.3.10.0
lrwxrwxrwx 1 root root 18 Apr 13 06:11 /usr/local/lib/libpng15.so -> libpng15.so.15.0.0
lrwxrwxrwx 1 root root 18 Apr 13 06:11 /usr/local/lib/libpng15.so.15 -> libpng15.so.15.0.0
-rwxr-xr-x 1 root root 565789 Apr 13 06:11 /usr/local/lib/libpng15.so.15.0.0
lrwxrwxrwx 1 root root 11 Apr 13 06:11 /usr/local/lib/libpng.so -> libpng15.so
-rw-r--r-- 1 1004 clamav 766 Jun 5 2000 /usr/src/libpng-1.5.0/contrib/visupng/resource.h
lrwxrwxrwx 1 root root 18 Apr 13 06:11 /usr/src/libpng-1.5.0/.libs/libpng15.so -> libpng15.so.15.0.0
lrwxrwxrwx 1 root root 18 Apr 13 06:11 /usr/src/libpng-1.5.0/.libs/libpng15.so.15 -> libpng15.so.15.0.0
-rwxr-xr-x 1 root root 565789 Apr 13 06:11 /usr/src/libpng-1.5.0/.libs/libpng15.so.15.0.0
-rw-r--r-- 1 1004 clamav 8327 Jan 6 16:02 /usr/src/libpng-1.5.0/scripts/makefile.so9
-rw-r--r-- 1 1004 clamav 8122 Jan 6 16:02 /usr/src/libpng-1.5.0/scripts/makefile.solaris
-rw-r--r-- 1 1004 clamav 8120 Jan 6 16:02 /usr/src/libpng-1.5.0/scripts/makefile.solaris-x86

Re: failed to handle png files on CentOS

Posted: 2011-04-14T07:01:57-07:00
by joelap
Issue resolved.

Since this is a newly built of Imagemagick, I have to uninstall Rmagick ruby gem and re-install it again. Thanks guys.

Re: failed to handle png files on CentOS

Posted: 2011-04-14T07:18:49-07:00
by glennrp
joelap wrote:magick/.libs/libMagickCore.so: undefined reference to `png_longjmp'
This is a known issue with libpng15 on some platforms. The libpng group is working on it.

From the png-mng-implement at lists.sourceforge.net mailing list:
> The work round is to add -DPNG_PTR_NORETURN= to your compiler flags (or put:
>
> #define PNG_PTR_NORETURN
>
> Before the include of png.h in the relevant source file if you have a good patch capability.)

I think I'll go ahead and put this in the IM source (coders/png.c) until the png group gets it worked out.

Please try IM-6.6.9-5, SVN revision r4223.

Glenn