[Koha] Problems installing HTTP::OAI from CPAN for Koha 3.0.2

Ricardo Dias Marques lists at ricmarques.net
Wed Jun 10 02:50:59 NZST 2009


Hi Galen (and list),

Because it seems that this discussion is tending towards Perl code /
Perl dependencies, I'm "Cc"ing the koha-developers list, In future
followups, I think that I'll remove the "regular" Koha mailing list
from the Cc list, for this discussion.

My comments / questions are below:

On Mon, Jun 8, 2009,  Galen Charlton<galen.charlton at liblime.com> wrote:

> For what it's worth, I was just able to successfully install HTTP::OAI
> from CPAN on a clean Debian Lenny box.  Based on the test suite errors
> you're seeing, I suspect there's a glitch with XML::LibXML or one of
> the other XML processing dependencies of HTTP::OAI on your box.

Thanks for the feedback. Unfortunately, I tried today (9-Jun-2009) to
install several (many) other XML-related packages that are in the SLES
11 DVD, but it didn't seem to make any difference.

For what it's worth, I found out that "HTTP::OAI", in several of its
".pm" (Perl Module) files, require some XML::LibXML "submodules" (I
don't know the correct word for that). For instance, the METS.pm file
- located at  HTTP-OAI-3.21/lib/HTTP/OAI/Metadata/METS.pm  - requires
the "XML::LibXML::XPathContext" module.


If I try to install "XML::LibXML::XPathContext" from CPAN, then I get
an error related to utf-16 (Unicode encoding) and umlauts (see
"t/09xpath.t" line below):

----------------------------------------
myhost:~/HTTP-OAI-3.21/lib/HTTP/OAI/Metadata # cpan

cpan shell -- CPAN exploration and modules installation (v1.94)
ReadLine support enabled

cpan[1]> install XML::LibXML::XPathContext
CPAN: Storable loaded ok (v2.18)
Going to read '/root/.cpan/Metadata'
  Database was generated on Mon, 08 Jun 2009 11:26:58 GMT
CPAN: YAML loaded ok (v0.68)
Going to read 37 yaml files from /root/.cpan/build/
CPAN: Time::HiRes loaded ok (v1.9711)
............................................................................DONE
Restored the state of 37 (in 0.9044 secs)
Running install for module 'XML::LibXML::XPathContext'
Running make for P/PA/PAJAS/XML-LibXML-1.69.tar.gz
  Has already been unwrapped into directory
/root/.cpan/build/XML-LibXML-1.69-R2RtfP
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basic.t ................... 1/3

Compiled against libxml2 version: 20701
Running libxml2 version:          20701

t/01basic.t ................... ok
t/02parse.t ................... ok
t/03doc.t ..................... ok
t/04node.t .................... ok
t/05text.t .................... ok
t/06elements.t ................ ok
t/07dtd.t ..................... ok
t/08findnodes.t ............... ok
t/09xpath.t ................... 1/57 # Test 54 got: "\xFE\xFF"
(t/09xpath.t at line 142)
#    Expected: "utf-16 test with umlauts: \xE4\xF6\xFC\xC4\xD6\xDC\xDF"
#  t/09xpath.t line 142 is:   skip(
# Test 57 got: "\xFE\xFF" (t/09xpath.t at line 156)
#    Expected: "utf-16 test with umlauts: \xE4\xF6\xFC\xC4\xD6\xDC\xDF"
#  t/09xpath.t line 156 is:   skip(
t/09xpath.t ................... Failed 2/57 subtests
t/10ns.t ...................... ok

[snipped most output...]

t/80registryleak.t ............ ok
t/90threads.t ................. ok

Test Summary Report
-------------------
t/09xpath.t                 (Wstat: 0 Tests: 57 Failed: 2)
  Failed tests:  54, 57
Files=37, Tests=1954,  6 wallclock secs ( 0.16 usr  0.37 sys +  3.92
cusr  1.89 csys =  6.34 CPU)
Result: FAIL
Failed 1/37 test programs. 2/1954 subtests failed.
make: *** [test_dynamic] Error 255
  PAJAS/XML-LibXML-1.69.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports PAJAS/XML-LibXML-1.69.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 PAJAS/XML-LibXML-1.69.tar.gz                 : make_test NO

----------------------------------------


I *do* have XML::LibXML installed, from the "perl-XML-LibXML" software
package in the SLES 11 DVD that I installed using the yast tool:

----------------------------------------
myhost:~/HTTP-OAI-3.21/lib/HTTP/OAI/Metadata # rpm -qa | grep -i xml-libxml
perl-XML-LibXML-1.66-1.14
perl-XML-LibXML-Common-0.13-70.7

myhost:~/HTTP-OAI-3.21/lib/HTTP/OAI/Metadata # perl -MXML::LibXML -e
'print $XML::LibXML::VERSION, "\n"'
1.66
----------------------------------------


If I try to install the "XML::LibXML" Perl module from CPAN, then it
tries to install version 1.69 (instead of the existing 1.66) of the
same module, but it fails with the same error regarding utf-16 and
umlauts:

----------------------------------------
cpan[1]> install XML::LibXML
CPAN: Storable loaded ok (v2.18)
Going to read '/root/.cpan/Metadata'
  Database was generated on Mon, 08 Jun 2009 11:26:58 GMT
CPAN: YAML loaded ok (v0.68)
Going to read 37 yaml files from /root/.cpan/build/
CPAN: Time::HiRes loaded ok (v1.9711)
............................................................................DONE
Restored the state of 37 (in 0.9181 secs)
Running install for module 'XML::LibXML'
Running make for P/PA/PAJAS/XML-LibXML-1.69.tar.gz
  Has already been unwrapped into directory
/root/.cpan/build/XML-LibXML-1.69-R2RtfP
  Has already been made
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01basic.t ................... 1/3

Compiled against libxml2 version: 20701
Running libxml2 version:          20701

t/01basic.t ................... ok
t/02parse.t ................... ok
t/03doc.t ..................... ok
t/04node.t .................... ok
t/05text.t .................... ok
t/06elements.t ................ ok
t/07dtd.t ..................... ok
t/08findnodes.t ............... ok
t/09xpath.t ................... 1/57 # Test 54 got: "\xFE\xFF"
(t/09xpath.t at line 142)
#    Expected: "utf-16 test with umlauts: \xE4\xF6\xFC\xC4\xD6\xDC\xDF"
#  t/09xpath.t line 142 is:   skip(
# Test 57 got: "\xFE\xFF" (t/09xpath.t at line 156)
#    Expected: "utf-16 test with umlauts: \xE4\xF6\xFC\xC4\xD6\xDC\xDF"
#  t/09xpath.t line 156 is:   skip(
t/09xpath.t ................... Failed 2/57 subtests
t/10ns.t ...................... ok

[snipped most output...]

Test Summary Report
-------------------
t/09xpath.t                 (Wstat: 0 Tests: 57 Failed: 2)
  Failed tests:  54, 57
Files=37, Tests=1954,  6 wallclock secs ( 0.17 usr  0.36 sys +  3.80
cusr  2.05 csys =  6.38 CPU)
Result: FAIL
Failed 1/37 test programs. 2/1954 subtests failed.
make: *** [test_dynamic] Error 255
  PAJAS/XML-LibXML-1.69.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports PAJAS/XML-LibXML-1.69.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 PAJAS/XML-LibXML-1.69.tar.gz                 : make_test NO

----------------------------------------


Any additional hints, please?  :-/

Thanks again!

Cheers,
Ricardo


More information about the Koha mailing list