Compiled using JPEG delegate, but not usable at runtime
Posted: 2015-01-07T20:38:57-07:00
I have taken the 6.8.9_10 release of ImageMagick and have compiled it on my Linux system. When checking for jpeg support, the configure script seemed to find everything it wanted:
Thanks!
After compilation and installation, the identify (or any other utility) mentions that the jpeg delegate is available:checking for JPEG...
checking jconfig.h usability... yes
checking jconfig.h presence... yes
checking for jconfig.h... yes
checking jerror.h usability... yes
checking jerror.h presence... yes
checking for jerror.h... yes
checking jmorecfg.h usability... yes
checking jmorecfg.h presence... yes
checking for jmorecfg.h... yes
checking jpeglib.h usability... yes
checking jpeglib.h presence... yes
checking for jpeglib.h... yes
checking for jpeg_read_header in -ljpeg... yes
checking for JPEG library is version 6b or later... yes
checking if JPEG package is complete... yes
The jpeg format is also mentioned in the format list:$ identify -list configure | grep -i DELEGATE
DELEGATES bzlib mpeg fontconfig freetype jng jpeg lcms png tiff zlib
However, if a utility is used against a jpeg file, it reports a failure:$ identify -list format | grep -i jpeg
see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
and supplement 61 which adds JPEG-2000 encoding.
JNG* rw- JPEG Network Graphics
JPEG* rw- Joint Photographic Experts Group JFIF format (62)
PJPEG* rw- Joint Photographic Experts Group JFIF format (62)
Running the program through strace, it appears that it is finding the libjpeg library on the system:$ file test.jpg
test.jpg: JPEG image data, JFIF standard 1.01, comment: "Created with GIMP"
$ identify test.jpg
identify: Requested feature was omitted at compile time `test.jpg' @ error/jpeg.c/JPEGErrorHandler/322.
identify, when run with "-debug ALL", indicates (maybe) that the jpeg file analysis beings, but hits a wall for some reason:strace identify test.jpg 2>&1 | grep libjpeg
open("/var/libjpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/lib/libjpeg.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
open("/usr/lib/libjpeg.so", O_RDONLY|O_CLOEXEC) = 3
The message is being thrown while imagemagick is in libjpeg, it seems, from looking at the track trace from when the error is printed (found using gdb):$ identify -debug ALL test.jpg identify
2015-01-08T03:27:23+00:00 0:00.000 0.000u 6.8.9 Configure identify[3172]: utility.c/ExpandFilenames/945/Configure
Command line: ./identify {-debug} {ALL} {test.jpg}
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Policy identify[3172]: policy.c/IsRightsAuthorized/574/Policy
Domain: Path; rights=Read; pattern="test.jpg" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Blob identify[3172]: blob.c/OpenBlob/2598/Blob
read 3 magic header bytes
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Resource identify[3172]: resource.c/AcquireMagickResource/279/Resource
Map: 49.6KB/48.5KiB/1.9545GiB
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Resource identify[3172]: resource.c/RelinquishMagickResource/862/Resource
Map: 49.6KB/0B/1.9545GiB
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "/usr/share/ImageMagick-6/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "/usr/lib/ImageMagick-6.8.9//config-Q16/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "/etc/ImageMagick-6/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "/usr/share/doc/ImageMagick-6/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "//.config/ImageMagick/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: configure.c/GetConfigureOptions/679/Configure
Searching for configure file: "//.magick/magic.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: magic.c/LoadMagicCache/773/Configure
Loading magic configure file "/etc/ImageMagick-6/magic.xml" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Policy identify[3172]: policy.c/IsRightsAuthorized/574/Policy
Domain: Coder; rights=Read; pattern="JPEG" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Policy identify[3172]: policy.c/IsRightsAuthorized/574/Policy
Domain: Path; rights=Read; pattern="test.jpg" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Blob identify[3172]: blob.c/OpenBlob/2598/Blob
read 3 magic header bytes
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Resource identify[3172]: resource.c/AcquireMagickResource/279/Resource
Map: 49.6KB/48.5KiB/1.9545GiB
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Start of Image"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "JFIF APP0 marker: version 1.01, density 72x72 1"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Quantization Table 0 precision 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Quantization Table 1 precision 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Start Of Frame 0xc0: width=482, height=550, components=3"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 1: 2hx2v q=0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 2: 1hx1v q=1"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 3: 1hx1v q=1"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Huffman Table 0x00"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 1 0 2 3 1 1 1 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 0 0 0 0 0 0 0 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Huffman Table 0x10"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 0 2 1 3 2 4 4 4"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 3 6 4 5 3 3 4 3"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Huffman Table 0x01"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 1 0 3 1 1 1 0 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 0 0 0 0 0 0 0 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Define Huffman Table 0x11"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 0 2 2 1 2 3 4 10"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " 2 2 3 1 1 1 0 0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: "Start Of Scan: 3 components"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 1: dc=0 ac=0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 2: dc=1 ac=1"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Component 3: dc=1 ac=1"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGWarningHandler/362/Coder
[test.jpg] JPEG Trace: " Ss=0, Se=63, Ah=0, Al=0"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Coder identify[3172]: jpeg.c/JPEGErrorHandler/316/Coder
[test.jpg] JPEG Trace: "Requested feature was omitted at compile time"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "/usr/share/ImageMagick-6/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "/usr/lib/ImageMagick-6.8.9//config-Q16/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "/etc/ImageMagick-6/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "/usr/share/doc/ImageMagick-6/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "//.config/ImageMagick/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Locale identify[3172]: locale.c/GetLocaleOptions/829/Locale
Searching for locale file: "//.magick/locale.xml"
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: locale.c/LoadLocaleCache/1187/Configure
Loading locale configure file "/usr/share/ImageMagick-6/locale.xml" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Configure identify[3172]: locale.c/LoadLocaleCache/1187/Configure
Loading locale configure file "/usr/share/ImageMagick-6/english.xml" ...
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Exception identify[3172]: jpeg.c/JPEGErrorHandler/322/Exception
Requested feature was omitted at compile time `test.jpg'
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Resource identify[3172]: resource.c/RelinquishMagickResource/862/Resource
Map: 49.6KB/0B/1.9545GiB
2015-01-08T03:27:23+00:00 0:00.010 0.000u 6.8.9 Cache identify[3172]: cache.c/DestroyPixelCache/965/Cache
destroy
identify: Requested feature was omitted at compile time `test.jpg' @ error/jpeg.c/JPEGErrorHandler/322.
What might I be doing wrong when compiling imagemagick? Or, what may be misconfigured on my system to cause the issue?Breakpoint 3, 0x4fcf9401 in ThrowMagickException () from /usr/lib/libMagickCore-6.Q16.so.2
(gdb) bt
#0 0x4fcf9401 in ThrowMagickException () from /usr/lib/libMagickCore-6.Q16.so.2
#1 0x4fe95038 in ?? () from /usr/lib/libMagickCore-6.Q16.so.2
#2 0x4fb74ac6 in ?? () from /usr/lib/libjpeg.so
#3 0x4fb6e370 in ?? () from /usr/lib/libjpeg.so
#4 0x4fb6d8c9 in ?? () from /usr/lib/libjpeg.so
#5 0x4fb6d9f5 in jpeg_start_decompress () from /usr/lib/libjpeg.so
#6 0x4fe970a0 in ?? () from /usr/lib/libMagickCore-6.Q16.so.2
#7 0x4fcaa5a4 in ReadImage () from /usr/lib/libMagickCore-6.Q16.so.2
#8 0x4fdb7dac in ReadStream () from /usr/lib/libMagickCore-6.Q16.so.2
#9 0x4fca9e83 in PingImage () from /usr/lib/libMagickCore-6.Q16.so.2
#10 0x4fcaa146 in PingImages () from /usr/lib/libMagickCore-6.Q16.so.2
#11 0x4f29f2f3 in IdentifyImageCommand () from /usr/lib/libMagickWand-6.Q16.so.2
#12 0x4f2c403b in MagickCommandGenesis () from /usr/lib/libMagickWand-6.Q16.so.2
#13 0x080487e2 in IdentifyMain (argv=0xbffff5d4, argc=2) at utilities/identify.c:80
#14 main (argc=2, argv=0xbffff5d4) at utilities/identify.c:93
Thanks!