Page 1 of 2

failure building 6.3.5-9

Posted: 2007-09-15T15:26:46-07:00
by mi

Code: Select all

...
/bin/sh /opt/bin/libtool --silent --tag=CC   --mode=link cc  -O2 -fno-strict-aliasing -pipe -march=opteron -no-undefined -version-info 10:8:0 -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -o wand/libWand.la -rpath /opt/lib wand/animate.lo wand/compare.lo wand/composite.lo wand/conjure.lo wand/convert.lo wand/deprecate.lo wand/display.lo wand/drawing-wand.lo wand/identify.lo wand/import.lo wand/magick-image.lo wand/magick-property.lo wand/magick-wand.lo wand/mogrify.lo wand/montage.lo wand/pixel-iterator.lo wand/pixel-wand.lo wand/stream.lo wand/wand.lo magick/libMagick.la -lSM -lICE -lX11  -lm 
/bin/sh /opt/bin/libtool --silent --tag=CXX   --mode=link g++  -O2 -fno-strict-aliasing -pipe -march=opteron -version-info 10:8:0 -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -o Magick++/lib/libMagick++.la -rpath /opt/lib Magick++/lib/Blob.lo Magick++/lib/BlobRef.lo Magick++/lib/CoderInfo.lo Magick++/lib/Color.lo Magick++/lib/Drawable.lo Magick++/lib/Exception.lo Magick++/lib/Functions.lo Magick++/lib/Geometry.lo Magick++/lib/Image.lo Magick++/lib/ImageRef.lo Magick++/lib/Montage.lo Magick++/lib/Options.lo Magick++/lib/Pixels.lo Magick++/lib/STL.lo Magick++/lib/Thread.lo Magick++/lib/TypeMetric.lo magick/libMagick.la wand/libWand.la 
/bin/sh /opt/bin/libtool --silent --tag=CC   --mode=link cc  -O2 -fno-strict-aliasing -pipe -march=opteron -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -o utilities/animate utilities/animate.o magick/libMagick.la wand/libWand.la 
/bin/sh /opt/bin/libtool --silent --tag=CC   --mode=link cc  -O2 -fno-strict-aliasing -pipe -march=opteron -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -L/opt/lib -L/opt/lib -R/opt/lib -L/opt/lib -Wl,--rpath -Wl,/opt/lib -lfreetype -lz -L/opt/lib -o utilities/compare utilities/compare.o magick/libMagick.la wand/libWand.la 
magick/.libs/libMagick.so: undefined refmagick/.libs/libMagick.soerence to `AnalyzeImage'
: undefined reference to `AnalyzeImage'
gmake: *** [utilities/animate] Помилка 1

Re: failure building 6.3.5-9

Posted: 2007-09-15T16:36:07-07:00
by magick
We will have a patch for this problem by tomorrow. Thanks.

Re: failure building 6.3.5-9

Posted: 2007-09-15T23:10:20-07:00
by mi
Thank you.

But... What about the pre-release testing, which -- it was claimed earlier -- not only takes place, but is thorough enough to run through the (non-)regression tests?

6.3.5-9 was not in the beta-subdirectory...

Re: failure building 6.3.5-9

Posted: 2007-09-16T07:05:25-07:00
by magick
The problem you reported did not show up in our pre-release testing. We're investigating now why we failed to detect the problem.

Continuing failure building 6.3.5-9

Posted: 2007-09-16T09:12:45-07:00
by mi
Hello!

I found the "new" 6.3.5-9 tarball on the FTP site (one really should not release different contents under the same name -- ever) and tried building it.

It built, but, unfortunately, failed to pass those (in)famous self-tests:

Code: Select all

....
PASS: utilities/tests/wave.sh
PASS: utilities/tests/montage.sh
========================================================
All 696 tests behaved as expected (11 expected failures)
========================================================
cd PerlMagick && make CC='cc' test
/bin/sh ../magick.sh PERL_DL_NONLAZY=1 /opt/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/jbig/*.t t/jpeg/*.t t/jp2/*.t t/png/*.t t/tiff/*.t t/wmf/*.t t/wmf/*.t t/zlib/*.t
t/blob............Can't load '/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/PerlMagick/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/magick/.libs/libMagick.so.10: Undefined symbol "DrawSetViewbox" at /opt/lib/perl5/5.8.8/mach/DynaLoader.pm line 230.
 at t/blob.t line 7
Compilation failed in require at t/blob.t line 7.
BEGIN failed--compilation aborted at t/blob.t line 7.
Deep recursion on subroutine "Image::Magick::AUTOLOAD" at /var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/PerlMagick/blib/lib/Image/Magick.pm line 42.
I guess, the tests aren't really run on every release, despite the constant assertions to the contrary :-(

Re: failure building 6.3.5-9

Posted: 2007-09-16T11:34:28-07:00
by magick
As mentioned, a release version of ImageMagick will fail to build if any regression test fails. We built the 6.3.5-9 release on 5 different OS'es before the release but we do not have access to a FreeBSD system. DrawSetViewbox() is in the MagickWand library. Make sure -lWand is part of your link command line and the undefined reference should go away.

Re: failure building 6.3.5-9

Posted: 2007-09-16T11:37:30-07:00
by mi
How can I make sure of anything here? I just did a straight-forward build, followed by a straightforward "make check"...

Please, advise. Thank you.

Re: failure building 6.3.5-9

Posted: 2007-09-16T11:43:30-07:00
by magick
In PerlMagick/Makefile.PL.in change

-L../magick/.libs -lMagick

to

-L../magick/.libs -lMagick -L../wand/.libs -lWand

in three different locations in the file and rebuild/reinstall ImageMagick. See if that fixes the problem. The dependency only shows up for the optional WMF coder. You can also add --without-wmf to your configure script command line.

Re: failure building 6.3.5-9

Posted: 2007-09-17T09:01:28-07:00
by mi
You mean, the next release will have this issue fixed, right?

Thank you!

Ok, so I applied the following patch:

Code: Select all

--- PerlMagick/Makefile.PL.in   2007-08-25 20:19:02.000000000 -0400
+++ PerlMagick/Makefile.PL.in   2007-09-17 12:04:48.000000000 -0400
@@ -57,5 +57,5 @@
 
    # Linker flags for building a dynamically loadable module
-   'LDDLFLAGS'  => "-L../magick/.libs -lMagick $Config{'lddlflags'} @LDFLAGS@",
+   'LDDLFLAGS'  => "-L../magick/.libs -lMagick -L../wand/.libs -lWand $Config{'lddlflags'} @LDFLAGS@",
 
    # Install PerlMagick binary into ImageMagick bin directory
rebuilt, and tried to run "check" again. The very first PerlMagick-test hung. Using top I observed the ever growing memory consumption of the perl process. I killed it after it reached about 5Gb of total VM use (I have 2Gb of RAM).

It appears, consuming all available memory is Perl's (or PerlMagick's) reaction to being unable to load a shared library. The real problem, revealed by killing a PerlMagick process, is thus:

Code: Select all

t/filter..........Can't load '/var/ports/graphics/ImageMagick/work/ImageMagick-6.3.5/PerlMagick/blib/arch/auto/Image/Magick/Magick.so' for module Image::Magick: Shared object "libWand.so.10" not found, required by "Magick.so" at /opt/lib/perl5/5.8.8/mach/DynaLoader.pm line 230.
In addition to the patch above, one more fix is needed:

Code: Select all

--- magick.sh.in        2007-08-25 20:19:02.000000000 -0400
+++ magick.sh.in        2007-09-17 12:42:36.000000000 -0400
@@ -33,5 +33,5 @@
 fi
 env \
-  LD_LIBRARY_PATH="${top_builddir}/magick/.libs:${LD_LIBRARY_PATH}" \
+  LD_LIBRARY_PATH="${top_builddir}/magick/.libs:${top_builddir}/wand/.libs:${LD_LIBRARY_PATH}" \
   MAGICK_CODER_MODULE_PATH="${MAGICK_CODER_MODULE_PATH}" \
   MAGICK_CONFIGURE_PATH="${MAGICK_CONFIGURE_BUILD_PATH}${DIRSEP}${MAGICK_CONFIGURE_SRC_PATH}" \
Grumble, grumble...

3 of the PerlMagick self-tests fail in 6.3.5-9

Posted: 2007-09-17T10:11:13-07:00
by mi
After all of the above-described travails, I get:

Code: Select all

cd PerlMagick && make CC='cc' test
/bin/sh ../magick.sh PERL_DL_NONLAZY=1 /opt/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/jbig/*.t t/jpeg/*.t t/jp2/*.t t/png/*.t t/tiff/*.t t/wmf/*.t t/wmf/*.t t/zlib/*.t
t/blob............ok                                                         
t/bzlib/read......ok                                                         
t/bzlib/write.....ok                                                         
t/composite.......ok
t/filter..........FAILED tests 24, 31                                        
        Failed 2/58 tests, 96.55% okay
t/getattribute....ok
t/jbig/read.......ok
t/jbig/write......ok
t/jp2/read........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............FAILED test 9                                              
        Failed 1/48 tests, 97.92% okay
t/setattribute....ok                                                         
t/tiff/read.......ok                                                         
t/tiff/write......ok                                                         
t/wmf/read........ok                                                         
t/wmf/read........ok                                                         
t/write...........ok                                                         
t/zlib/read.......ok                                                         
t/zlib/write......ok                                                         
Failed Test Stat Wstat Total Fail  List of Failed
-------------------------------------------------------------------------------
t/filter.t                58    2  24 31
t/read.t                  48    1  9
Failed 2/25 test scripts. 3/338 subtests failed.
Files=25, Tests=338, 13 wallclock secs (12.17 cusr +  1.22 csys = 13.39 CPU)
Failed 2/25 test programs. 3/338 subtests failed.
*** Error code 255
My Perl is 5.8.8. Please, advise. Thanks!

Re: failure building 6.3.5-9

Posted: 2007-09-17T10:43:23-07:00
by magick
The PerlMagick regression tests are generally fuzzy meaning a few pixels may differ due to floating point round off. Chances are the fuzzy factor sensitivity is not adjusted high enough. Try
  • perl t/filter.t
and see what is returned for the Implode test. Most likely you are getting values just slightly higher than the default which we do not consider a problem.

We will adjust the sensistivity in 6.3.5-10 Beta and have added the couple of other patches you suggest for the next release. 6.3.5-10 will be released shortly to correct the problems you have posted here.

Re: failure building 6.3.5-9

Posted: 2007-09-17T12:14:14-07:00
by mi
Uhm, Ok. Here are the two failures in filter:

Code: Select all

...
Frame('15x15+3+3') ...
ok 22
Gamma(1.6) ...
ok 23
GaussianBlur('0.0x1.5') ...
  mean-error=0,000409859084298681, maximum-error=0,137254901960784
not ok 24
Implode(0.5) ...
ok 25
...
Minify() ...
ok 30
Modulate(brightness=>110,saturation=>110,hue=>110) ...
  mean-error=0,00454840589262133, maximum-error=0,298039215686275
not ok 31
Quantize(colorspace=>'gray',colors=>2,dither=>'false') ...
ok 32
...
And here is the failing piece of the read.t:

Code: Select all

...
CompuServe graphics interchange format ...
ok 7
CompuServe graphics interchange format (1987) ...
ok 8
Gradient (gradual passing from one shade to another) ...
mean-error=0,168202603872282, maximum-error=1
not ok 9
GRANITE (granite texture) ...
ok 10
...
Are you sure, all three are, in reality, acceptable? I would like to make FreeBSD's build-cluster perform these tests automatically, when it builds binary package. I'll be shot at, if the tests exhibit bogus failures like this...

Also, why is FreeBSD/amd64 different in this regard from Linux/x64, where you are running the same tests yourselves?

Re: failure building 6.3.5-9

Posted: 2007-09-17T12:42:55-07:00
by magick
We assure you the sensitivity adjustment is ok. The mean-error is computed over thousands of pixels and the slight difference you got is considered insignificant. Until we generate new reference images we expect a slight difference over previous releases because our interpolation method changed slightly producing subtle differences in the computed and referenced image, a difference that drove up the maximum fuzzy value but drove it up in a expected manner. Feel free to edit the fuzzy values in t/filter, t/read so the tests will pass. In the mean-time we will regenerate the reference images and adjust the sensitivity for the 6.3.5-10 release.

Another example of fuzziness is the PerlMagick annotation test. The Freetype folks sometimes render text slightly differently from release to release. We need to set a fuzzy value to accommodate these possible differences. If the annotation regression tests fails, it does not mean there is a problem or bug, just that we need to adjust the sensitivity value up to account for different versions of Freetype.

Re: failure building 6.3.5-9

Posted: 2007-09-17T14:27:41-07:00
by magick
We ran the regression tests on our 64-bit Fedora Core system and our 64-bit Windows systems a few hours ago and all the tests passed as expected.

Re: failure building 6.3.5-9

Posted: 2007-09-17T17:44:02-07:00
by mi
Fedora is using the same compiler (gcc) and on the same CPU should be producing the exact same results... Unless there is something wrong with the algorithm. Could it be losing precision -- there are ways to (mis)order arithmetic operations, which would lead to precision loss?

The tests were passing just a month ago, so the changes to the computations are recent and should be easy enough to examine. I don't think it is Ok for the same version of ImageMagick to produce (even if slightly) different output from the same input on different platforms... Do you?