Page 1 of 1

MPEG read tests fail

Posted: 2014-02-19T12:15:40-07:00
by r40k
Hello.

I am using perlbrew and i was trying to build ImageMagick for it. I managed to point builder to local directory with compiled IM, it finds it, but fails at test stage:

Code: Select all

Entering PerlMagick-6.87
META.yml/json not found. Creating skeleton for it.
Running Makefile.PL
Configuring PerlMagick-6.87 ... Checking if your kit is complete...
Looks good
Writing Makefile for Image::Magick
Writing MYMETA.yml and MYMETA.json
OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.66)
Building and testing Image-Magick-6.87 ... cp Magick.pm blib/lib/Image/Magick.pm
AutoSplitting blib/lib/Image/Magick.pm (blib/lib/auto/Image/Magick)
/home/nikita/local/perls/5.18.2/bin/perl /home/nikita/local/perls/5.18.2/lib/5.18.2/ExtUtils/xsubpp  -typemap /home/nikita/local/perls/5.18.2/lib/5.18.2/ExtUtils/typemap -typemap typemap  Magick.xs > Magick.xsc && mv Magick.xsc Magick.c
cc -c  -I/usr/local/include/ImageMagick-6 -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/include/libxml2 -I"/home/nikita/local/include/ImageMagick-6" -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/freetype2 -g -O2 -Wall -pthread -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -O2   -DVERSION=\"6.87\" -DXS_VERSION=\"6.87\" -fPIC "-I/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE"  -D_LARGE_FILES=1 -DHAVE_CONFIG_H Magick.c
Running Mkbootstrap for Image::Magick ()
chmod 644 Magick.bs
rm -f blib/arch/auto/Image/Magick/Magick.so
LD_RUN_PATH="/home/nikita/local/lib:/usr/lib/../lib" cc  -L/usr/local/lib -lMagickCore-6.Q16 -shared -O2 -L/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE -L/home/nikita/local/lib -L/usr/local/lib -fstack-protector  Magick.o  -o blib/arch/auto/Image/Magick/Magick.so 	\
	   -L/usr/local/lib -lMagickCore-6.Q16 -lperl -lm  	\
	  
chmod 755 blib/arch/auto/Image/Magick/Magick.so
cp Magick.bs blib/arch/auto/Image/Magick/Magick.bs
chmod 644 blib/arch/auto/Image/Magick/Magick.bs
Manifying blib/man3/Image::Magick.3
PERL_DL_NONLAZY=1 /home/nikita/local/perls/5.18.2/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bzlib/*.t t/jpeg/*.t t/jng/*.t t/mpeg/*.t t/png/*.t t/tiff/*.t t/zlib/*.t
t/blob.t .......... ok   
t/bzlib/read.t .... ok   
t/bzlib/write.t ... ok   
t/composite.t ..... ok     
t/filter.t ........ ok     
t/getattribute.t .. ok     
t/jng/read.t ...... ok     
t/jng/write.t ..... ok     
t/jpeg/read.t ..... ok   
t/jpeg/write.t .... ok   
t/montage.t ....... ok     
t/mpeg/read.t ..... Failed 2/2 subtests 
t/ping.t .......... ok   
t/png/read-16.t ... ok   
t/png/read.t ...... ok   
t/png/write-16.t .. ok   
t/png/write.t ..... ok   
t/read.t .......... ok     
t/setattribute.t .. ok     
t/tiff/read.t ..... ok     
t/tiff/write.t .... ok     
t/write.t ......... ok     
t/zlib/read.t ..... ok   
t/zlib/write.t .... ok   

Test Summary Report
-------------------
t/mpeg/read.t   (Wstat: 0 Tests: 2 Failed: 2)
  Failed tests:  1-2
Files=24, Tests=355,  4 wallclock secs ( 0.13 usr  0.03 sys +  6.63 cusr  0.45 csys =  7.24 CPU)
Result: FAIL
Failed 1/24 test programs. 2/355 subtests failed.
make: *** [test_dynamic] Error 255
FAIL
! Installing Image::Magick failed. See /home/nikita/.cpanm/work/1392837093.24864/build.log for details. Retry with --force to force install it.
Using look command in cpan, i ran tests manually:

Code: Select all

nikita@freevideo-develop:PerlMagick-6.87-0KSMJ0$ prove -v t/mpeg/read.t t/mpeg/read.t .. 
1..2
  testing reading from file "input.m2v" ...
ReadImage()
Image: input.m2v, signatures do not match.
     Expected: b41936e37b153bc3627167a6ff9520d92fa256e7cc967ba29acfbaad5812ff11
     Computed: 11fabe4dc3114c91da9d4f905bc69a2ab30608b9a550c0d775f0be06f3b39cd0
     Depth:    16
  testing reading from BLOB with magick "MPEG"...
BlobToImage()
Image: input.m2v, signatures do not match.
     Expected: b41936e37b153bc3627167a6ff9520d92fa256e7cc967ba29acfbaad5812ff11
     Computed: 11fabe4dc3114c91da9d4f905bc69a2ab30608b9a550c0d775f0be06f3b39cd0
     Depth:    16
not ok 1
  testing reading from file "input.mpg" ...
ReadImage()
Image: input.mpg, signatures do not match.
     Expected: 113b91329ec4ad7d147e910e5fd8340d06db419ce6d0258de8993ec4673fc7b
     Computed: 113b91329ec4ad7d147e910e5fd8340d06db419ce6d0258de8993ec4673fc7bc
     Depth:    16
  testing reading from BLOB with magick "MPEG"...
BlobToImage()
Image: input.mpg, signatures do not match.
     Expected: 113b91329ec4ad7d147e910e5fd8340d06db419ce6d0258de8993ec4673fc7b
     Computed: 113b91329ec4ad7d147e910e5fd8340d06db419ce6d0258de8993ec4673fc7bc
     Depth:    16
not ok 2
Failed 2/2 subtests 

Test Summary Report
-------------------
t/mpeg/read.t (Wstat: 0 Tests: 2 Failed: 2)
  Failed tests:  1-2
Files=1, Tests=2,  0 wallclock secs ( 0.03 usr  0.00 sys +  0.08 cusr  0.02 csys =  0.13 CPU)
Result: FAIL
For some reason, content in test files is different from the test expects. Is there's a workaround?

Update. Configuration:

Code: Select all

-> % uname -a
Linux freevideo-develop 3.5.0-43-generic #66-Ubuntu SMP Wed Oct 23 12:01:49 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

Code: Select all

perlbrew install 5.18.2 -j8 -Dlocincpth="/home/nikita/local/include /usr/local/include" -Dloclibpth="/home/nikita/local/lib /usr/local/lib" -Dincpath="/home/nikita/local" -Dglibpth="/home/nikita/local/lib /usr/local/lib /usr/lib" -Darchlib="/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi" -Dusrinc="/home/nikita/local/include" -Dldflags="-L/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE" -Dlddflags="-L/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE" --Duselargefiles -Duseshrplib -Dcccdlflags=-fPIC -Duse64bitall -Dusethreads --as 5.18.2

Code: Select all

LIBS="-lavformat -lavutil" CPPFLAGS="-L/home/nikita/local/lib -I/home/nikita/local/include" LDFLAGS="-I/home/nikita/local/lib -L/home/nikita/local/lib/perl5/5.18.2/x86_64-linux-thread-multi/CORE/" ./configure --prefix=/home/nikita/local/ --with-perl=/home/nikita/local/perls/5.18.2/bin/perl --enable-shared --with-lcms2