Skip Menu |

This queue is for tickets about the Image-Info CPAN distribution.

Report information
The Basics
Id: 19071
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Image-Info

People
Owner: TELS [...] cpan.org
Requestors: perlspinr=XfrvlLN1Pqtfpb/ySbbPhw [...] public.gmane.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.21
Fixed in: 1.22

Attachments


Subject: CygwinPerl build test: Image::Info::TIFF broken
The build on CygwinPerl 5.8.7 is broken. Fails tests as listed in the screenscrape below. TIA. -=-=-=-=- FIXED WIDTH FONT FOR BEST VIEWING -=-=-=-=-=-=-=-=-=-=- Running make test /usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/00_basics.t t/bmp.t t/exif.t t/png.t t/pod.t t/pod_cov.t t/string.t t/tiff.t t/tiff_e.t t/tiny-pgm.t t/00_basics....ok t/bmp..........ok t/exif.........ok t/png..........ok t/pod..........ok 11/11 skipped: Test::Pod not installed on this system t/pod_cov......ok 7/7 skipped: Test::Pod::Coverage 1.00 required for testing POD coverage t/string.......ok 1/22Use of uninitialized value in pack at ../lib/Image/Info/TIFF.pm line 83. Use of uninitialized value in pack at ../lib/Image/Info/TIFF.pm line 83. # Failed test (t/string.t at line 63) # got: 'short read (2/0) at ../lib/Image/Info/TIFF.pm line 86. # ' # expected: undef Out of memory! # Looks like you planned 22 tests but only ran 17. t/string.......dubious Test returned status 6 (wstat 1536, 0x600) DIED. FAILED tests 17-22 Failed 6/22 tests, 72.73% okay (less 2 skipped tests: 14 okay, 63.64%) t/tiff.........Use of uninitialized value in pack at ../lib//Image/Info/TIFF.pm line 83. Use of uninitialized value in pack at ../lib//Image/Info/TIFF.pm line 83. # Failed test (t/tiff.t at line 19) # got: '1' # expected: '3' Can't use an undefined value as an ARRAY reference at t/tiff.t line 22. # Looks like you planned 12 tests but only ran 2. # Looks like your test died just after 2. t/tiff.........dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 2-12 Failed 11/12 tests, 8.33% okay t/tiff_e.......Use of uninitialized value in pack at ../lib//Image/Info/TIFF.pm line 83. Use of uninitialized value in pack at ../lib//Image/Info/TIFF.pm line 83. # Failed test (t/tiff_e.t at line 26) # got: undef # expected: '4' # Failed test (t/tiff_e.t at line 27) # got: undef # expected: '260' # Failed test (t/tiff_e.t at line 28) # got: undef # expected: '6' # Looks like you failed 3 tests of 10. t/tiff_e.......dubious Test returned status 3 (wstat 768, 0x300) DIED. FAILED tests 3-5 Failed 3/10 tests, 70.00% okay t/tiny-pgm.....ok Failed Test Stat Wstat Total Fail Failed List of Failed ----------------------------------------------------------------------------------------------------------------------------------------- t/string.t 6 1536 22 11 50.00% 17-22 t/tiff.t 255 65280 12 21 175.00% 2-12 t/tiff_e.t 3 768 10 3 30.00% 3-5 20 subtests skipped. Failed 3/10 test scripts, 70.00% okay. 20/96 subtests failed, 79.17% okay. make: *** [test_dynamic] Error 255 /usr/bin/make test -- NOT OK -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Soren Andersen (Intrepid/perlspinr/somian) -- Also email <perlspinr=XfrvlLN1Pqtfpb/ySbbPhw@public.gmane.org>.
Subject: Re: [rt.cpan.org #19071] CygwinPerl build test: Image::Info::TIFF broken
Date: Thu, 4 May 2006 16:30:44 +0200
To: bug-Image-Info [...] rt.cpan.org
From: Tels <nospam-abuse [...] bloodgate.com>
Helo, On Thursday 04 May 2006 14:54, Soren Andersen via RT wrote: Show quoted text
> Thu May 04 08:54:17 2006: Request 19071 was acted upon. > Transaction: Ticket created by SOMIAN > Queue: Image-Info > Subject: CygwinPerl build test: Image::Info::TIFF broken > Owner: Nobody > Requestors: perlspinr=XfrvlLN1Pqtfpb/ySbbPhw@public.gmane.org > Status: new > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=19071 >
OMG. I tested it on linux, someone tested it on debian and mac and ppc and it still breaks :( I'll have a look, but I can't debug it from here because all machines I have access to pass all tests. maybe its a line-ending issues,needing a binmode() somewhere? best wishes, tels -- Signed on Thu May 4 16:29:25 2006 with key 0x93B84C15. Visit my photo gallery at http://bloodgate.com/photos/ PGP key on http://bloodgate.com/tels.asc or per email. "Retsina?" - "Ja, Papa?" - "Warp 3." - "Is gut, Papa."
Download (untitled)
application/pgp-signature 481b

Message body not shown because it is not plain text.

Works for me on SunOS mint-square 5.10 Generic_118822-26 sun4u sparc SUNW,Sun-Fire-V440 I don't think it's a line ending issue (he's running Cygwin). The part of the code it's borking at is testing byteorder which is odd since Windows/Cygwin doesn't have a non-standard byte-order.
Also, when patching feel free to update the AUTHOR section to something like: Maintained by Tels. Many patches by Ben Wheeler. Created by Jerrad Pierce <jpierce@cpan.org>
From: mike.bristow [...] thus.net
On Thu May 04 11:04:37 2006, JPIERCE wrote: Show quoted text
> I don't think it's a line ending issue (he's running Cygwin). The part > of the code it's borking at is testing byteorder which is odd since > Windows/Cygwin doesn't have a non-standard byte-order.
If your userland is 64bit, then $Config{byteorder} is '12345678' (or 87654321). This confuses _read_order into swapping bytes that shouldn't be swapped. As evidence, I give you the build results from a virgin set of source: on Solaris-8-sparc for michaelb: fail on Solaris-9-i386 for michaelb: fail on Solaris-9-sparc for michaelb: fail on RedHat-3AS-ia32 for michaelb: success on RedHat-3FC-i386 for michaelb: success on RedHat-FC.5-i386 for michaelb: success on Solaris-10-sparc for michaelb: fail on RedHat-FC.4-i386 for michaelb: success on Solaris-10-i386 for michaelb: fail on RedHat-EL.4-i386 for michaelb: success (ie: we work on RedHat, and fail on Solaris). If we look at Config{byteorder} on these machines: solaris-8-sparc: 87654321 solaris-9-sparc: 87654321 solaris-9-i386: 12345678 solaris-10-sparc: 87654321 solaris-10-i386: 12345678 redhat-3as-ia32: 1234 redhat-el4-i386: 1234 redhat-3fc-i386: 1234 redhat-fc4-i386: 1234 redhat-fc5-i386: 1234 (ie, for us, redhat is run in 32 bit mode and solaris in 64 bit mode) Is the cygwin build on a 64 bit box? Is the working solaris build on a box with a 32bit userland?
From: mike.bristow [...] thus.net
On Thu May 04 08:54:17 2006, SOMIAN wrote: Show quoted text
> The build on CygwinPerl 5.8.7 is broken. Fails tests as listed in the > screenscrape below. TIA.
I had a similar problem. The attached patch fixes it for me. Does it fix it for you?
Index: lib/Image/Info/TIFF.pm =================================================================== RCS file: /cvsroot/upstream/Image-Info/lib/Image/Info/TIFF.pm,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.1.2.3 diff -u -r1.1.1.1 -r1.1.1.1.2.3 --- lib/Image/Info/TIFF.pm 13 Mar 2006 20:46:19 -0000 1.1.1.1 +++ lib/Image/Info/TIFF.pm 19 Jun 2006 12:31:52 -0000 1.1.1.1.2.3 @@ -67,13 +67,20 @@ seek($fh,$curoffset,0); } +sub _hostbyteorder { + my $hbo = $Config{byteorder}; + if ($hbo =~ /^1234/) { return '1234' } + if ($hbo =~ /4321$/) { return '4321' } + die "Unexpected host byteorder: $hbo"; +} + sub _read_order { my($source, $len,$byteorder) = @_; my $buf; my $n = read($source, $buf, $len); # maybe reverse - if ($byteorder ne $Config{byteorder}) { + if ($byteorder ne _hostbyteorder()) { my @bytes = unpack("C$len",$buf); my @newbytes; # swap bytes @@ -117,7 +124,8 @@ sub _process_ifds { my($info, $fh, $page, $tagsseen, $byteorder, $ifdoffset) = @_; my $curpos = tell($fh); - seek($fh,$ifdoffset,0); + seek($fh,$ifdoffset,0) + or die "Cannot seek to $ifdoffset"; my $n = unpack("S",_read_order($fh, 2, $byteorder)); ## Number of entries my $i = 1; @@ -138,7 +146,7 @@ ## if it fits into 4 bytes. my $len = $typelen * $count; if ($len <= 4) { - if (($byteorder ne $Config{byteorder}) && ($len != 4)) { + if (($byteorder ne _hostbyteorder()) && ($len != 4)) { my @bytes = unpack("C4", $value_offset_orig); for (my $i=0; $i < 4 - $len; $i++) { shift @bytes; } $value_offset_orig = pack("C$len", @bytes);