in reply to Re: "make test" catches a C undefined symbol, but "prove" doesn't
in thread "make test" catches a C undefined symbol, but "prove" doesn't

Ok, so where is that, or where should that be applied? I'm not understanding... are you saying that in one of the two test runs that API.so is being read out of blib and the other isn't?

There's no API.so or API.pm in the blib dir I'm building:

spek@sequoia ~/repos/rpi-dac-mcp4922 $ find . -name API.so spek@sequoia ~/repos/rpi-dac-mcp4922 $ spek@sequoia ~/repos/rpi-dac-mcp4922 $ find . -name API.pm spek@sequoia ~/repos/rpi-dac-mcp4922 $

...and:

spek@sequoia ~/repos/rpi-dac-mcp4922 $ ll | grep blib drwxr-xr-x 8 spek spek 4096 Feb 21 18:11 blib/ -rw-r--r-- 1 spek spek 0 Feb 21 18:44 pm_to_blib

So can you please elaborate?

Thanks,

-stevieb

Replies are listed 'Best First'.
Re^3: "make test" catches a C undefined symbol, but "prove" doesn't
by choroba (Cardinal) on Feb 22, 2017 at 03:58 UTC
    make test runs in blib as your output shows:
    # Compilation failed in require at /home/spek/repos/rpi-dac-mcp4922/bl +ib/lib/RPi/DAC/MCP4922.pm line 9. ~~ +~~

    To run prove in the same way, you need to add the -b switch. You didn't add -l , either, so what you're testing are the newest tests, but the installed versions of the libraries, pure Perl or XS.

    ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

      So like this you mean?

      spek@sequoia ~/repos/rpi-dac-mcp4922 $ prove -b -l t/*.t t/00-load.t ....... 1/? # Testing RPi::DAC::MCP4922 2.36.3, Perl 5.024 +001, /home/spek/perl5/perlbrew/perls/perl-5.24.1/bin/perl t/00-load.t ....... ok t/manifest.t ...... skipped: Author tests not required for installatio +n t/pod-coverage.t .. skipped: Author tests not required for installatio +n t/pod.t ........... skipped: Author tests not required for installatio +n All tests successful. Files=4, Tests=1, 1 wallclock secs ( 0.03 usr 0.02 sys + 0.24 cusr + 0.01 csys = 0.30 CPU) Result: PASS

      make test

      spek@sequoia ~/repos/rpi-dac-mcp4922 $ make test Running Mkbootstrap for RPi::DAC::MCP4922 () chmod 644 "MCP4922.bs" PERL_DL_NONLAZY=1 "/home/spek/perl5/perlbrew/perls/perl-5.24.1/bin/per +l" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Har +ness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/00-load.t ....... 1/? Bailout called. Further testing stopped: # Failed test 'use RPi::DAC::MCP4922;' # at t/00-load.t line 10. # Tried to use 'RPi::DAC::MCP4922'. # Error: Can't load '/home/spek/perl5/perlbrew/perls/perl-5.24.1/ +lib/site_perl/5.24.1/x86_64-linux/auto/WiringPi/API/API.so' for modul +e WiringPi::API: /usr/local/lib/libwiringPi.so: undefined symbol: shm +_open at /home/spek/perl5/perlbrew/perls/perl-5.24.1/lib/5.24.1/XSLoa +der.pm line 96. # at /home/spek/perl5/perlbrew/perls/perl-5.24.1/lib/site_perl/5.24.1 +/x86_64-linux/WiringPi/API.pm line 9. # Compilation failed in require at /home/spek/repos/rpi-dac-mcp4922/bl +ib/lib/RPi/DAC/MCP4922.pm line 9. # BEGIN failed--compilation aborted at /home/spek/repos/rpi-dac-mcp492 +2/blib/lib/RPi/DAC/MCP4922.pm line 9. # Compilation failed in require at t/00-load.t line 10. # BEGIN failed--compilation aborted at t/00-load.t line 10. Use of uninitialized value $RPi::DAC::MCP4922::VERSION in concatenatio +n (.) or string at t/00-load.t line 13. # Testing RPi::DAC::MCP4922 , Perl 5.024001, /home/spek/perl5/perlbrew +/perls/perl-5.24.1/bin/perl # Looks like you failed 1 test of 1. FAILED--Further testing stopped. Makefile:1029: recipe for target 'test_dynamic' failed make: *** [test_dynamic] Error 1

        Hi,

        Turn on verbose option to get more information

        Problem is probably the taint option inside the test files -- thats bad boilerplate