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

perl -v
This is perl 5, version 14, subversion 2 (v5.14.2) built for x86_64-linux-thread-multi
(with 1 registered patch, see perl -V for more detail)

uname -a
Linux 2.6.18-274.7.1.el5.centos.plusxen #1 SMP Thu Oct 20 20:15:26 EDT 2011 x86_64 GNU/Linux

/tmp/B-C-1.36]> perl Makefile.PL
Checking if your kit is complete...
Looks good
Writing Makefile for ByteLoader
Writing MYMETA.yml and MYMETA.json
Writing Makefile for B::C
Writing MYMETA.yml and MYMETA.json

make (succeeded)
make test

Got many errors.
Note: As the first try. I use cpan B::C to install. But, the installation failed due to these errors. Then, I decided to do "perl Makefile.PL","make", "make test".

Due to too many errors. I am afraid to "make install". Can someone please help? How to eliminate these errors.

make[1]: Entering directory `/tmp/B-C-1.36/ByteLoader' No tests defined for ByteLoader extension. make[1]: Leaving directory `/tmp/B-C-1.36/ByteLoader' make[1]: Entering directory `/tmp/B-C-1.36/ByteLoader' make[1]: Leaving directory `/tmp/B-C-1.36/ByteLoader' PERL_DL_NONLAZY=1 /opt/ActivePerl-5.14/bin/perl-static "-MExtUtils::Co +mmand::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/* .t t/asmdata.t ....... ok t/assembler.t ..... ok t/bblock.t ........ ok t/bytecode.t ...... Failed 1/50 subtests (1 TODO test unexpectedly succeeded) t/c.t ............. ok ...... Subroutine str_len_trim redefined at /opt/ActivePerl-5.14/lib/Carp.pm +line 350. Subroutine trusts redefined at /opt/ActivePerl-5.14/lib/Carp.pm line 3 +65. Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp. +pm line 385. t/c_allow_opts.t .. Failed 1/2 subtests blib/script/perlcc: Unexpected compiler output Subroutine fileparse redefined at /opt/ActivePerl-5.14/lib/File/Basena +me.pm line 104. ...... Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. # Failed test 'perlcc -r file args' # at t/c_argv.t line 15. # got: 'nok 1 # empty @ARGV # ' # expected: 'ok 1 # ' blib/script/perlcc: Unexpected compiler output Subroutine fileparse redefined at /opt/ActivePerl-5.14/lib/File/Basena +me.pm line 104. ...... Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. # Looks like you failed 1 test of 4. t/c_argv.t ........ Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests t/c_o1.t .......... ok t/c_o2.t .......... ok t/c_o3.t .......... skipped: Only if -d .svn t/c_o4.t .......... skipped: Only if -d .svn sh: line 1: 15194 Segmentation fault /opt/ActivePerl-5.14/bin/per +l-static -Mblib -MO=-qq,CC,-q,-fno-warnings,-fno-fold,-occcode 15.c "cccode15.pl" 2>&1 2>&1 ...... cccode49.c: In function ‘pp_sub_warnings__register_categories’: cccode49.c:17681: error: label ‘lab_1ac5f770’ used but not defined # 256 t/cc.t ............ Failed 1/105 subtests (less 54 skipped subtests: 50 okay) (1 TODO test unexpectedly succeeded) Label not found for "last " at ccode_last_2.pl line 5. Warning: Label not found at compile time for "last LOOP" t/cc_last.t ....... ok t/cc_o1.t ......... skipped: Only if -d .svn t/cc_o2.t ......... skipped: Only if -d .svn blib/script/perlcc: Unexpected compiler output ...... Subroutine str_len_trim redefined at /opt/ActivePerl-5.14/lib/Carp.pm + line 350. Subroutine trusts redefined at /opt/ActivePerl-5.14/lib/Carp.pm line +365. Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. blib/script/perlcc: Unexpected compiler output Subroutine fileparse redefined at /opt/ActivePerl-5.14/lib/File/Basena +me.pm line 104. ...... Subroutine str_len_trim redefined at /opt/ActivePerl-5.14/lib/Carp.pm + line 350. Subroutine trusts redefined at /opt/ActivePerl-5.14/lib/Carp.pm line +365. Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. blib/script/perlcc: Unexpected compiler output Subroutine fileparse redefined at /opt/ActivePerl-5.14/lib/File/Basena +me.pm line 104. ...... Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. String found where operator expected at /opt/ActivePerl-5.14/lib/Time/ +Local.pm line 108, near "croak "Month '$month' out of range 0. .11"" (Do you need to predeclare croak?) String found where operator expected at /opt/ActivePerl-5.14/lib/Time/ +Local.pm line 116, near "croak "Day '$mday' out of range 1..$m d"" (Do you need to predeclare croak?) String found where operator expected at /opt/ActivePerl-5.14/lib/Time/ +Local.pm line 117, near "croak "Hour '$hour' out of range 0..2 3"" (Do you need to predeclare croak?) String found where operator expected at /opt/ActivePerl-5.14/lib/Time/ +Local.pm line 118, near "croak "Minute '$min' out of range 0.. 59"" (Do you need to predeclare croak?) String found where operator expected at /opt/ActivePerl-5.14/lib/Time/ +Local.pm line 119, near "croak "Second '$sec' out of range 0.. 59"" (Do you need to predeclare croak?) syntax error at /opt/ActivePerl-5.14/lib/Time/Local.pm line 108, near +"croak "Month '$month' out of range 0..11"" syntax error at /opt/ActivePerl-5.14/lib/Time/Local.pm line 116, near +"croak "Day '$mday' out of range 1..$md"" Compilation failed in require at /opt/ActivePerl-5.14/lib/HTTP/Date.pm + line 12. Compilation failed in require at /opt/ActivePerl-5.14/site/lib/LWP/Use +rAgent.pm line 12. BEGIN failed--compilation aborted at /opt/ActivePerl-5.14/site/lib/LWP +/UserAgent.pm line 12. Compilation failed in require at -e line 1. # Failed test 'issue 27 - LWP::UserAgent' # at t/issue27.t line 20. # got: '' # expected: 'ok' # Looks like you failed 1 test of 1. t/issue27.t ....... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/1 subtests blib/script/perlcc: Unexpected compiler output Subroutine fileparse redefined at /opt/ActivePerl-5.14/lib/File/Basena +me.pm line 104. ...... Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp +.pm line 385. ccode29i.pl syntax OK sh: line 1: 16298 Done echo "ö" 16299 Segmentation fault | /opt/ActivePerl-5.14/bin/perl-sta +tic -Mblib -MByteLoader ccode29i.plc t/issue29.t ....... ok ...... Subroutine trusts_directly redefined at /opt/ActivePerl-5.14/lib/Carp. +pm line 385. Can't locate package B::NULLOP for @B::PMOP::ISA at /opt/ActivePerl-5. +14/lib/Encode/Alias.pm line 135. ...... # Failed test at t/stash.t line 130. # Looks like you failed 1 test of 4. t/stash.t ......... Dubious, test returned 1 (wstat 256, 0x100) Failed 1/4 subtests t/testcore.t ...... skipped: t/CORE missing. Read t/testcore.t how to +setup. Test Summary Report ------------------- t/bytecode.t (Wstat: 0 Tests: 50 Failed: 1) Failed test: 41 TODO passed: 27 t/c_allow_opts.t (Wstat: 0 Tests: 1 Failed: 0) Parse errors: Tests out of sequence. Found (2) but expected (1) Bad plan. You planned 2 tests but ran 1. t/c_argv.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 1 Non-zero exit status: 1 t/cc.t (Wstat: 0 Tests: 105 Failed: 1) Failed test: 49 TODO passed: 44 t/issue24.t (Wstat: 0 Tests: 3 Failed: 0) TODO passed: 2 t/issue27.t (Wstat: 256 Tests: 1 Failed: 1) Failed test: 1 Non-zero exit status: 1 t/stash.t (Wstat: 256 Tests: 4 Failed: 1) Failed test: 4 Non-zero exit status: 1 Files=43, Tests=680, 560 wallclock secs ( 0.15 usr 0.17 sys + 373.20 +cusr 47.16 csys = 420.68 CPU) Result: FAIL Failed 6/43 test programs. 5/680 subtests failed. make: *** [test_dynamic] Error 255

There are many "blib/script/perlcc: Unexpected compiler output"

Replies are listed 'Best First'.
Re: B::C (1.36) Installation Failed
by Anonymous Monk on Dec 06, 2011 at 02:18 UTC

    Can someone please help? How to eliminate these errors.

    No, I doubt it :)

    Look at

    http://static.cpantesters.org/distro/B/B-C.html

    http://code.google.com/p/perl-compiler/issues/list

    1) You are not alone 2) the author knows about it 3) it is plenty of work, and it isn't exactly easy :) or "Perl"

      The author :)

      You can still force install it. It does not look *that* bad.

      Only the failing c_argv test is disturbing, with the rest you can deal with yourself. Means you have to test your compiled executables anyway and chances are good that they will work as expected.