Click here to get back home

On CygwinPerl, Digest::SHA fails all tests (yet passed on CPAN-testers)

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
On CygwinPerl, Digest::SHA fails all tests (yet passed on CPAN-testers) somian 05-04-2006
Posted by somian on May 4, 2006, 7:55 am
Please log in for more thread options


I've got trouble trying to install the module Digest::SHA 5.34 to a
cygwin installation that seems otherwise healthy and "normal" (can
install other pure-perl and xs-perl CPAN modules).

The very first test t/1-exist in the test suite dies, for example.

Partial screenscrape of Perl debugger session showing where program
dies:

DB<3>
ExtUtils::Command::MM::test_harness(/usr/lib/perl5/5.8/ExtUtils/Command/MM.pm:55):
55: Test::Harness::runtests(sort { lc $a cmp lc $b } @ARGV);
DB<3>
t/1-exist....
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Thu May 4 07:26:27 2006
# Current time GMT: Thu May 4 11:26:27 2006
# Using Test.pm version 1.25
dubious
Test returned status 0 (wstat 139, 0x8b)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/1-exist.t 0 139 1 2 200.00% 1
1
Failed 1/1 test scripts, 0.00% okay. 1/1 subtests failed, 0.00% okay.
at /usr/lib/perl5/5.8/Test/Harness.pm line 547
Test::Harness::_show_results('HASH(0x10482068)',
'HASH(0x1048202c)') called at /usr/lib/perl5/5.8/Test/Harness.pm line
208
Test::Harness::runtests('t/1-exist.t') called at
/usr/lib/perl5/5.8/ExtUtils/Command/MM.pm line 55
ExtUtils::Command::MM::test_harness(2, 'blib/lib', 'blib/arch')
called at -e line 1
Debugged program terminated. Use q to quit or R to restart
----------------------
OK, so in the interest of completeness I'll provide some context info
about the system:
* It's a Windows NT 4 (service pack 6) system. I don't know that any
cpan-testers evaluating this module ran their test with NT
4/Cygwinperl:
Windows NT Ver 4.0 Build 1381 Service Pack 6

* Cygwin DLL version info:
DLL version: 1.5.19 Build date: Fri Jan 20 13:28:43 EST 2006

* CC:
gcc 3.4.4-1

* Perl:
5.8.7 (5.008007)

* 'make' stage output;
cp SHA.pm blib/lib/Digest/SHA.pm
/usr/bin/perl.exe /usr/lib/perl5/5.8/ExtUtils/xsubpp -typemap
/usr/lib/perl5/5.8/ExtUtils/typemap -typemap typemap SHA.xs > SHA.xsc
&& mv SHA.xsc SHA.c
gcc -c -I. -DPERL_USE_SAFE_PUTENV -fno-strict-aliasing -pipe
-I/usr/local/include -DUSEIMPORTLIB -O3 -DVERSION=\"5.34\"
-DXS_VERSION=\"5.34\" "-I/usr/lib/perl5/5.8/cygwin/CORE"
-DSHA_PERL_MODULE -DSHA_THREAD_SAFE SHA.c
Running Mkbootstrap for Digest::SHA ()
chmod 644 SHA.bs
rm -f blib/arch/auto/Digest/SHA/SHA.dll
LD_RUN_PATH="" ld2 -s -L/usr/local/lib SHA.o -o
blib/arch/auto/Digest/SHA/SHA.dll
/usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a
gcc -shared -o SHA.dll -Wl,--out-implib=libSHA.dll.a
-Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608
-Wl,--enable-auto-image-base \
-s -L/usr/local/lib SHA.o /usr/lib/perl5/5.8/cygwin/CORE/libperl.dll.a
Creating library file: libSHA.dll.a
mv SHA.dll libSHA.dll.a blib/arch/auto/Digest/SHA/
chmod 755 blib/arch/auto/Digest/SHA/SHA.dll
cp SHA.bs blib/arch/auto/Digest/SHA/SHA.bs
chmod 644 blib/arch/auto/Digest/SHA/SHA.bs
cp shasum blib/script/shasum
/usr/bin/perl.exe "-MExtUtils::MY" -e "MY->fixin(shift)"
blib/script/shasum

----------------------
Here's the entire output from 'make test'
----------------------
/usr/bin/perl.exe "-MExtUtils::Command::MM" "-e" "test_harness(2,
'blib/lib', 'blib/arch')" t/*.t
t/0-pod-coverage.........1..0 # Skip Test::Pod::Coverage 0.08 required
for testing POD coverage
skipped
all skipped: Test::Pod::Coverage 0.08 required for testing POD
coverage
t/0-pod..................1..0 # Skip Test::Pod 1.00 required for
testing POD
skipped
all skipped: Test::Pod 1.00 required for testing POD
t/1-exist................1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Thu May 4 05:59:21 2006
# Current time GMT: Thu May 4 09:59:21 2006
# Using Test.pm version 1.25
dubious
        Test returned status 0 (wstat 139, 0x8b)
DIED. FAILED test 1
        Failed 1/1 tests, 0.00% okay
t/1-hello-world..........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-1...........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-224.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-256.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-384.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-512.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-base64......dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-sha-oo..........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-vectors-bit.....dubious
        Test returned status 0 (wstat 139, 0x8b)
t/2-nist-vectors-byte....dubious
        Test returned status 0 (wstat 139, 0x8b)
t/3-gillogly-easy........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/3-gillogly-hard........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/4-bitstr-increasing....dubious
        Test returned status 0 (wstat 139, 0x8b)
t/4-bitstr-large.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/4-bitstr-random........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/5-hmac-fips198.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/5-hmac-rfc2202.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/5-hmac-sha-256.........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/5-hmac-woodbury........dubious
        Test returned status 0 (wstat 139, 0x8b)
t/6-dump-load............dubious
        Test returned status 0 (wstat 139, 0x8b)
t/7-ireland..............dubious
        Test returned status 0 (wstat 139, 0x8b)
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/1-exist.t 0 139 1 2 200.00% 1
t/1-hello-world.t 0 139 ?? ?? % ??
t/2-nist-sha-1.t 0 139 ?? ?? % ??
t/2-nist-sha-224.t 0 139 ?? ?? % ??
t/2-nist-sha-256.t 0 139 ?? ?? % ??
t/2-nist-sha-384.t 0 139 ?? ?? % ??
t/2-nist-sha-512.t 0 139 ?? ?? % ??
t/2-nist-sha-base64.t 0 139 ?? ?? % ??
t/2-nist-sha-oo.t 0 139 ?? ?? % ??
t/2-nist-vectors-bit.t 0 139 ?? ?? % ??
t/2-nist-vectors-byte.t 0 139 ?? ?? % ??
t/3-gillogly-easy.t 0 139 ?? ?? % ??
t/3-gillogly-hard.t 0 139 ?? ?? % ??
t/4-bitstr-increasing.t 0 139 ?? ?? % ??
t/4-bitstr-large.t 0 139 ?? ?? % ??
t/4-bitstr-random.t 0 139 ?? ?? % ??
t/5-hmac-fips198.t 0 139 ?? ?? % ??
t/5-hmac-rfc2202.t 0 139 ?? ?? % ??
t/5-hmac-sha-256.t 0 139 ?? ?? % ??
t/5-hmac-woodbury.t 0 139 ?? ?? % ??
t/6-dump-load.t 0 139 ?? ?? % ??
t/7-ireland.t 0 139 ?? ?? % ??
2 tests skipped.
Failed 22/24 test scripts, 8.33% okay. 1/1 subtests failed, 0.00% okay.
make: *** [test_dynamic] Error 255
-------------------------

I've searched the Cygwin lists and cygwin-perl on Yahoo!Groups, no info
that seemed relevent, so if anyone has an insight please reply. TIA.

Soren Andersen


Posted by Sisyphus on May 4, 2006, 7:21 pm
Please log in for more thread options



> I've got trouble trying to install the module Digest::SHA 5.34 to a
> cygwin installation that seems otherwise healthy and "normal" (can
> install other pure-perl and xs-perl CPAN modules).
>
> The very first test t/1-exist in the test suite dies, for example.
>

That test simply tries to load the module you've just (successfully) built.
What happens if you run:

perl -Mblib t/t1-exist.t

Cheers,
Rob



Posted by somian on May 10, 2006, 12:32 am
Please log in for more thread options


Hi, Sisyphus, thanks for replying.

Precisely what happens when I tried the above just now was this:

$ perl -Mblib t/1-exist.t
1..1
# Running under perl version 5.008007 for cygwin
# Current time local: Wed May 10 00:30:31 2006
# Current time GMT: Wed May 10 04:30:31 2006
# Using Test.pm version 1.25
Segmentation fault (core dumped)


Posted by Sisyphus on May 10, 2006, 3:19 pm
Please log in for more thread options



> Hi, Sisyphus, thanks for replying.
>
> Precisely what happens when I tried the above just now was this:
>
> $ perl -Mblib t/1-exist.t
> 1..1
> # Running under perl version 5.008007 for cygwin
> # Current time local: Wed May 10 00:30:31 2006
> # Current time GMT: Wed May 10 04:30:31 2006
> # Using Test.pm version 1.25
> Segmentation fault (core dumped)
>

Yuk.

So if you change t/1-exist.t so that it contains simply:

use Digest::SHA ();

and then re-run 'perl -Mblib t/1-exist.t', do you find it still segfaults ?
I wouldn't know what to make of a segfault caused by merely loading a
module. Were there any compiler warnings during 'make' that might give a
hint to the cause ?

I'm glad I don't use Cygwin :-)

Cheers,
Rob



Posted by somian on May 15, 2006, 6:29 am
Please log in for more thread options


I finally tracked down the real cause of the failure, and the
"executive summary" version is that it wasn't Digest::SHA's fault at
all.

There was a MIME::Base64 module in my @INC pathlist that was generating
a segfault each time loading it was attempted. Thus any module that
used it (like Digest::SHA) would fail at the loading stage.

The @INC included modules built for cygwin perl 5.8.2. Removing the
offending installation of MIME::Base64 (that was 'shadowing' the one
shipped with Cygwinperl) fixed the problem.

Glad that's figured out, now I can presumably have hashsum-checking on
CPAN modules I'm installing.

Regards,
Soren Andersen (perlspinr, somian, Intrepid)


Similar ThreadsPosted
Archive::Tar fails tests on AIX August 17, 2004, 6:30 pm
Config::Any fails tests on install February 24, 2007, 2:49 pm
Problem to install Parse::Lex, all tests fails October 24, 2005, 8:15 pm
Soap Lite - raw XML passed to function October 24, 2006, 1:35 pm
tests failing for .xs routines October 4, 2005, 10:19 am
what module to use when writing automation tests? August 25, 2008, 12:37 am
[ANN] Digest::SHA 5.28 (w/ shasum) November 18, 2004, 12:50 pm
Module Digest:SHA June 12, 2006, 8:00 am
LWP and Digest authentication February 8, 2007, 1:50 pm
ANNOUNCE: Digest::SHA 5.28 (w/ shasum) November 18, 2004, 7:42 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap