How to disable FPX?

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
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

How to disable FPX?

Post by mi »

Hi!

Although I have libfpx installed, I don't want IM to use it, because the library is incredibly buggy -- especially on 64-bit platforms.

So I specify ``--without-fpx'' to IM's configure.

Apparently, FPX support is nonetheless compiled in, and the regression tests (make check) try to test the FPX code leading to spectacular crashes. Here is my build log.

Here are my questions:
  • How to reliably turn FPX support off from both the binaries and the regression tests?
  • Why was not this problem discovered, when running regression tests on 64-bit RedHat?
Thanks!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to disable FPX?

Post by magick »

FPX works fine for us on 64-bit Redhat. ImageMagick does not include FPX support by default. Run
  • ./configure
and check the last 40 or so lines of output. It should say that FPX was not included. From your build log it looks like there are FreeBSD patches against ImageMagick. Its possible one of the patches is enabling FPX support. Since we did not write the patches we can't help you.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: How to disable FPX?

Post by mi »

Could I see the log of `make check' from 64-bit RedHat?

I know, fpx should not be included in IM by default. Especially, if I explicitly specify ``--without-fpx'' -- and I do.

In the log, that I keep referring to, you can see that fpx is set to no:

Code: Select all

FlashPIX          --with-fpx=no			no
Unfortunately, you can also see regression tests trying (and failing) to use FPX -- just use your browser's search functionality to find the strings "FPX" throughout the logfile. For example:

Code: Select all

...
/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/.libs/rwblob /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/input_bilevel.miff FPX 
rwblob: unable to initialize FPX library `/var/tmp/magick-VlrvNuGL'.
Segmentation fault (core dumped)
XFAIL: tests/rwblob_FPX_bilevel.sh
/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/.libs/rwblob /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/input_gray.miff FPX 
rwblob: unable to initialize FPX library `/var/tmp/magick-7FvTkxFF'.
Segmentation fault (core dumped)
XFAIL: tests/rwblob_FPX_gray.sh
/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/.libs/rwblob /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/input_pallette.miff FPX 
rwblob: unable to initialize FPX library `/var/tmp/magick-GbG7YOBt'.
Segmentation fault (core dumped)
XFAIL: tests/rwblob_FPX_pallette.sh
/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/.libs/rwblob /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/input_truecolor.miff FPX 
rwblob: unable to initialize FPX library `/var/tmp/magick-amfqYSzT'.
Segmentation fault (core dumped)
XFAIL: tests/rwblob_FPX_truecolor.sh
...
/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/.libs/rwfile /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/tests/input_bilevel.miff FPX 
Failed to read image from file in format FPX
Segmentation fault (core dumped)
...
Could you explain the discrepancy? Thank you!
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to disable FPX?

Post by magick »

Not sure why its failing for you but we will review the problem and report back.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Large number of test-failures

Post by mi »

Hi,

I just downloaded the "released" version of 6.3.5-3 (not from beta/) and tried building and running `make check' again.

The result: 133 of 696 tests failed. The build and test log is now updated with these results.

All of the failures are segmentation faults, and many (though not all) of them are related to FPX, which is being explicitly disabled by a configure-argument.

Still awaiting a link to the log of `make check' on a RedHat/amd64 system. I do not believe, things are smooth over there either...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to disable FPX?

Post by magick »

Here are the last few lines of the regression tests for a x86_64 system:
  • uname -a
    Linux eureka.es.dupont.com 2.6.18-8.1.8.el5 #1 SMP Mon Jun 25 17:06:07 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux
    ...
    PASS: utilities/tests/segment.sh
    PASS: utilities/tests/shade.sh
    PASS: utilities/tests/sharpen.sh
    PASS: utilities/tests/shave.sh
    PASS: utilities/tests/shear.sh
    PASS: utilities/tests/solarize.sh
    PASS: utilities/tests/spread.sh
    PASS: utilities/tests/swirl.sh
    PASS: utilities/tests/unsharpmask.sh
    PASS: utilities/tests/wave.sh
    PASS: utilities/tests/montage.sh
    ========================================================
    All 696 tests behaved as expected (33 expected failures)
    ========================================================
    cd PerlMagick && make CC='gcc' test
    make[2]: Entering directory `/home/cristy/ImageMagick-6.3.5/PerlMagick'
    /bin/sh ../magick.sh PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/jpeg/*.t t/png/*.t t/tiff/*.t t/zlib/*.t
    t/blob............ok
    t/bzlib/read......ok
    t/bzlib/write.....ok
    t/composite.......ok
    t/filter..........ok
    t/getattribute....ok
    t/jpeg/read.......ok
    t/jpeg/write......ok
    t/montage.........ok
    t/png/read-16.....ok
    t/png/read........ok
    t/png/write-16....ok
    t/png/write.......ok
    t/read............ok
    t/setattribute....ok
    t/tiff/read.......ok
    t/tiff/write......ok
    t/write...........ok
    t/zlib/read.......ok
    t/zlib/write......ok
    All tests successful.
    Files=20, Tests=326, 3 wallclock secs ( 2.59 cusr + 0.60 csys = 3.19 CPU)
We will rerun the regression tests under AMD64 when we get a chance.
User avatar
mi
Posts: 123
Joined: 2005-01-25T14:14:43-07:00
Contact:

Re: How to disable FPX?

Post by mi »

I did some investigation -- having removed FPX from my system altogether.

It seems, that all of the crashes reported by rwblob and rwfile are upon exit -- when main() has already returned:

Code: Select all

Core was generated by `rwfile'.
Program terminated with signal 11, Segmentation fault.
#0  0x0000000804008cc0 in ?? ()
(gdb) where
#0  0x0000000804008cc0 in ?? ()
#1  0x00000008020079e2 in __cxa_finalize () from /lib/libc.so.6
#2  0x0000000802007637 in exit () from /lib/libc.so.6
#3  0x0000000000401085 in _start ()
(gdb) quit
Ok, this is "easily" overcome by disabling module support. Something is wrong with the dynamic module-loading -- I observed a similar problem on FreeBSD/i386 too.

Now I get the happy:

Code: Select all

All 696 tests behaved as expected (11 expected failures)
and only have to worry about PerlMagick tests running out of memory -- see a separate topic on this forum.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to disable FPX?

Post by magick »

We noticed that one of librsvg dependancies causes the segmentation fault. It has an improper signal handler or atexit() handler (we're guessing). You can fix the problem by adding --without-rsvg to your configure script command line. SVG will still convert but it will use the internal ImageMagick SVG render engine.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: How to disable FPX?

Post by magick »

We eliminated atexit() in Magick++ as you suggested. We also patched the configure script so you must explicitly enable Jasper to include it in a built-- at least until the Jasper distribution is patched to avoid the dlclose faults.
Post Reply