PhillipHuang has asked for the wisdom of the Perl Monks concerning the following question:

Hi monks, there's something wrong when install Unicode::Map8 via CPAN

cpan[23]> install Unicode::Map8 Running install for module 'Unicode::Map8' Running make for G/GA/GAAS/Unicode-Map8-0.13.tar.gz Has already been unwrapped into directory /root/.cpan/build/Unicode- +Map8-0.13-kCcefS Has already been made Running make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/callback.t .. ok t/compat.t .... ok t/map8.t ...... No subtests run t/unistr.t .... ok Test Summary Report ------------------- t/map8.t (Wstat: 11 Tests: 0 Failed: 0) Non-zero wait status: 11 Parse errors: No plan found in TAP output Files=4, Tests=6, 0 wallclock secs ( 0.04 usr 0.04 sys + 0.12 cusr + 0.06 csys = 0.26 CPU) Result: FAIL Failed 1/4 test programs. 0/6 subtests failed. make: *** [test_dynamic] Error 255 GAAS/Unicode-Map8-0.13.tar.gz /usr/bin/make test -- NOT OK //hint// to see the cpan-testers results for installing this module, t +ry: reports GAAS/Unicode-Map8-0.13.tar.gz Running make install make test had returned bad status, won't install without force Failed during this command: GAAS/Unicode-Map8-0.13.tar.gz : make_test NO

I am using Perl 5.8.8, and here's modules installed

Archive::Tar1.76 CGI3.55 CGI::Session4.46 CPAN1.9600 Cwd3.33 Data::Dumper2.131 Encode2.43 ExtUtils::MakeMaker6.58 File::HomeDir0.98 File::Path2.08 File::Which1.09 HTTP::Tiny0.012 IO1.25 IO::Zlib1.10 IPC::Run30.044 Jcode2.07 Locale-MaketextCANNOT get version, please query it mannually Locale::Maketext::Lexicon0.86 MIME::Base643.13 NetCANNOT get version, please query it mannually Package::Constants0.02 Perl5.8.8 Probe::Perl0.01 Term::ReadKey2.30 Term::ReadLine1.02 Test::Harness3.23 Test::Script1.07 Test::Simple0.98 Text::Glob0.09 Time::Local1.2000 Unicode::Map0.112 Unicode::String2.09 YAML0.73

I have googled for this issue while find nothing valuable, would you pls give me any suggestion? thanks

Phillip

Replies are listed 'Best First'.
Re: cpan install Unicode::Map8 failed
by syphilis (Archbishop) on Jul 14, 2011 at 11:37 UTC
    The bug was reported about a year ago - but I don't see any mention of a fix anywhere.

    Do you get any useful output if you 'cd' to the build directory and run
    perl -Mblib t/map8.t
    And I did notice that, of the 4 test files, map8.t is the only one to use strict;
    (It's hard to believe that could be the culprit, though it would be a simple task to check.)

    Cheers,
    Rob

      Update here. I am a new comer to Perl, and it takes one day to investigate this issue. I have not fixed it, while I find some useful info.

      [root@sparts Unicode-Map8-0.13-kCcefS]# pwd /root/.cpan/build/Unicode-Map8-0.13-kCcefS [root@sparts Unicode-Map8-0.13-kCcefS]# make clean [root@sparts Unicode-Map8-0.13-kCcefS]# make ... map8x.c: In function ‘map8_recode8’: map8x.c:321: warning: pointer targets in passing argument 1 of ‘strlen +’ differ in signedness map8x.c:314: warning: unused variable ‘uc’ ... [root@sparts Unicode-Map8-0.13-kCcefS]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/callback.t .. ok t/map8.t ........ No subtests run t/compat.t .... ok t/unistr.t .... ok

      I use "make testdb TEST_FILE=t/map8.t", when excuting the below line:

      print "not " unless $no->recode8($l1, "xyz{|}") eq "xyzæøå";

      I see " DB<2> x $! 0 'Bad file descriptor'", so I guess it seems caused by recode8(). I commented all recode() and modify the test count in map8.t, and then run "make test" again, it is "PASSED". In order to look more deeply, I created the simply test file including recode8:(named cm.t)

      print "1..1\n"; use strict; use Unicode::Map8 qw(NOCHAR); print "MAPS_DIR = $Unicode::Map8::MAPS_DIR\n"; my $l1 = Unicode::Map8->new("latin1") || die; my $no = Unicode::Map8->new("no") || die; #print "not " unless $no->recode8($l1, "xyz{|}") eq "xyzæøå"; my $t1 = $no->recode8($l1, "xyz{|}"); print "ok 1\n";

      make test again

      [root@sparts Unicode-Map8-0.13-kCcefS]# make test PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_h +arness(0, 'blib/lib', 'blib/arch')" t/*.t t/callback.t .. ok t/cm.t ........ Usage: Unicode::Map8::recode8(m1, m2, str) at t/cm.t l +ine 15. t/cm.t ........ Dubious, test returned 9 (wstat 2304, 0x900) Failed 1/1 subtests t/compat.t .... ok t/unistr.t .... ok Test Summary Report ------------------- t/cm.t (Wstat: 2304 Tests: 0 Failed: 0) Non-zero exit status: 9 Parse errors: Bad plan. You planned 1 tests but ran 0. Files=5, Tests=20, 0 wallclock secs ( 0.05 usr 0.04 sys + 0.14 cusr + 0.06 csys = 0.29 CPU) Result: FAIL Failed 1/5 test programs. 0/20 subtests failed. make: *** [test_dynamic] Error 255

      I also see recode8() is defined in Map8.xs

      recode8(m1, m2, str) Map8* m1 Map8* m2 PREINIT: STRLEN len; STRLEN rlen; char* res; INPUT: char* str = SvPV(ST(2), len); CODE: RETVAL = newSV(len + 1); SvPOK_on(RETVAL); res = SvPVX(RETVAL); map8_recode8(m1, m2, str, res, len, &rlen); res[rlen] = '\0'; SvCUR_set(RETVAL, rlen); OUTPUT: RETVAL

      It needs 3 parameters:($m1,$m2,str), and I try to modify the cm.t as "my $t1 = $no->recode8($no, $l1, "xyz{|}");" and then "make test" also show the same error. Here, I do not know how to do it next, can you pls give any hint? Thanks, Phillip

        Can anyone help me?