Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

CPAN tests failing

by bobf (Monsignor)
on Apr 28, 2012 at 16:41 UTC ( #967831=perlquestion: print w/replies, xml ) Need Help??
bobf has asked for the wisdom of the Perl Monks concerning the following question:

I was going to post an RFC on my first-ever module released to CPAN, but it appears there is a problem that needs to be resolved first. I'll post the official RFC after I am convinced others can actually install the thing.

The distribution in question is RandomJungle. There are 8 modules, one of which ( contains the gold-standard data that is used by the test suite. There is something wrong with my build because all of the CPAN test reports are failing with messages like this:

PERL_DL_NONLAZY=1 /home/cpan/pit/thr-ld/perl-5.12.3/bin/perl "-MExtUti +ls::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*. +t Can't locate RandomJungle/ in @INC (@INC contains: /home/cp +an/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/RandomJungle-0. +02/blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/b +uild/RandomJungle-0.02/blib/arch /home/cpan/pit/thr-ld/conf/perl-5.12 +.3/.cpanplus/5.12.3/build/Devel-StackTrace-1.27/blib/lib /home/cpan/p +it/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Devel-StackTrace-1. +27/blib/arch /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/ +build/Carp-1.25/blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpan +plus/5.12.3/build/Carp-1.25/blib/arch /home/cpan/pit/thr-ld/conf/perl +-5.12.3/.cpanplus/5.12.3/build/Sub-Uplevel-0.24/blib/lib /home/cpan/p +it/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Sub-Uplevel-0.24/bl +ib/arch /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build +/Tree-DAG_Node-1.06/blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/. +cpanplus/5.12.3/build/Tree-DAG_Node-1.06/blib/arch /home/cpan/pit/thr +-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Test-Warn-0.24/blib/lib / +home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Test-War +n-0.24/blib/arch /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.1 +2.3/build/Devel-StackTrace-1.27/blib/lib /home/cpan/pit/thr-ld/conf/p +erl-5.12.3/.cpanplus/5.12.3/build/Devel-StackTrace-1.27/blib/arch /ho +me/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Carp-1.25/ +blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/buil +d/Carp-1.25/blib/arch /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplu +s/5.12.3/build/Sub-Uplevel-0.24/blib/lib /home/cpan/pit/thr-ld/conf/p +erl-5.12.3/.cpanplus/5.12.3/build/Sub-Uplevel-0.24/blib/arch /home/cp +an/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Tree-DAG_Node-1 +.06/blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/ +build/Tree-DAG_Node-1.06/blib/arch /home/cpan/pit/thr-ld/conf/perl-5. +12.3/.cpanplus/5.12.3/build/Test-Warn-0.24/blib/lib /home/cpan/pit/th +r-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Test-Warn-0.24/blib/arch + /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus/5.12.3/build/Random +Jungle-0.02/blib/lib /home/cpan/pit/thr-ld/conf/perl-5.12.3/.cpanplus +/5.12.3/build/RandomJungle-0.02/blib/arch /home/cpan/pit/thr-ld/perl- +5.12.3/lib/site_perl/5.12.3/x86_64-linux-thread-multi-ld /home/cpan/p +it/thr-ld/perl-5.12.3/lib/site_perl/5.12.3 /home/cpan/pit/thr-ld/perl +-5.12.3/lib/5.12.3/x86_64-linux-thread-multi-ld /home/cpan/pit/thr-ld +/perl-5.12.3/lib/5.12.3 .) at t/DB_01.t line 10. BEGIN failed--compilation aborted at t/DB_01.t line 10.

It works perfectly on my local system (of course). As this is my first time through the process, I suspect I'm missing something fairly basic. Could someone please enlighten me?

Replies are listed 'Best First'.
Re: CPAN tests failing
by moritz (Cardinal) on Apr 28, 2012 at 17:35 UTC

    That module is called and used as RandomJungle::TestData, but you store it in lib/, not lib/RandomJungle/ That's why perl doesn't find it.

    You might have a RandomJunge/ somewhere that is not shipped inside the distribution, which is why it works locally for you.

      If that's the case, then the entire distro is broken because I am missing the /lib/RandomJungle directory. I'll repackage it and release another version. Hopefully that does the trick. :-)

      Thanks for the help!

      Update: Version 0.03 has been uploaded and should be pushed to my CPAN directory soon. If anyone would like to give it a quick look, I'd appreciate it.

        From what I can tell by your CPAN layout, your directory structure should look like this:

        lib /RandomJungle /File |- |- |- |- /Tree |- |- |- |-

        Congrats on your first upload btw! For me, it was a stressful thing to do, and it took me a very long time and very much research before my first one :)

        Update: Let us know when you've got it updated and I'll install and test it.

Re: CPAN tests failing
by stevieb (Abbot) on Apr 29, 2012 at 22:06 UTC

    ok bro... a little late in the making, but as promised, here's what I had to do to install your module successfully on a pristine Ubuntu 11.10 machine:

    1 mkdir devel 2 cd devel 3 wget +omJungle-0.04.tar.gz 4 tar -xzvf RandomJungle-0.04.tar.gz 5 cd RandomJungle-0.04/ 6 perl Makefile.PL 7 make 8 make test *** expected errors due to deps 9 sudo perl -MCPAN -e 'install Test::Warn' 10 make test *** more expected errors 12 sudo perl -MCPAN -e 'install Devel::StackTrace' 13 make test *** again, expected errors 14 sudo perl -MCPAN -e 'install DBM::Deep' 15 sudo perl -MCPAN -e 'install XML::Twig' *** doa 16 sudo perl -MCPAN -e 'force install XML::Twig' *** force didn't work, so I did some research, but not before manually testing things on my own... 17 cd .. 18 wget +er-2.41.tar.gz 19 tar -xzvf XML-Parser-2.41.tar.gz 20 cd XML-Parser-2.41/ 23 make *** with another failure here, I resorted to good ol' google.

    Ironically, it was this PerlMonks post that sent me in the right direction, then I continued...

    26 sudo apt-get install libexpat1-dev 27 make 28 sudo perl -MCPAN -e 'install XML::Twig' *** success with XML::Twig!! 29 cd .. 30 cd RandomJungle-0.04/ 31 make test 32* 33* sudo make install *** and all is good :)

    From what I can tell, you have all your bases covered :)

      Very cool. Thanks for the detailed notes. I wonder if, based on the hoops you had to jump through, I should create a bundle that includes the dependencies. Are there guidelines for when/how to do that?

      CPAN testing seems to be going well: 47+ reports in, all passed. :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://967831]
Front-paged by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (5)
As of 2017-10-17 04:18 GMT
Find Nodes?
    Voting Booth?
    My fridge is mostly full of:

    Results (218 votes). Check out past polls.