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

I have a problem while building and testing Inline::CPP module. I'm using Perlbrew environment with Perl 5.20.1 on linux. Here's output of cpanm
cpanm (App::cpanminus) 1.7022 on perl 5.020001 built for x86_64-linux Work directory is /home/nikita/.cpanm/work/1436857054.7296 You have make /usr/bin/make You have LWP 6.08 You have /bin/tar: tar (GNU tar) 1.27.1 Copyright (C) 2013 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gp +l.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 Searching Inline::CPP on cpanmetadb ... --> Working on Inline::CPP Fetching http://www.cpan.org/authors/id/D/DA/DAVIDO/Inline-CPP-0.71.ta +r.gz -> OK Unpacking Inline-CPP-0.71.tar.gz Entering Inline-CPP-0.71 Checking configure dependencies from META.json Checking if you have ExtUtils::CppGuess 0.07 ... Yes (0.09) Checking if you have Config 0 ... Yes (5.020001) Checking if you have FindBin 0 ... Yes (1.51) Checking if you have ExtUtils::MakeMaker 7.04 ... Yes (7.04) Configuring Inline-CPP-0.71 Running Makefile.PL What C++ compiler would you like to use? [g++ -xc++ -D_FILE_OFFSET_BI +TS=64] g++ -xc++ -D_FILE_OFFSET_BITS=64 What default libraries would you like to include? [-lstdc++] -lstdc++ Detected <iostream> style headers. ('.h' not needed.) Checking if your kit is complete... Looks good Generating a Unix-style Makefile Writing Makefile for Inline::CPP Writing MYMETA.yml and MYMETA.json -> OK Checking dependencies from MYMETA.json ... Checking if you have English 0 ... Yes (1.09) Checking if you have File::Temp 0 ... Yes (0.2304) Checking if you have Inline 0.78 ... Yes (0.80) Checking if you have Config 0 ... Yes (5.020001) Checking if you have Carp 0 ... Yes (1.36) Checking if you have Test::More 1.001009 ... Yes (1.001014) Checking if you have Inline::C 0.67 ... Yes (0.76) Checking if you have Parse::RecDescent 0 ... Yes (1.967009) Building and testing Inline-CPP-0.71 cp lib/Inline/CPP.pm blib/lib/Inline/CPP.pm cp lib/Inline/CPP.pod blib/lib/Inline/CPP.pod cp lib/Inline/CPP/Config.pm blib/lib/Inline/CPP/Config.pm cp lib/Inline/CPP/Parser/RecDescent.pm blib/lib/Inline/CPP/Parser/RecD +escent.pm Manifying 3 pod documents PERL_DL_NONLAZY=1 "/home/nikita/perl5/perlbrew/perls/perl-5.20.1/bin/p +erl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::H +arness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/* +/*.t # $Config{osname}: linux # $Config{cc}: cc # $Config{gccversion}: 4.7.3 t/00load_prereqs.t .................... ok t/01fn_cans.t ......................... ok Had problems bootstrapping Inline module '_02basic_t_bc90' Can't load '/home/nikita/.cpanm/work/1436857054.7296/Inline-CPP-0.71/_ +Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so' for module _02bas +ic_t_bc90: /home/nikita/.cpanm/work/1436857054.7296/Inline-CPP-0.71/_ +Inline/lib/auto/_02basic_t_bc90/_02basic_t_bc90.so: undefined symbol: + _ZNSt8ios_base4InitD1Ev at /home/nikita/perl5/perlbrew/perls/perl-5. +20.1/lib/5.20.1/x86_64-linux/DynaLoader.pm line 193. at /home/nikita/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1 +/Inline.pm line 533. at t/02basic.t line 34. BEGIN failed--compilation aborted at t/02basic.t line 34. # Looks like your test exited with 2 before it could output anything. t/02basic.t ........................... Dubious, test returned 2 (wstat 512, 0x200) Failed 12/12 subtests Had problems bootstrapping Inline module '_03prefix_t_4c6f' Can't load '/home/nikita/.cpanm/work/1436857054.7296/Inline-CPP-0.71/_ +Inline/lib/auto/_03prefix_t_4c6f/_03prefix_t_4c6f.so' for module _03p +refix_t_4c6f: /home/nikita/.cpanm/work/1436857054.7296/Inline-CPP-0.7 +1/_Inline/lib/auto/_03prefix_t_4c6f/_03prefix_t_4c6f.so: undefined sy +mbol: _ZNSt8ios_base4InitD1Ev at /home/nikita/perl5/perlbrew/perls/pe +rl-5.20.1/lib/5.20.1/x86_64-linux/DynaLoader.pm line 193. at /home/nikita/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1 +/Inline.pm line 533. at t/03prefix.t line 0. INIT failed--call queue aborted. # Looks like your test exited with 2 before it could output anything. t/03prefix.t .......................... Dubious, test returned 2 (wstat 512, 0x200) Failed 4/4 subtests Had problems bootstrapping Inline module '_04charptr_t_fa7d' Can't load '/home/nikita/.cpanm/work/1436857054.7296/Inline-CPP-0.71/_ +Inline/lib/auto/_04charptr_t_fa7d/_04charptr_t_fa7d.so' for module _0 +4charptr_t_fa7d: /home/nikita/.cpanm/work/1436857054.7296/Inline-CPP- +0.71/_Inline/lib/auto/_04charptr_t_fa7d/_04charptr_t_fa7d.so: undefin +ed symbol: _ZNSt8ios_base4InitD1Ev at /home/nikita/perl5/perlbrew/per +ls/perl-5.20.1/lib/5.20.1/x86_64-linux/DynaLoader.pm line 193. at /home/nikita/perl5/perlbrew/perls/perl-5.20.1/lib/site_perl/5.20.1 +/Inline.pm line 533. ... Test Summary Report ------------------- t/02basic.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 12 tests but ran 0. t/03prefix.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 4 tests but ran 0. t/04charptr.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: Bad plan. You planned 2 tests but ran 0. t/08cppguess.t (Wstat: 0 Tests: 2 Failed: 0) TODO passed: 2 t/12custom_libs.t (Wstat: 512 Tests: 0 Failed: 0) Non-zero exit status: 2 Parse errors: No plan found in TAP output ... Files=52, Tests=35, 40 wallclock secs ( 0.12 usr 0.04 sys + 33.97 cus +r 4.60 csys = 38.73 CPU) Result: FAIL Failed 36/52 test programs. 6/35 subtests failed. Makefile:919: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 2 -> FAIL Installing Inline::CPP failed. See /home/nikita/.cpanm/work/14 +36857054.7296/build.log for details. Retry with --force to force inst +all it.

Replies are listed 'Best First'.
Re: Inline::CPP tests fails
by ww (Archbishop) on Jul 14, 2015 at 11:08 UTC

    TL,DR ...

          that is, DR after Lns 106 & 108 which seem to highlight the lack of necessity for posting the remaining 500-some lines.

    Have you researched the problem(s) those lines highlight?


    Questions containing the words "doesn't work" (or their moral equivalent) will usually get a downvote from me unless accompanied by:
    1. code
    2. verbatim error and/or warning messages
    3. a coherent explanation of what "doesn't work actually means.

      Everywhere where "Can't load file ... undefined symbol" error mentioned there appropriate files exists(.so files). In appropriate test files under t/ I can see examples of different C++ code tested under different conditions, e.g. Soldier class in t/02basic.t.

      DynaLoader fresh version installed and I don't know where to look next.

      For evidence - I want to play with RPerl module that has Inline::CPP as a requirment and I'm not fluent in C++ programming nor Inline::CPP usage.

      Should I report this as an issue on Inline::CPP's github page or it's looks like my exclusive problem?

Re: Inline::CPP tests fails
by locked_user sundialsvc4 (Abbot) on Jul 14, 2015 at 12:02 UTC

    Pretty-please, wrap the output in <readmore> tags . . .