I'm having a head-scratching moment here. Precursor: this isn't a failure due to anything missing; I'm failing to understand why one thing succeeds and the other doesnt. I'm finding issues installing some of my modules with cpanm and cpan (XS based modules), then, when I pull down the repo locally and to a perl Makefile.PL and make all is well. Then when I do make test, it fails miserably (I have boldfaced the actual error so you don't have to wade through the other stuff if it isn't necessary):

spek@sequoia ~/repos/rpi-dac-mcp4922 $ make test 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

However, prove t/*.t doesn't catch the problem and goes on its merry way:

spek@sequoia ~/repos/rpi-dac-mcp4922 $ prove t/*.t t/00-load.t ....... 1/? # Testing RPi::DAC::MCP4922 2.36.1, 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.05 usr 0.00 sys + 0.23 cusr + 0.02 csys = 0.30 CPU) Result: PASS

I know what the problem is, where the problem is (at least iirc without looking at the code yet), so I just want to know why one fails and the other doesn't.


In reply to "make test" catches a C undefined symbol, but "prove" doesn't by stevieb

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.