Google::Chart with perl - perl

I want to create a graph in perl, I've found Google::Chart module, it looks very good. Everytime I try to install it manually, I have a lot of errors, the install fails. I guess I should install the dependencies:
Warning: prerequisite Class::MOP 0.63 not found.
Warning: prerequisite LWP::UserAgent 0 not found.
Warning: prerequisite Moose 0.54 not found.
Writing Makefile for Google::Chart
Writing MYMETA.yml
But for example if I try to the make Moose files, it says Failed 391/393 test programs. 12/13 subtests failed.
Is there a basic pack of modules, which should be installed, or what should I install to use Google::Chart?
I use it on Linux Mint 15
Edit:
The error log:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
# Failed test 'use Google::Chart::Color;'
# at /root/.cpanm/work/1380630794.4539/Google-Chart-0.05014/inc/Test/UseAllModules.pm line 69.
# Tried to use 'Google::Chart::Color'.
# Error: The type constraint 'Google::Chart::Color::Data' has already been created in Google::Chart::Fill::LinearStripes::Stripe and cannot be created again in Google::Chart::Color at /usr/local/lib/perl/5.14.2/Moose/Util/TypeConstraints.pm line 541.
# Moose::Util::TypeConstraints::_create_type_constraint("Google::Chart::Color::Data", "Str", CODE(0x2cfb8d0), CODE(0x2d02c88), undef, undef) called at /usr/local/lib/perl/5.14.2/Moose/Util/TypeConstraints.pm line 361
# Moose::Util::TypeConstraints::subtype("Google::Chart::Color::Data", HASH(0x2cfb930), HASH(0x2ccb420), HASH(0x2cedab0)) called at lib/Google/Chart/Color.pm line 32
# require Google/Chart/Color.pm called at (eval 353) line 2
# Test::UseAllModules::BEGIN() called at lib/Google/Chart/Color.pm line 0
# eval {...} called at lib/Google/Chart/Color.pm line 0
# eval 'package Test::UseAllModules;
# use Google::Chart::Color #{$args[0]};
# 1;
#
# ;' called at /usr/share/perl/5.14/Test/More.pm line 885
# Test::More::_eval("package Test::UseAllModules;\x{a}use Google::Chart::Color \#{\$args"..., ARRAY(0x1d29508)) called at /usr/share/perl/5.14/Test/More.pm line 860
# Test::More::use_ok("Google::Chart::Color") called at /root/.cpanm/work/1380630794.4539/Google-Chart-0.05014/inc/Test/UseAllModules.pm line 69
# Test::UseAllModules::all_uses_ok() called at t/00_compile.t line 4
# main::BEGIN() called at lib/Google/Chart/Color.pm line 0
# eval {...} called at lib/Google/Chart/Color.pm line 0
# Compilation failed in require at (eval 353) line 2.
# BEGIN failed--compilation aborted at (eval 353) line 2.
# Failed test 'use Google::Chart;'
# at /root/.cpanm/work/1380630794.4539/Google-Chart-0.05014/inc/Test/UseAllModules.pm line 69.
# Tried to use 'Google::Chart'.
# Error: Attempt to reload Google/Chart/Color.pm aborted.
# Compilation failed in require at lib/Google/Chart.pm line 9.
# BEGIN failed--compilation aborted at lib/Google/Chart.pm line 9.
# Compilation failed in require at (eval 354) line 2.
# BEGIN failed--compilation aborted at (eval 354) line 2.
# Failed test 'use Google::Chart::Marker;'
# at /root/.cpanm/work/1380630794.4539/Google-Chart-0.05014/inc/Test/UseAllModules.pm line 69.
# Tried to use 'Google::Chart::Marker'.
# Error: Attempt to reload Google/Chart/Color.pm aborted.
# Compilation failed in require at lib/Google/Chart/Marker.pm line 68.
# BEGIN failed--compilation aborted at lib/Google/Chart/Marker.pm line 68.
# Compilation failed in require at (eval 382) line 2.
# BEGIN failed--compilation aborted at (eval 382) line 2.
Bailout called. Further testing stopped: failed: Google::Chart::Color,Google::Chart,Google::Chart::Marker
FAILED--Further testing stopped: failed: Google::Chart::Color,Google::Chart,Google::Chart::Marker
make: *** [test_dynamic] Error 255
-> FAIL Installing Google::Chart failed. See /root/.cpanm/build.log for details.

Related

cpan module install failed, no prereqs missing

Just trying to install a CPAN module, don't seem to be missing any prereqs, and can't seem to find anything that points to what I need to do to fix this. Can someone make sense of what the issue might be? I'd rather not force install unless I'm absolutely sure its maybe just an issue with the tests. I've looked at previous questions and the issue is almost always a missing prereq module but doesn't seem to be the case here.
C:\Users\zacha>cpan XML::Liberal
CPAN: CPAN::SQLite loaded ok (v0.219)
Database was generated on Fri, 04 Mar 2022 11:36:42 GMT
Running install for module 'XML::Liberal'
CPAN: Digest::SHA loaded ok (v6.02)
CPAN: Compress::Zlib loaded ok (v2.1)
Checksum for C:\STRAWB~1\cpan\sources\authors\id\M\MI\MIYAGAWA\XML-Liberal-0.30.tar.gz ok
CPAN: Archive::Tar loaded ok (v2.38)
CPAN: YAML::XS loaded ok (v0.82)
CPAN: CPAN::Meta::Requirements loaded ok (v2.140)
CPAN: Parse::CPAN::Meta loaded ok (v2.150010)
CPAN: CPAN::Meta loaded ok (v2.150010)
CPAN: Module::CoreList loaded ok (v5.20210123)
Configuring M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Generating a gmake-style Makefile
Writing Makefile for XML::Liberal
Writing MYMETA.yml and MYMETA.json
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\Strawberry\perl\bin\perl.exe Makefile.PL -- OK
Running make for M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz
cp lib/XML/Liberal/Remedy/InvalidEncoding.pm blib\lib\XML\Liberal\Remedy\InvalidEncoding.pm
cp lib/XML/Liberal/Error.pm blib\lib\XML\Liberal\Error.pm
cp lib/XML/Liberal/LibXML.pm blib\lib\XML\Liberal\LibXML.pm
cp lib/XML/Liberal/Remedy/NestedCDATA.pm blib\lib\XML\Liberal\Remedy\NestedCDATA.pm
cp lib/XML/Liberal/Remedy/LowAsciiChars.pm blib\lib\XML\Liberal\Remedy\LowAsciiChars.pm
cp lib/XML/Liberal/Remedy/ControlCode.pm blib\lib\XML\Liberal\Remedy\ControlCode.pm
cp lib/XML/Liberal/Remedy/NotUTF8.pm blib\lib\XML\Liberal\Remedy\NotUTF8.pm
cp lib/XML/Liberal/Remedy/UnclosedHTML.pm blib\lib\XML\Liberal\Remedy\UnclosedHTML.pm
cp lib/XML/Liberal.pm blib\lib\XML\Liberal.pm
cp lib/XML/Liberal/Remedy/StandaloneAttribute.pm blib\lib\XML\Liberal\Remedy\StandaloneAttribute.pm
cp lib/XML/Liberal/Remedy/EntityRef.pm blib\lib\XML\Liberal\Remedy\EntityRef.pm
cp lib/XML/Liberal/Remedy/HTMLEntity.pm blib\lib\XML\Liberal\Remedy\HTMLEntity.pm
cp lib/XML/Liberal/Remedy/TrailingElements.pm blib\lib\XML\Liberal\Remedy\TrailingElements.pm
cp lib/XML/Liberal/Remedy/DeprecatedDTD.pm blib\lib\XML\Liberal\Remedy\DeprecatedDTD.pm
cp lib/XML/Liberal/Remedy/TrailingDoctype.pm blib\lib\XML\Liberal\Remedy\TrailingDoctype.pm
cp lib/XML/Liberal/Remedy/Declaration.pm blib\lib\XML\Liberal\Remedy\Declaration.pm
cp lib/XML/Liberal/Remedy/UndeclaredNS.pm blib\lib\XML\Liberal\Remedy\UndeclaredNS.pm
cp lib/XML/Liberal/Remedy/XHTMLEmptyTag.pm blib\lib\XML\Liberal\Remedy\XHTMLEmptyTag.pm
cp lib/XML/Liberal/Remedy/UnquotedAttribute.pm blib\lib\XML\Liberal\Remedy\UnquotedAttribute.pm
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\STRAWB~1\c\bin\gmake.exe -- OK
Running make test for MIYAGAWA/XML-Liberal-0.30.tar.gz
"C:\Strawberry\perl\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'inc', 'blib\lib', 'blib\arch')" t/*.t
t/00_compile.t ......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/00_compile.t ......... ok
t/01_bad.t ............. Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/01_bad.t ............. 1/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/01_bad.t line 28.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/01_bad.t line 27.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/01_bad.t line 29.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
Can't call method "toString" on an undefined value at t/01_bad.t line 33, <$fh> line 1.
# Looks like you failed 2 tests of 15.
# Looks like your test exited with 2 just after 15.
t/01_bad.t ............. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/15 subtests
t/02_global.t .......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/02_global.t .......... 7/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 19.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 18.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 20.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 25.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 24.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 26.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/02_global.t line 30.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/02_global.t line 29.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/02_global.t line 31.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
# Looks like you failed 6 tests of 144.
t/02_global.t .......... Dubious, test returned 6 (wstat 1536, 0x600)
Failed 6/144 subtests
t/03_global_destroy.t .. Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
t/03_global_destroy.t .. 1/?
# Failed test 'C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml'
# at t/03_global_destroy.t line 24.
# got: 'parser error : Specification mandates value for attribute noshade at position 3:14 at t/03_global_destroy.t line 23.
# '
# expected: ''
# Failed test 'created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isa XML::LibXML::Document'
# at t/03_global_destroy.t line 25.
# created DOM node with C:/STRAWB~1/cpan/build/XML-Liberal-0.30-3/t/bad/BAD-atttibute.xml isn't defined
t/03_global_destroy.t .. 55/? # Looks like you failed 2 tests of 71.
t/03_global_destroy.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 2/71 subtests
t/04_sanity.t .......... Possible precedence issue with control flow operator at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Test/Builder.pm line 917.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
Redundant argument in sprintf at C:\STRAWB~1\cpan\build\XML-Liberal-0.30-3\inc/Spiffy.pm line 232.
t/04_sanity.t .......... 1/? parser error : Specification mandates value for attribute nofoo at position 2:12 at t/04_sanity.t line 6.
# Looks like your test exited with 2 just after 12.
t/04_sanity.t .......... Dubious, test returned 2 (wstat 512, 0x200)
All 12 subtests passed
Test Summary Report
-------------------
t/01_bad.t (Wstat: 512 Tests: 15 Failed: 2)
Failed tests: 14-15
Non-zero exit status: 2
t/02_global.t (Wstat: 1536 Tests: 144 Failed: 6)
Failed tests: 19-24
Non-zero exit status: 6
t/03_global_destroy.t (Wstat: 512 Tests: 71 Failed: 2)
Failed tests: 10-11
Non-zero exit status: 2
t/04_sanity.t (Wstat: 512 Tests: 12 Failed: 0)
Non-zero exit status: 2
Files=5, Tests=243, 2 wallclock secs ( 0.11 usr + 0.06 sys = 0.17 CPU)
Result: FAIL
Failed 4/5 test programs. 10/243 subtests failed.
gmake: *** [Makefile:800: test_dynamic] Error 2
MIYAGAWA/XML-Liberal-0.30.tar.gz
C:\STRAWB~1\c\bin\gmake.exe test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports MIYAGAWA/XML-Liberal-0.30.tar.gz
Stopping: 'install' failed for 'XML::Liberal'.
There are two bugs in XML-Liberal-0.30.
Forcing the installation of the module is not recommended.
This will install the distribution:
wget https://cpan.metacpan.org/authors/id/M/MI/MIYAGAWA/XML-Liberal-0.30.tar.gz
tar xvzf XML-Liberal-0.30.tar.gz
cd XML-Liberal-0.30
perl -pe's/mandate/mandates?/' -i~ lib/XML/Liberal/Remedy/StandaloneAttribute.pm
perl -pe's/->extract_error\(\K\$\#/"\$\#"/' -i~ lib/XML/Liberal.pm
perl -I . Makefile.PL
make test
make install
The module's logic is basically the following:
For up to 15 times by default:
Try to parse the document using XML::LibXML while catching errors.
If no errors occurred,
Success (Return)
For each error message,
Apply a fix to the XML to attempt to resolve the error.
Failure.
The issue at hand is that libxml2 has changed some of its error message. It used to emit
parser error : Specification mandate value for attribute ...
But the grammar mistake was fixed.
parser error : Specification mandates value for attribute ...
The fix is simple. In lib/XML/Liberal/Remedy/StandaloneAttribute.pm, replace
my ($attr) = $error->message =~
/^parser error : Specification mandate value for attribute (\w+)/
or return 0;
with
my ($attr) = $error->message =~
/^parser error : Specification mandates? value for attribute (\w+)/
or return 0;
(I'm assuming that some versions of libxml2 returned Specification mandate value. A web search seems to confirm this.)
The second issue is in how it parses error messages. I'm not exactly sure what the broken code is trying to do, but it can be worked around by replacing
my $error = $self->extract_error($#, \$xml);
with
my $error = $self->extract_error("$#", \$xml);
in XML/Liberal.pm.

perl DBI installation fails alpine

I am trying to install DBI (after failing DBD) on alpine 3.12 and keep getting the errors below. I tried the most recent version of DBI and 1.628 which seems to be released right after Perl v5.16.3 (which I need to use). I updated Test::Simple, Test::More and Pod::Simple.
Errorlog (shortend):
cpanm https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
cpanm (App::cpanminus) 1.7044 on perl 5.016003 built for x86_64-linux-thread-multi
Work directory is /root/.cpanm/work/1598444706.8
You have make /usr/bin/make
You have /usr/bin/wget
You have /usr/bin/tar: tar (GNU tar) 1.32
Copyright (C) 2019 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <https://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by John Gilmore and Jay Fenlason.
You have /usr/bin/unzip
--> Working on https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
Fetching https://cpan.metacpan.org/authors/id/T/TI/TIMB/DBI-1.628.tar.gz
-> OK
Unpacking DBI-1.628.tar.gz
Entering DBI-1.628
Checking configure dependencies from META.json
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (6.63_02)
Configuring DBI-1.628
Running Makefile.PL
Your perl was compiled with gcc (version 9.3.0), okay.
Creating test wrappers for DBD::Gofer:
t/zvg_01basics.t
t/zvg_02dbidrv.t
[...]
t/zvxgnp_85gofer.t
Checking if your kit is complete...
Looks good
I see you're using perl 5.016003 on x86_64-linux-thread-multi, okay.
Remember to actually *read* the README file!
Use 'make' to build the software (dmake or nmake on Windows).
Then 'make test' to execute self tests.
Then 'make install' to install the DBI and then delete this working
directory before unpacking and building any DBD::* drivers.
Writing Makefile for DBI
Writing MYMETA.yml and MYMETA.json
-> OK
Checking dependencies from MYMETA.json ...
Checking if you have ExtUtils::MakeMaker 6.48 ... Yes (6.63_02)
Checking if you have Test::Simple 0.90 ... Yes (0.98)
Building and testing DBI-1.628
/opt/perl/bin/perl -MExtUtils::Command -e 'mkpath' -- blib/lib/DBI
rm -f blib/lib/DBI/Changes.pm
cp Changes blib/lib/DBI/Changes.pm
[...]
# Failed test 'use DBI::DBD::SqlEngine;'
# at t/48dbi_dbd_sqlengine.t line 18.
# Tried to use 'DBI::DBD::SqlEngine'.
# Error: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
# Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
# Failed test 'use DBD::File;'
# at t/48dbi_dbd_sqlengine.t line 19.
# Tried to use 'DBD::File'.
# Error: Attempt to reload DBI/DBD/SqlEngine.pm aborted.
# Compilation failed in require at (eval 11) line 2.
# ...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
# BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
# Compilation failed in require at (eval 9) line 2.
# BEGIN failed--compilation aborted at (eval 9) line 2.
install_driver(File) failed: Attempt to reload DBD/File.pm aborted.
Compilation failed in require at (eval 12) line 3.
at t/48dbi_dbd_sqlengine.t line 22.
# Tests were run but no plan was declared and done_testing() was not seen.
t/48dbi_dbd_sqlengine.t .........
Dubious, test returned 255 (wstat 65280, 0xff00)
Failed 2/3 subtests
# Failed test 'use DBD::File;'
# at t/49dbd_file.t line 18.
# Tried to use 'DBD::File'.
# Error: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
# Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
# Compilation failed in require at (eval 9) line 2.
# ...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
# BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
# Compilation failed in require at (eval 7) line 2.
# BEGIN failed--compilation aborted at (eval 7) line 2.
install_driver(File) failed: Attempt to reload DBD/File.pm aborted.
Compilation failed in require at (eval 11) line 3.
at t/49dbd_file.t line 30.
# Tests were run but no plan was declared and done_testing() was not seen.
t/49dbd_file.t ..................
Dubious, test returned 2 (wstat 512, 0x200)
Failed 1/2 subtests
Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
Compilation failed in require at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/DBD/SqlEngine.pm line 27.
Compilation failed in require at (eval 9) line 2.
...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/File.pm line 34.
Compilation failed in require at (eval 8) line 2.
...propagated at /opt/perl/lib/5.16.3/base.pm line 84.
BEGIN failed--compilation aborted at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBD/DBM.pm line 25.
Compilation failed in require at t/50dbm_simple.t line 7.
t/50dbm_simple.t ................
Dubious, test returned 255 (wstat 65280, 0xff00)
No subtests run
install_driver(DBM) failed: Bareword "Errno::ENOENT" not allowed while "strict subs" in use at /root/.cpanm/work/1598444706.8/DBI-1.628/blib/lib/DBI/SQL/Nano.pm line 301.
Thanks for any insights.

Error 255 and "couldn't find diagnostic data" when installing cpan Inline package

When I try to install the Inline package with cpan via cpan> install Inline I get the following error at the end:
make: *** [test_dynamic] Error 255
SISYPHUS/Inline-0.53.tar.gz
/opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SISYPHUS/Inline-0.53.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
SISYPHUS/Inline-0.53.tar.gz : make_test NO
Here is the complete installation log:
cpan[1]> install Inline
CPAN: Storable loaded ok (v2.18)
Going to read /root/.cpan/sources/authors/01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.008)
CPAN: YAML loaded ok (v0.88)
Going to read /root/.cpan/build/
............................................................................DONE
Found 1 old build, restored the state of 1
............................................................................DONE
Going to read /root/.cpan/sources/modules/02packages.details.txt.gz
Database was generated on Wed, 08 Jan 2014 07:41:07 GMT
HTTP::Date not available
..............
New CPAN.pm version (v2.00) available.
[Currently running version is v1.9205]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
CPAN: Time::HiRes loaded ok (v1.9711)
..............................................................DONE
Going to read /root/.cpan/sources/modules/03modlist.data.gz
............................................................................DONE
Going to write /root/.cpan/Metadata
Running install for module 'Inline'
Running make for S/SI/SISYPHUS/Inline-0.53.tar.gz
Has already been unwrapped into directory /root/.cpan/build/Inline-0.53-gk9HIk
Has already been made
Running make test
make[1]: Entering directory `/root/.cpan/build/Inline-0.53-gk9HIk/C'
make[1]: Leaving directory `/root/.cpan/build/Inline-0.53-gk9HIk/C'
PERL_DL_NONLAZY=1 /share/MD0_DATA/.qpkg/Optware/bin/perl5.10.0 "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00init...............ok
t/01usages.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/01usages.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/01usages.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/01usages.t line 5, <POD_DIAG> line 647.
t/01usages.............dubious
Test returned status 9 (wstat 2304, 0x900)
t/02config.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/02config.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/02config.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/02config.t line 5, <POD_DIAG> line 647.
t/02config.............dubious
Test returned status 9 (wstat 2304, 0x900)
t/03errors.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/03errors.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/03errors.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/03errors.t line 5, <POD_DIAG> line 647.
t/03errors.............dubious
Test returned status 9 (wstat 2304, 0x900)
t/04create.............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/04create.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/04create.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/04create.t line 5, <POD_DIAG> line 647.
t/04create.............dubious
Test returned status 9 (wstat 2304, 0x900)
t/05files..............couldn't find diagnostic data in /opt/lib/perl5/5.10.0/pods/perldiag.pod blib/lib . /root/.cpan/build/Inline-0.53-gk9HIk/blib/lib /root/.cpan/build/Inline-0.53-gk9HIk/blib/arch /opt/lib/perl5/5.10.0/arm-linux /opt/lib/perl5/5.10.0 /opt/lib/perl5/site_perl/5.10.0/arm-linux /opt/lib/perl5/site_perl/5.10.0/arm-none-linux-gnueabi /opt/lib/perl5/site_perl/5.10.0 t/05files.t at /opt/lib/perl5/5.10.0/diagnostics.pm line 268, <POD_DIAG> line 647.
Compilation failed in require at t/05files.t line 5, <POD_DIAG> line 647.
BEGIN failed--compilation aborted at t/05files.t line 5, <POD_DIAG> line 647.
t/05files..............dubious
Test returned status 9 (wstat 2304, 0x900)
t/06rewrite_config.....ok
t/07rewrite2_config....ok
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
t/01usages.t 9 2304 ?? ?? ??
t/02config.t 9 2304 ?? ?? ??
t/03errors.t 9 2304 ?? ?? ??
t/04create.t 9 2304 ?? ?? ??
t/05files.t 9 2304 ?? ?? ??
Failed 5/8 test scripts. 0/5 subtests failed.
Files=8, Tests=5, 3 wallclock secs ( 2.30 cusr + 0.14 csys = 2.44 CPU)
Failed 5/8 test programs. 0/5 subtests failed.
make: *** [test_dynamic] Error 255
SISYPHUS/Inline-0.53.tar.gz
/opt/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SISYPHUS/Inline-0.53.tar.gz
Running make install
make test had returned bad status, won't install without force
Failed during this command:
SISYPHUS/Inline-0.53.tar.gz : make_test NO
Unfortunately I'm a newbie to cpan and perl, so I don't know how to resolve this issue. I already tried to reinstall perl but with no success.
If it is important for you I'm running this on my QNAP NAS TS-419P+:
[~] # uname -a
Linux QNAP 2.6.33.2 #1 Fri Jul 26 04:41:05 CST 2013 armv5tel unknown
Here is the perl version I'm using:
[~] # perl --version
This is perl, v5.10.0 built for arm-none-linux-gnueabi
As DavidO wrote, the test fails at use diagnostics; You can check this by executing this line by itself (perl -e 'use diagnostics;').
diagnostics.pm tries to read diagnostic messages from perldiag.pod (which is mentioned in the error message).
Looks like it's missing on your system.
So, you need to install the package with that file (or otherwise get it to the specified path) of the version corresponding to your Perl's. E.g. in Cygwin, it's in the perl_pods package which, you guessed it, is not installed by default.
Investigating the first error first is always a good course of action. In this case, that's the following:
couldn't find diagnostic data in
(long list of paths excluded from copy/paste)
Compilation failed in require at t/01usages.t line 5,
Looking at the distribution's source code we find that line 5 of t/01usages.t is:
use diagnostics;
The diagnostics pragma is part of the core Perl distribution. For diagnostics to be missing necessary files indicates that the problem is that your installation of Perl is either broken or incomplete (which is the subset of "broken" most likely to be at cause here). Resolve that issue first.
brian's Guide to Solving Any Perl Problem: "Solve the first problem first." In this case, in doing so, we discover the problem is unrelated to the module, and instead, related to the quality of your Perl installation.

How to install Parallel::ForkManager in Perl?

I am tiring to run multiple jobs in parallel by using perl script which use Parallel:ForkManager.
#!/usr/bin/perl -w
use Parallel::ForkManager;
my #make_obj = qw(
mode1_testlist
mode1_testlist1
mode1_testlist2
);
my $fm = $pm = Parallel::ForkManager-> new(3);
foreach my $obj (#make_obj) {
$fm->start and next;
print("make regression MODE=1 MODELIST=$make_obj");
$fm->finish();
}
but it throws me below error.
Can't locate Parallel/ForkManager.pm in #INC (#INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/5.8.8 .) at parallel_run.pl line 3.
BEGIN failed--compilation aborted at parallel_run.pl line 3.
I have downloaded Parallel-ForkManager-1.03.tar.gz but I don't know where to keep it I mean how to install it.
I tried perl Makefile.PL && make test && make install:
WARNING: META_MERGE is not a known parameter.
WARNING: BUILD_REQUIRES is not a known parameter.
WARNING: LICENSE is not a known parameter.
Checking if your kit is complete...
Looks good
'BUILD_REQUIRES' is not a known MakeMaker parameter name.
'LICENSE' is not a known MakeMaker parameter name.
'META_MERGE' is not a known MakeMaker parameter name.
Writing Makefile for Parallel::ForkManager
cp lib/Parallel/ForkManager.pm blib/lib/Parallel/ForkManager.pm
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"test_harness(0,'blib/lib', 'blib/arch')" t/*.t
t/00-load.............ok 1/3 (in cleanup) Undefined subroutine
&File::Path::remove_tree called at /h/altera_dump2/vjain419/regression_flow_bck
/regression_flow/MSS1/hw/verif/top_/00e/tools/Parallel-ForkManager-1.03/blib
/lib/Parallel /ForkManager.pm line 662.
t/00-load.............ok
t/01-utf8-all.........skipped
all skipped: Need utf8::all for this test crashing on Windows
t/02-callback.........Array found where operator expected at t/02-callback.t line
21,at end of line
(Do you need to predeclare explain?)
syntax error at t/02-callback.t line 21, near "explain #out"
xecution of t/02-callback.t aborted due to compilation errors.
# Looks like your test died before it could output anything.
t/02-callback.........dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 1-2
Failed 2/2 tests, 0.00% okay
t/03-callback-data....Array found where operator expected at t/03-callback-data.t line 13, at end of line
(Do you need to predeclare explain?)
syntax error at t/03-callback-data.t line 13, near "explain #out"
Execution of t/03-callback-data.t aborted due to compilation errors.
# Looks like your test died before it could output anything.
t/03-callback-data....dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
t/02-callback.t 255 65280 2 4 200.00% 1-2
t/03-callback-data.t 255 65280 1 2 200.00% 1
1 test skipped.
Failed 2/4 test scripts, 50.00% okay. 3/6 subtests failed, 50.00% okay.
make: *** [test_dynamic] Error 255
Just use
cpan Parallel::ForkManager
Alternatively, execute the following command after making sure you have its dependencies (POSIX, Storable, File::Spec, File::Temp, File::Path 2.00 and Test::More 0.81_01) installed:
tar xvzf Parallel-ForkManager-1.03.tar.gz
cd Parallel-ForkManager-1.03
perl Makefile.PL && make test && make install
Like some of the comments on the accepted answer suggest, there can be a dependency missing. The following worked for me:
% cpan Test::More
% cpan Parallel::ForkManager

installing package using CPAN Perl

I'm trying to install some libraries using Perl from the command line:
perl -MCPAN -e "install XML::Tidy"
However, I'm not being able to:
Warning (usually harmless): 'YAML' not installed, will not store persistent state
Running Build test
t\00pod.t ..... ok
t\00podc.t .... Can't locate Test/Pod/Coverage.pm in #INC (#INC contains: C:\xam
pp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\
.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/pe
rl/site/lib .) at t\00podc.t line 1.
BEGIN failed--compilation aborted at t\00podc.t line 1.
t\00podc.t .... Dubious, test returned 2 (wstat 512, 0x200)
No subtests run
t\00small.t ... Base class package "XML::XPath" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available in #INC (#INC contains: C:\xampp\perl\bin\.cpa
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML-
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .).
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy
.pm line 5
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5.
Compilation failed in require at t\00small.t line 3.
BEGIN failed--compilation aborted at t\00small.t line 3.
t\00small.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 15/15 subtests
t\01medium.t .. Base class package "XML::XPath" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available in #INC (#INC contains: C:\xampp\perl\bin\.cpa
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML-
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .).
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy
.pm line 5
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5.
Compilation failed in require at t\01medium.t line 3.
BEGIN failed--compilation aborted at t\01medium.t line 3.
t\01medium.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 15/15 subtests
t\02large.t ... Base class package "XML::XPath" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available in #INC (#INC contains: C:\xampp\perl\bin\.cpa
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML-
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .).
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy
.pm line 5
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5.
Compilation failed in require at t\02large.t line 3.
BEGIN failed--compilation aborted at t\02large.t line 3.
t\02large.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 15/15 subtests
t\03prune.t ... Base class package "XML::XPath" is empty.
(Perhaps you need to 'use' the module which defines that package first,
or make that module available in #INC (#INC contains: C:\xampp\perl\bin\.cpa
n\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib C:\xampp\perl\bin\.cpan\build\XML-
Tidy-1.12.B55J2qn-y5sVpz\blib\arch C:/xampp/perl/lib C:/xampp/perl/site/lib .).
at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12.B55J2qn-y5sVpz\blib\lib/XML/Tidy
.pm line 5
BEGIN failed--compilation aborted at C:\xampp\perl\bin\.cpan\build\XML-Tidy-1.12
.B55J2qn-y5sVpz\blib\lib/XML/Tidy.pm line 5.
Compilation failed in require at t\03prune.t line 3.
BEGIN failed--compilation aborted at t\03prune.t line 3.
t\03prune.t ... Dubious, test returned 2 (wstat 512, 0x200)
Failed 15/15 subtests
Test Summary Report
-------------------
t\00podc.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: No plan found in TAP output
t\00small.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 15 tests but ran 0.
t\01medium.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 15 tests but ran 0.
t\02large.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 15 tests but ran 0.
t\03prune.t (Wstat: 512 Tests: 0 Failed: 0)
Non-zero exit status: 2
Parse errors: Bad plan. You planned 15 tests but ran 0.
Files=6, Tests=2, 0 wallclock secs ( 0.05 usr + 0.05 sys = 0.09 CPU)
Result: FAIL
Failed 5/6 test programs. 0/2 subtests failed.
PIP/XML-Tidy-1.12.B55J2qn.tgz
C:\xampp\perl\bin\perl.exe ./Build test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports PIP/XML-Tidy-1.12.B55J2qn.tgz
Warning (usually harmless): 'YAML' not installed, will not store persistent stat
e
Running Build install
make test had returned bad status, won't install without force
In fact, I haven't been able to install any library (YAML for example). I also tried someone's suggestion:
perl -MCPAN -e "CPAN::Shell->force(qw(XML::Tidy));"
However I had the same outcome. Could someone please help me to figure out how to install those packages? I'm running Perl in a Windows 7 machine.
Fix earlier errors first! XML::Tidy has a stated dependency on Test::Pod::Coverage and XML::XPath. You don't have them installed, so an error must have occurred earlier in the installation process.