Operating System - HP-UX
1752777 Members
6210 Online
108789 Solutions
New Discussion юеВ

Perl module WWW::Mechanize compilation failure

 
SOLVED
Go to solution

Perl module WWW::Mechanize compilation failure

Hi. I have developers that need this module made available. I have installed the evaluation ANSI C compiler from HP's website and all of the depedencies for WWW::Mechanize compiled successfully, however the WWW::Mechanize itself bombs out. I have tried via the CPAN interface as well as downloading the module and compiling it manually. They both fail with the same error. Can anyone help me out with why it's failing or point me in the right direction on what avenue to pursue next? I'm pretty sure I can't call up HP Response and open a case on this.

Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/00-load.t t/add_header.t t/aliases.t t/area_link.t t/autocheck.t t/clone.t t/cookies.t t/credentials-api.t t/credentials.t t/die.t t/field.t t/find_frame.t t/find_image.t t/find_inputs.t t/find_link-warnings.t t/find_link.t t/find_link_id.t t/form-parsing.t t/frames.t t/image-new.t t/image-parse.t t/link-base.t t/link-relative.t t/link.t t/new.t t/pod-coverage.t t/pod.t t/regex-error.t t/save_content.t t/select.t t/taint.t t/tick.t t/untaint.t t/upload.t t/warn.t t/warnings.t t/local/back.t t/local/click.t t/local/click_button.t t/local/failure.t t/local/follow.t t/local/form.t t/local/get.t t/local/overload.t t/local/page_stack.t t/local/referer.t t/local/reload.t t/local/submit.t t/live/encoding.t t/live/wikipedia.t t/mech-dump/mech-dump.t
t/00-load................ok 1/2# Testing WWW::Mechanize 1.66, with LWP 6.02, Perl 5.008008, /usr/bin/perl
# Test::Memory::Cycle 1.04 is installed.
t/00-load................ok
t/add_header.............ok
t/aliases................ok
t/area_link..............ok
t/autocheck..............Invalid type 'W' in unpack at t/autocheck.t line 19.
# Looks like your test died before it could output anything.
t/autocheck..............dubious
Test returned status 255 (wstat 65280, 0xff00)
t/clone..................ok
t/cookies................# Test server http://127.0.0.1:23651 as PID 6978
t/cookies................ok
t/credentials-api........ok
t/credentials............ok
t/die....................ok
t/field..................ok
t/find_frame.............ok
t/find_image.............ok
t/find_inputs............ok
t/find_link-warnings.....ok
t/find_link..............ok
t/find_link_id...........ok
t/form-parsing...........ok
t/frames.................ok
t/image-new..............ok
t/image-parse............ok
t/link-base..............ok
t/link-relative..........ok
t/link...................ok
t/live/encoding..........ok 7/13
t/live/encoding..........NOK 12/13# Failed test ' ... Got encoding (?:cp|windows-)1251'
# at t/live/encoding.t line 32.
# 'UTF-8'
# doesn't match '(?i-xsm:(?:cp|windows-)1251)'
# Looks like you failed 1 test of 13.
t/live/encoding..........dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 12
Failed 1/13 tests, 92.31% okay
t/live/wikipedia.........ok
t/local/back.............ok 1/47# Started http://localhost:59466/
t/local/back.............ok
t/local/click............ok 1/9# Started http://localhost:59484/
t/local/click............ok
t/local/click_button.....ok 1/19# Started http://localhost:59493/
t/local/click_button.....ok
4/19 unexpectedly succeeded
TODO PASSED tests 15-17, 19

t/local/failure..........Invalid type 'W' in unpack at t/local/failure.t line 20.
# Looks like your test died before it could output anything.
t/local/failure..........dubious
Test returned status 255 (wstat 65280, 0xff00)
t/local/follow...........ok 1/22# Started http://localhost:59500/
t/local/follow...........ok
t/local/form.............ok 1/13# Started http://localhost:59512/
t/local/form.............ok
t/local/get..............ok 1/32# Started http://localhost:59515/
t/local/get..............ok
t/local/overload.........skipped
all skipped: Mysteriously stopped passing, and I don't know why.
t/local/page_stack.......ok 1/16# Started http://localhost:59525/
t/local/page_stack.......ok
t/local/referer..........ok
t/local/reload...........ok 1/14# Started http://localhost:59539/
t/local/reload...........ok
t/local/submit...........ok 1/13# Started http://localhost:59543/
t/local/submit...........ok
t/mech-dump/mech-dump....ok
t/new....................ok
t/pod-coverage...........skipped
all skipped: Test::Pod::Coverage 1.04 required for testing POD coverage
t/pod....................skipped
all skipped: Test::Pod 1.14 required for testing POD
t/regex-error............ok
t/save_content...........ok
t/select.................ok
t/taint..................skipped
all skipped: Test::Taint required for checking taintedness
t/tick...................ok
t/untaint................skipped
all skipped: Test::NoWarnings not installed
t/upload.................ok
t/warn...................ok
t/warnings...............ok
Failed Test Stat Wstat Total Fail List of Failed
-----------------------------------------------------------------------------------------------------------------------------
t/autocheck.t 255 65280 ?? ?? ??
t/live/encoding.t 1 256 13 1 12
t/local/failure.t 255 65280 ?? ?? ??
(4 subtests UNEXPECTEDLY SUCCEEDED), 5 tests skipped.
Failed 3/51 test scripts. 1/551 subtests failed.
Files=51, Tests=551, 66 wallclock secs (48.05 cusr + 7.01 csys = 55.06 CPU)
Failed 3/51 test programs. 1/551 subtests failed.
*** Error exit code 255

Stop.
PETDANCE/WWW-Mechanize-1.66.tar.gz
make test -- NOT OK
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running make install
make test had returned bad status, won't install without force
Failed during this command:
PETDANCE/WWW-Mechanize-1.66.tar.gz : make_test NO
6 REPLIES 6
Dennis Handly
Acclaimed Contributor

Re: Perl module WWW::Mechanize compilation failure

>however the WWW::Mechanize itself bombs out.

Where?
t/autocheck..............Invalid type 'W' in unpack at t/autocheck.t line 19.
# Looks like your test died before it could output anything.

Re: Perl module WWW::Mechanize compilation failure

It appears to fail here:

t/live/encoding..........NOK 12/13# Failed test ' ... Got encoding (?:cp|windows-)1251'
# at t/live/encoding.t line 32.
# 'UTF-8'
# doesn't match '(?i-xsm:(?:cp|windows-)1251)'
# Looks like you failed 1 test of 13.
t/live/encoding..........dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 12


That message you referred to doesn't seem to be a fatal error.
Dennis Handly
Acclaimed Contributor

Re: Perl module WWW::Mechanize compilation failure

>It appears to fail here:

Have you looked at the test?
encoding.t line 32. Is this the test line?

Re: Perl module WWW::Mechanize compilation failure

Yes, I've looked at the test. I'm not much of a Perl programmer so my troubleshooting skills are limited. I don't supposed this is something that HP supports. I don't know what I'm supposed to tell the developer who is requesting this module if I can't get it comiled other than "sorry, no can do".

Here is the entire encoding.t file:

#!/usr/bin/perl -w

use strict;
use warnings;

use constant PAIRS => {
'http://delicious.com/'
=> 'utf-8',
'http://www.liveinternet.ru/users/dashdi/blog'
=> '(?:cp|windows-)1251',
'http://oops-music.com/'
=> 'EUC-JP',
};

use Test::More tests => (4 * keys %{+PAIRS}) + 1;
use Encode;

BEGIN {
use_ok( 'WWW::Mechanize' );
}

my %pairs = %{+PAIRS};
for my $url ( sort keys %pairs ) {
my $want_encoding = $pairs{$url};

my $mech = WWW::Mechanize->new;
isa_ok( $mech, 'WWW::Mechanize' );

$mech->get( $url );
is( $mech->response->code, 200, "Fetched $url" );

like( $mech->res->content_charset, qr/$want_encoding/i,
" ... Got encoding $want_encoding" );
ok( Encode::is_utf8( $mech->content ), 'Got back UTF-8' );
James R. Ferguson
Acclaimed Contributor
Solution

Re: Perl module WWW::Mechanize compilation failure

Hi:

You might raise your questions and observations here:

http://groups.google.com/group/www-mechanize-users

and/or:

http://perlmonks.org

Regards!

...JRF...

Re: Perl module WWW::Mechanize compilation failure

Thank you, James. I'll try that route.