ImageMagick build fails with FPX enabled

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
bsd-unix

ImageMagick build fails with FPX enabled

Post by bsd-unix »

OS: FreeBSD 6.2-STABLE (2007-09-20)
Platform: I386

When trying to update to ImageMagick-6.3.5.10 with the FPX option (default is
ON) the build fails with this excerpt from the log:

Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/fpx/read.t 0 139 5 10 1-5
t/fpx/write.t 0 139 4 8 1-4
Failed 2/25 test scripts. 9/343 subtests failed.
Files=25, Tests=343, 18 wallclock secs (13.57 cusr + 1.84 csys = 15.41 CPU)
Failed 2/25 test programs. 9/343 subtests failed.
*** Error code 255

Stop in /usr/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/PerlMagick.
*** Error code 1

The FPX option was disabled and it was able to update. I was asked to run
a couple of tests from the WRKSRC/PerlMagick directory and report it here:

# perl t/fpx/read.t
1..5
1-bit grayscale FPX ...
testing reading from file "input_bw.fpx" ...
ReadImage input_bw.fpx: Exception 420: no decode delegate for this image format
`input_bw.fpx'
testing reading from BLOB with magick ""...
BlobToImage input_bw.fpx: Exception 395: unable to open module file `/usr/local/
lib/ImageMagick/modules-Q16/coders/fpx.la': No such file or directory
not ok 1
8-bit grayscale FPX ...
testing reading from file "input_grayscale.fpx" ...
ReadImage input_grayscale.fpx: Exception 420: no decode delegate for this image
format `input_grayscale.fpx'
testing reading from BLOB with magick ""...
BlobToImage input_grayscale.fpx: Exception 395: unable to open module file `/usr
/local/lib/ImageMagick/modules-Q16/coders/fpx.la': No such file or directory
not ok 2
8-bit indexed-color FPX ...
testing reading from file "input_256.fpx" ...
ReadImage input_256.fpx: Exception 420: no decode delegate for this image format
`input_256.fpx'
testing reading from BLOB with magick ""...
BlobToImage input_256.fpx: Exception 395: unable to open module file `/usr/local
/lib/ImageMagick/modules-Q16/coders/fpx.la': No such file or directory
not ok 3
24-bit Truecolor FPX ...
testing reading from file "input_truecolor.fpx" ...
ReadImage input_truecolor.fpx: Exception 420: no decode delegate for this image
format `input_truecolor.fpx'
testing reading from BLOB with magick ""...
BlobToImage input_truecolor.fpx: Exception 395: unable to open module file `/usr
/local/lib/ImageMagick/modules-Q16/coders/fpx.la': No such file or directory
not ok 4
24-bit JPEG FPX ...
testing reading from file "input_jpeg.fpx" ...
ReadImage input_jpeg.fpx: Exception 420: no decode delegate for this image forma
t `input_jpeg.fpx'
testing reading from BLOB with magick ""...
BlobToImage input_jpeg.fpx: Exception 395: unable to open module file `/usr/loca
l/lib/ImageMagick/modules-Q16/coders/fpx.la': No such file or directory
not ok 5

# perl t/fpx/write.t
1..4
1-bit grayscale FPX ...
ReadImage input_bw.fpx: Exception 420: no decode delegate for this image format `input_bw.fpx'
not ok 1
8-bit grayscale FPX ...
ReadImage input_grayscale.fpx: Exception 420: no decode delegate for this image format `input_grayscale.fpx'
not ok 2
8-bit indexed-color FPX ...
ReadImage input_256.fpx: Exception 420: no decode delegate for this image format `input_256.fpx'
not ok 3
24-bit Truecolor FPX ...
ReadImage input_truecolor.fpx: Exception 420: no decode delegate for this image format `input_truecolor.fpx'
not ok 4

I do have libfpx-1.2.0.12 installed on the system.

Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick build fails with FPX enabled

Post by magick »

Type
  • identify -list configure
    identify -list format
Is -lfpx listed in the configure output and is FPX listed with a mode of rw-? If not, ImageMagick was not build with FPX support and that would cause the regression tests to fail. Also check to see if you have more than one version of ImageMagick installed on your system. Perhaps one that has FPX enabled and one that doesn't. Take a look at /usr/local/lib/ImageMagick 6.3.5/modules/coders and see if fpx.so and fpx.la is present.
bsd-unix

Re: ImageMagick build fails with FPX enabled

Post by bsd-unix »

My apologies. Instead of turning off the "Run bundled self-tests after build" as I had been asked to do, I had turned off the FPX option. I repeated the tests so
they will probably make much more sense:

# perl t/fpx/read.t
1..5
1-bit grayscale FPX ...
testing reading from file "input_bw.fpx" ...
ReadImage input_bw.fpx: Exception 425: image type not supported `input_bw.fpx'
testing reading from BLOB with magick ""...
Segmentation fault (core dumped)

# perl t/fpx/write.t
1..4
1-bit grayscale FPX ...
ReadImage input_bw.fpx: Exception 425: image type not supported `input_bw.fpx'
not ok 1
8-bit grayscale FPX ...
ReadImage input_grayscale.fpx: Exception 430: unable to open file `input_grayscale.fpx': Bad file descriptor
not ok 2
8-bit indexed-color FPX ...
Segmentation fault (core dumped)

It appears that fpx is listed in the configure output and FPX is listed with a mode of rw-. The complete output is:

# identify -list configure

Path: /usr/local/lib/ImageMagick/config/configure.xml

Name Value
-------------------------------------------------------------------------------
CC cc
CFLAGS -O -pipe -Wall -W
CONFIGURE ./configure /usr/local/share/config.site /usr/local/etc/config.sit
e
COPYRIGHT Copyright (C) 1999-2007 ImageMagick Studio LLC
CPPFLAGS -I/usr/local/include
CXX c++
CXXFLAGS -O -pipe -Wall -W
DEFS -DHAVE_CONFIG_H
DELEGATES bzlib fontconfig fpx freetype jbig jpeg jp2 lcms png tiff x11 xml
zlib
DISTCHECK_CONFIG_FLAGS 'CC=cc' 'CFLAGS=-O -pipe ' 'CPPFLAGS=-I/usr/local/include
' 'CXX=c++' 'LDFLAGS=-L/usr/local/lib' --disable-deprecate --with-quantum-depth=
16 --with-dps=no --with-gslib=no --with-wmf=no --with-fontpath= --with-gvc=no --
with-rsvg=no
EXEC-PREFIX /usr/local
HOST i386-portbld-freebsd6.2
LDFLAGS -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -R/usr/local/li
b -L/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -lfreetype -lz -L/usr/local/li
b
LIB_VERSION 0x635
LIB_VERSION_NUMBER 6,3,5,10
LIBS -lMagick -ljbig -llcms -ltiff -lfreetype -ljasper -ljpeg -lpng -lf
px -L/usr/local/lib -lfontconfig -lXext -lXt -lSM -lICE -lX11 -lbz2 -lxml2 -lz -
lm
NAME ImageMagick
PCFLAGS
PREFIX /usr/local
QuantumDepth 16
RELEASE_DATE 09/26/07
VERSION 6.3.5
WEBSITE http://www.imagemagick.org

# identify -list format

Format Module Mode Description
-------------------------------------------------------------------------------
A* RAW rw+ Raw alpha samples
ART* ART rw- PFS: 1st Publisher Clip Art
AVI* AVI r-- Microsoft Audio/Visual Interleaved
AVS* AVS rw+ AVS X image
B* RAW rw+ Raw blue samples
BIE* JBIG rw- Joint Bi-level Image experts Group interchange format (1.6)
BMP* BMP rw- Microsoft Windows bitmap image
BMP2* BMP -w- Microsoft Windows bitmap image v2
BMP3* BMP -w- Microsoft Windows bitmap image v3
C* RAW rw+ Raw cyan samples
CAPTION* CAPTION r-- Image caption
CIN* CIN rw+ Cineon Image File
CIP* CIP -w- Cisco IP phone image format
CLIP* CLIP -w+ Image Clip Mask
CMYK* CMYK rw+ Raw cyan, magenta, yellow, and black samples
CMYKA* CMYK rw+ Raw cyan, magenta, yellow, black, and opacity samples
CR2 DNG r-- Canon Digital Camera Raw Image Format
CRW DNG r-- Canon Digital Camera Raw Image Format
CUR* CUR rw- Microsoft icon
CUT* CUT r-- DR Halo
DCM* DCM r-- Digital Imaging and Communications in Medicine image
DICOM is used by the medical community for images like X-rays. The
specification, "Digital Imaging and Communications in Medicine
(DICOM)", is available at http://medical.nema.org/. In particular,
see part 5 which describes the image encoding (RLE, JPEG, JPEG-LS),
and supplement 61 which adds JPEG-2000 encoding.
DCR DNG r-- Kodak Digital Camera Raw Image File
DCX* PCX rw+ ZSoft IBM PC multi-page Paintbrush
DFONT* TTF r-- Multi-face font package (Freetype 2.2.1)
DNG DNG r-- Digital Negative
DPS DPS --- Display Postscript Interpreter
DPX* DPX rw+ SMPTE 268M-2003 (DPX 2.0)
Digital Moving Picture Exchange Bitmap, Version 2.0.
See SMPTE 268M-2003 specification at http://www.smtpe.org

EPDF PDF rw- Encapsulated Portable Document Format
EPI PS rw- Encapsulated PostScript Interchange format
EPS PS rw- Encapsulated PostScript
EPS2* PS2 -w- Level II Encapsulated PostScript
EPS3* PS3 -w+ Level III Encapsulated PostScript
EPSF PS rw- Encapsulated PostScript
EPSI PS rw- Encapsulated PostScript Interchange format
EPT EPT rw- Encapsulated PostScript with TIFF preview
EPT2 EPT rw- Encapsulated PostScript Level II with TIFF preview
EPT3 EPT rw+ Encapsulated PostScript Level III with TIFF preview
EXR* EXR --- High Dynamic-range (HDR)
FAX* FAX rw+ Group 3 FAX
FAX machines use non-square pixels which are 1.5 times wider than they
are tall but computer displays use square pixels, therefore FAX images
may appear to be narrow unless they are explicitly resized using a
geometry of "150x100%".

FITS* FITS rw- Flexible Image Transport System
FPX FPX rw- FlashPix Format
FRACTAL* PLASMA r-- Plasma fractal image
FTS* FTS rw- Flexible Image Transport System
G* RAW rw+ Raw green samples
G3* FAX rw- Group 3 FAX
GIF* GIF rw+ CompuServe graphics interchange format
GIF87* GIF rw- CompuServe graphics interchange format (version 87a)
GRADIENT* GRADIENT r-- Gradual passing from one shade to another
GRAY* GRAY rw+ Raw gray samples
HISTOGRAM* HISTOGRAM -w- Histogram of the image
HTM* HTML -w- Hypertext Markup Language and a client-side image map
HTML* HTML -w- Hypertext Markup Language and a client-side image map
ICB* TGA rw+ Truevision Targa image
ICO* ICON rw+ Microsoft icon
ICON* ICON rw- Microsoft icon
INFO INFO -w+ The image format and characteristics
IPL* IPL rw+ IPL Image Sequence
JBG* JBIG rw+ Joint Bi-level Image experts Group interchange format (1.6)
JBIG* JBIG rw+ Joint Bi-level Image experts Group interchange format (1.6)
JNG* PNG rw- JPEG Network Graphics
See http://www.libpng.org/pub/mng/ for details about the JNG format.
The JNG 1.0 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/mng/documents/.
JP2* JP2 rw- JPEG-2000 File Format Syntax
JPC* JPC rw- JPEG-2000 Code Stream Syntax
JPEG* JPEG rw- Joint Photographic Experts Group JFIF format (62)
JPG* JPEG rw- Joint Photographic Experts Group JFIF format
JPX* JPX rw- JPEG-2000 File Format Syntax
K* RAW rw+ Raw black samples
LABEL* LABEL r-- Image label
M* RAW rw+ Raw magenta samples
M2V MPEG rw+ MPEG Video Stream
MAP* MAP rw- Colormap intensities and indices
MAT* MAT rw+ MATLAB image format
MATTE* MATTE -w+ MATTE format
MIFF* MIFF rw+ Magick Image File Format
MNG* PNG rw+ Multiple-image Network Graphics (libpng 1.2.18)
See http://www.libpng.org/pub/mng/ for details about the MNG format.
The MNG 1.0 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/mng/documents/.
MONO* MONO rw- Raw bi-level bitmap
MPC* MPC rw+ Magick Persistent Cache image format
MPEG MPEG rw+ MPEG Video Stream
MPG MPEG rw+ MPEG Video Stream
MRW DNG r-- Sony (Minolta) Raw Image File
MSL* MSL rw+ Magick Scripting Language
MSVG* SVG rw+ ImageMagick's own SVG internal renderer
MTV* MTV rw+ MTV Raytracing image format
MVG* MVG rw- Magick Vector Graphics
NEF DNG r-- Nikon Digital SLR Camera Raw Image File
NULL* NULL rw- Constant image of uniform color
O* RAW rw+ Raw opacity samples
ORF DNG r-- Olympus Digital Camera Raw Image File
OTB* OTB rw- On-the-air bitmap
OTF* TTF r-- Open Type font (Freetype 2.2.1)
PAL* UYVY rw- 16bit/pixel interleaved YUV
PALM* PALM rw+ Palm pixmap
PAM* PNM rw+ Common 2-dimensional bitmap format
PATTERN* PATTERN r-- Predefined pattern
PBM* PNM rw+ Portable bitmap format (black and white)
PCD* PCD rw- Photo CD
PCDS* PCD rw- Photo CD
PCL PCL rw- Printer Control Language
PCT* PICT rw- Apple Macintosh QuickDraw/PICT
PCX* PCX rw- ZSoft IBM PC Paintbrush
PDB* PDB rw+ Palm Database ImageViewer Format
PDF PDF rw+ Portable Document Format
PEF DNG r-- Pentax Electronic File
PFA* TTF r-- Postscript Type 1 font (ASCII) (Freetype 2.2.1)
PFB* TTF r-- Postscript Type 1 font (binary) (Freetype 2.2.1)
PFM* PFM rw+ Portable float format
PGM* PNM rw+ Portable graymap format (gray scale)
PGX* PGX r-- JPEG-2000 VM Format
PICON* XPM rw- Personal Icon
PICT* PICT rw- Apple Macintosh QuickDraw/PICT
PIX* PIX r-- Alias/Wavefront RLE image format
PJPEG* JPEG rw- Progessive Joint Photographic Experts Group JFIF
PLASMA* PLASMA r-- Plasma fractal image
PNG* PNG rw- Portable Network Graphics (libpng 1.2.18)
See http://www.libpng.org/ for details about the PNG format. The
PNG 1.2 specification is available there and at
ftp://swrinde.nde.swri.edu/pub/png/documents/.
PNG24* PNG rw- 24-bit RGB PNG, opaque only (zlib 1.2.3)
PNG32* PNG rw- 32-bit RGBA PNG, semitransparency OK
PNG8* PNG rw- 8-bit indexed PNG, binary transparency only
PNM* PNM rw+ Portable anymap
PPM* PNM rw+ Portable pixmap format (color)
PREVIEW* PREVIEW -w- Show a preview an image enhancement, effect, or f/x
PS PS rw+ PostScript
PS2* PS2 -w+ Level II PostScript
PS3* PS3 -w+ Level III PostScript
PSD* PSD rw+ Adobe Photoshop bitmap
PTIF* TIFF rw- Pyramid encoded TIFF
PWP* PWP r-- Seattle Film Works
R* RAW rw+ Raw red samples
RAF DNG r-- Fuji CCD-RAW Graphic File
RAS* SUN rw+ SUN Rasterfile
RGB* RGB rw+ Raw red, green, and blue samples
RGBA* RGB rw+ Raw red, green, blue, and alpha samples
RGBO* RGB rw+ Raw red, green, blue, and opacity samples
RLA* RLA r-- Alias/Wavefront image
RLE* RLE r-- Utah Run length encoded image
SCR* SCR r-- ZX-Spectrum SCREEN$
SCT* SCT r-- Scitex HandShake
SFW* SFW r-- Seattle Film Works
SGI* SGI rw+ Irix RGB image
SHTML* HTML -w- Hypertext Markup Language and a client-side image map
STEGANO* STEGANO r-- Steganographic image
SUN* SUN rw+ SUN Rasterfile
SVG* SVG rw+ Scalable Vector Graphics (XML 2.6.30)
SVGZ* SVG rw+ Compressed Scalable Vector Graphics (XML 2.6.30)
TEXT* TXT rw+ Text
TGA* TGA rw+ Truevision Targa image
THUMBNAIL* THUMBNAIL -w+ EXIF Profile Thumbnail
TIFF* TIFF rw+ Tagged Image File Format (LIBTIFF, Version 3.8.2)
TIFF64* TIFF --- Tagged Image File Format (64-bit) (LIBTIFF, Version 3.8.2)
TILE* TILE r-- Tile image with a texture
TIM* TIM r-- PSX TIM
TTC* TTF r-- TrueType font collection (Freetype 2.2.1)
TTF* TTF r-- TrueType font (Freetype 2.2.1)
TXT* TXT rw+ Text
UIL* UIL -w- X-Motif UIL table
UYVY* UYVY rw- 16bit/pixel interleaved YUV
VDA* TGA rw+ Truevision Targa image
VICAR* VICAR rw- VICAR rasterfile format
VID* VID rw+ Visual Image Directory
VIFF* VIFF rw+ Khoros Visualization image
VST* TGA rw+ Truevision Targa image
WBMP* WBMP rw- Wireless Bitmap (level 0) image
WMF* WMF --- Windows Meta File
WMZ* WMZ --- Compressed Windows Meta File
WPG* WPG r-- Word Perfect Graphics
X* X rw+ X Image
X3F DNG r-- Sigma Camera RAW Picture File
XBM* XBM rw- X Windows system bitmap (black and white)
XC* XC r-- Constant image uniform color
XCF* XCF r-- GIMP image
XPM* XPM rw- X Windows system pixmap (color)
XV* VIFF rw+ Khoros Visualization image
XWD* XWD rw- X Windows system window dump (color)
Y* RAW rw+ Raw yellow samples
YCbCr* YCbCr rw+ Raw Y, Cb, and Cr samples
YCbCrA* YCbCr rw+ Raw Y, Cb, Cr, and opacity samples
YUV* YUV rw- CCIR 601 4:1:1 or 4:2:2

* native blob support

My full build log is at:
http://myfreebsd.homeunix.net/updates/p ... 09.26.0600
with FPX enabled.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick build fails with FPX enabled

Post by magick »

Try the following:
  • convert -debug exception logo: logo.fpx
    convert -debug exception logo.fpx logo.png
You should get a message explaining why the dynamic loader could not load the fpx.so module.
bsd-unix

Re: ImageMagick build fails with FPX enabled

Post by bsd-unix »

Actually that seems to work:

# pwd
/usr/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/PerlMagick
# convert -debug exception logo: logo.fpx
# convert -debug exception logo.fpx logo.png
# ls -l logo*
-rw-r--r-- 1 root wheel 1406976 Sep 26 22:29 logo.fpx
-rw-r--r-- 1 root wheel 94951 Sep 26 22:29 logo.png
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick build fails with FPX enabled

Post by magick »

Ok the dynamic loader loads fpx.so when its run from the command line but fails when its called from PerlMagick. Perhaps there is a symbol conflict. Not sure because on our systems read/write of FPX files works fine. If any user has some insight into this problem, let us know.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: ImageMagick build fails with FPX enabled

Post by mi »

Could you, please, post the output of

Code: Select all

uname -a
identify PerlMagick/t/fpx/input_jpeg.fpx
Thanks!
bsd-unix

Re: ImageMagick build fails with FPX enabled

Post by bsd-unix »

FreeBSD 6.2-STABLE #0: Thu Sep 20 12:16:05 EDT 2007

# identify PerlMagick/t/fpx/input_jpeg.fpx
identify: no decode delegate for this image format `PerlMagick/t/fpx/input_jpeg.fpx'.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: ImageMagick build fails with FPX enabled

Post by mi »

bsd-unix wrote:FreeBSD 6.2-STABLE #0: Thu Sep 20 12:16:05 EDT 2007

# identify PerlMagick/t/fpx/input_jpeg.fpx
identify: no decode delegate for this image format `PerlMagick/t/fpx/input_jpeg.fpx'.
Thanks. My question was addressed to "magick" -- or anyone else, for whom FPX works properly.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: ImageMagick build fails with FPX enabled

Post by mi »

mi wrote:
bsd-unix wrote:FreeBSD 6.2-STABLE #0: Thu Sep 20 12:16:05 EDT 2007

# identify PerlMagick/t/fpx/input_jpeg.fpx
identify: no decode delegate for this image format `PerlMagick/t/fpx/input_jpeg.fpx'.
Thanks. My question was addressed to "magick" -- or anyone else, for whom FPX works properly.
Its been 10 days. Am I to conclude, FPX does not work properly for magick-team themselves? I suspect so -- the library is quite broken on 32-bit systems, and woefully broken on 64-bit systems... The "long" is assumed to be 32-bit in too many places in the code...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: ImageMagick build fails with FPX enabled

Post by magick »

We double-checked and FPX is working fine for us under Fedora 32 and 64-bit environments. When we get a chance we'll try under Windows and Mac OS X.

The FPX library itself is not maintained by our team other than to apply patches by users that send them to us occasionally. If you see a bug in the FPX library, feel free to post a patch here.
Post Reply