in reply to Re^2: How to add path to @INC
in thread How to add path to @INC

First problem occurs when building Scope::Upper (which is a TryCatch prerequisite):
Upper.xs:1331:11: error: ‘CXt_LOOP_FOR’ undeclared (first use in this +function) case CXt_LOOP_FOR:
Therefore Scope::Upper fails to build and does not get installed.
Versions of perl prior to 5.24.0 define CXt_LOOP_FOR in cop.h, but not perl-5.24.0.
But it's worse than that - see the bug report.
That thread contains a patch which might solve your issue if you wish to apply it.

TryCatch therefore fails its tests because Scope::Upper cannot be found.
Therefore, TryCatch fails to install. You could force the installation but that won't help because TryCatch.pm needs to load Scope/Upper.pm and there's no way of installing a loadable Scope::Upper when it fails to build.

I would take this up with the authors of these 2 modules.
Does TryCatch *really* need to use Scope::Upper ?
Maybe the Scope::Upper author would agree to upload a devel version of Scope::Upper that at least builds (despite his reservations about the mileage that would provide). It could be that the broken aspects of Scope::Upper don't impact on TryCatch.pm and it's just a matter of installing the patched version.

Or you could consider using something else .... or revert to perl-5.22.x or earlier.

Cheers,
Rob

Replies are listed 'Best First'.
Re^4: How to add path to @INC
by dave_the_m (Monsignor) on May 21, 2016 at 08:25 UTC
    That thread contains a patch which might solve your issue if you wish to apply it.
    That patch was just a work-in-progress proof of concept; I wouldn't recommend using it in production. I'm still working writing proper fixes for Scope::Upper.

    Dave.

Re^4: How to add path to @INC
by TSN (Acolyte) on May 21, 2016 at 20:34 UTC
    Thank you Rob

    I had a earlier version of Perl however I needed update it due to a software (CLUMPAK) that asks for modules that only work in Perl 5.24! Really everything worked fine in earlier version but in this one I have problems like that! Even more others modules have problems too:

    cpan[7]> install GraphViz Running install for module 'GraphViz' Checksum for /home/uce/.cpan/sources/authors/id/R/RS/RSAVAGE/GraphViz- +2.20.tgz ok Configuring R/RS/RSAVAGE/GraphViz-2.20.tgz with Build.PL Can't exec "dot": Ficheiro ou directoria inexistente at Build.PL line +14. Please install Graphviz from http://www.graphviz.org/. No 'Build' created RSAVAGE/GraphViz-2.20.tgz /usr/local/bin/perl Build.PL --installdirs site -- NOT OK Failed during this command: RSAVAGE/GraphViz-2.20.tgz : writemakefile NO -- No + 'Build' created

    or

    cpan[6]> install DB_File Running install for module 'DB_File' Checksum for /home/uce/.cpan/sources/authors/id/P/PM/PMQS/DB_File-1.83 +8.tar.gz ok Configuring P/PM/PMQS/DB_File-1.838.tar.gz with Makefile.PL Parsing config.in... Looks Good. Checking if your kit is complete... Looks good 'EXPATINCPATH' is not a known MakeMaker parameter name. 'EXPATLIBPATH' is not a known MakeMaker parameter name. Warning (mostly harmless): No library found for -ldb Generating a Unix-style Makefile Writing Makefile for DB_File Writing MYMETA.yml and MYMETA.json PMQS/DB_File-1.838.tar.gz /usr/local/bin/perl Makefile.PL EXPATLIBPATH=/non-standard/lib EXPAT +INCPATH=/non-standard/include -- OK Running make for P/PM/PMQS/DB_File-1.838.tar.gz cp DB_File.pm blib/lib/DB_File.pm Running Mkbootstrap for DB_File () chmod 644 "DB_File.bs" "/usr/local/bin/perl" -MExtUtils::Command::MM -e 'cp_nonempty' -- DB_F +ile.bs blib/arch/auto/DB_File/DB_File.bs 644 cc -c -I/usr/local/BerkeleyDB/include -fwrapv -fno-strict-aliasing -p +ipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FIL +E_OFFSET_BITS=64 -O2 -DVERSION=\"1.838\" -DXS_VERSION=\"1.838\" -fP +IC "-I/usr/local/lib/perl5/5.24.0/x86_64-linux/CORE" -D_NOT_CORE -D +mDB_Prefix_t=size_t -DmDB_Hash_t=u_int32_t version.c version.c:30:16: fatal error: db.h: Ficheiro ou directoria inexistente #include <db.h> ^ compilation terminated. make: ** [version.o] Erro 1 PMQS/DB_File-1.838.tar.gz /usr/bin/make -- NOT OK Failed during this command: PMQS/DB_File-1.838.tar.gz : make NO

    summing up, all these modules required for Bio:SeIO fail

    cpan[5]> install Bio::SeqIO Running install for module 'Bio::SeqIO' Checksum for /home/uce/.cpan/sources/authors/id/C/CJ/CJFIELDS/BioPerl- +1.6.924.tar.gz ok Scanning cache /home/uce/.cpan/build for sizes ...................................................................... +......DONE Configuring C/CJ/CJFIELDS/BioPerl-1.6.924.tar.gz with Build.PL Checking prerequisites... recommends: * DB_File is not installed * GraphViz is not installed * SOAP::Lite is not installed Checking optional features... Bio::DB::GFF Tests....disabled requires: ! DBI is not installed DB_File Tests.........disabled requires: ! DB_File is not installed EntrezGene............disabled requires: ! Bio::ASN1::EntrezGene is not installed MySQL Tests...........disabled requires: ! DBD::mysql is not installed ! DBI is not installed Pg Tests..............disabled requires: ! DBD::Pg is not installed ! DBI is not installed SQLite Tests..........disabled requires: ! DBD::SQLite is not installed ! DBI is not installed ERRORS/WARNINGS FOUND IN PREREQUISITES. You may wish to install the v +ersions of the modules indicated above before proceeding with this installatio +n Install [a]ll BioPerl scripts, [n]one, or choose groups [i]nteractivel +y? [a] ^CWarning: No success on command[/usr/local/bin/perl Build.PL +--installdirs site] CJFIELDS/BioPerl-1.6.924.tar.gz /usr/local/bin/perl Build.PL --installdirs site -- NOT OK Failed during this command: CJFIELDS/BioPerl-1.6.924.tar.gz : writemakefile NO '/usr +/local/bin/perl Build.PL --installdirs site' returned status 2

    However I installed BioPerl-1.6.924 (Bio::SeqIO) from "outside" (without cpan), after to adding the path at PERL5LIB, and it works just fine! When I run all tests everything sounds good!

    All tests successful. Files=334, Tests=21522, 120 wallclock secs ( 3.39 usr 0.47 sys + 107. +39 cusr 4.43 csys = 115.68 CPU) Result: PASS

    What you think about all this?

    Best, TSN

      Can't exec "dot": Ficheiro ou directoria inexistente at Build.PL line 14.

      On Ubuntu, I also don't have "dot":
      $ dot --help The program 'dot' is currently not installed. You can install it by ty +ping: sudo apt-get install graphviz $
      Not sure what the intent of Build.PL is, but if I wanted to install GraphViz then I would first install "dot".
      I think that should enable installation of that module.

      version.c:30:16: fatal error: db.h: Ficheiro ou directoria inexistente #include <db.h>

      db.h is not being found - you can fix this by adding the location of db.h to the CPATH environment variable:
      export CPATH=/wherever/it/is:$CPATH
      I think you'll subsequently find that the DB library is also unlocatable - which will result in unresolved symbols when you try to run the module (eg during 'make test' stage of the build).
      That being so, I would try adding the location of the DB library's .so file to the LD_LIBRARY_PATH environment variable:
      export LD_LIBRARY_PATH=/wherever/it/is:$LD_LIBRARY_PATH
      Or maybe you need to add the location of the static DB library (.a) to the LIBRARY_PATH environment variable.
      I'm a little unsure as I've never managed to properly understand the way linking is effected on Linux - I just usually stuff around with things until I find something that works.
      Maybe someone else can chime in here with some more definitive advice.

      Cheers,
      Rob
        One more question Rob

        Now I have this:

        cpan[3]> install DB_File Running install for module 'DB_File' PMQS/DB_File-1.838.tar.gz Has already been unwrapped into directory /home/uce/.cpan/build/DB_F +ile-1.838-yBmp3Q PMQS/DB_File-1.838.tar.gz Has already been prepared PMQS/DB_File-1.838.tar.gz Could not make: Unknown error

        What can I do to fix it?

        Best,

        TSN

      CJFIELDS/BioPerl-1.6.924.tar.gz
      : writemakefile NO '/usr/local/bin/perl Build.PL --installdirs site' returned status 2


      This looks like an issue with Module::Build.
      Apparently your version of Module::Build cannot handle the --installdirs site arguments.
      Perhaps your version of Module::Build is too old or too new.

      If you need additional information about that I think you should take it up with the BioPerl folk (or maybe someone else will update this thread with better information).

      Sorry - I can't even look properly at Module::Build issues.
      Such is my loathing of that module that any attempt to diagnose problems with it just leaves me wanting to throw a brick through the console, and I'm not prepared to waste a perfectly good brick over Module::Build.

      If Module::Build gets in the way of allowing a module to install, then I just go without that module.
      Thankully, so far, this policy has not meant that I've had to do without a module that I really want.

      Cheers,
      Rob
        Thanks a lot Rob

        you have been a good helper!

        Cheers,

        TSN

        Hi Rob!

        Now I have a new problem with the module GD

        When I try install de module GD::Text I have this:

         Can't load '/usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux/auto/GD/GD.so' for module GD: /usr/local/lib/perl5/site_perl/5.24.0/x86_64-linux/auto/GD/GD.so: undefined symbol: PL_thr_key at /usr/local/lib/perl5/5.24.0/x86_64-linux/DynaLoader.pm line 193. When I try  cpan install GD

        GD is up to date (2.56)

        I really need to fix this to run a software!

        Can you help me once more?

        Cheers

        TSN