Installing perl/cpan from source on Centos 6 64-bit

Dan picture Dan · Aug 13, 2013 · Viewed 7.7k times · Source

I'm trying to install perl from source into a local directory on CentOS 6. I'm having issues installing certain packages with cpan. I solved a bunch of problems by installing some dev rpm's, I solved more problems by telling perl CentOS is 64 bit in the configure line. But I'm having a problem installing Apache2::TaintRequest that I'm not having much luck figuring out. I've been googling and recompiling for the last several days, so hopefully this isn't a dumb question...

Here is what I'm doing.

    yum -y install libxml2-devel openssl-devel vsftpd emacs alpine xorg-x11-xauth
    yum -y xorg-x11-fonts* gd gd-devel expat mod_perl gdbm gdbm-devel httpd-devel
    yum -y mod_ssl slang slang-devel expat expat-devel gmp gmp-devel curl
    yum -y curl-devel jemalloc jemalloc-devel
    mkdir /local_perl
    cd /root/
    wget http://www.cpan.org/src/5.0/perl-5.18.0.tar.gz
    tar -xzxf /root/initial_install/perl-5.18.0.tar.gz
    cd perl-5.18.0
    CFLAGS='-m64 -mtune=nocona' ./Configure -des -A ccflags="-fPIC -m64" \
      -Dprefix=/local_perl -Aldflags='-lresolv -lnsl -ldl -lm -lcrypt -lutil -lc'
    make
    make test
    make install
    /local_perl/bin/cpan
    /local_perl/bin/cpan Bundle::CPAN
    /local_perl/bin/cpan -i YAML
    /local_perl/bin/cpan -i Net::OpenID::Consumer
    /local_perl/bin/cpan -i Apache2::RequestRec
    /local_perl/bin/cpan -i Apache2::TaintRequest # fails

This is where I've gotten, here's the output

    [STL root@mgs26 perl-5.18.0]# /local_perl/bin/cpan -i Apache2::TaintRequest #
    CPAN: Storable loaded ok (v2.41)
    Reading '/root/.cpan/Metadata'
      Database was generated on Mon, 12 Aug 2013 19:53:03 GMT
    Running install for module 'Apache2::TaintRequest'
    Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
    CPAN: Digest::SHA loaded ok (v5.85)
    CPAN: Compress::Zlib loaded ok (v2.062)
    Checksum for /root/.cpan/sources/authors/id/P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz ok
    CPAN: File::Temp loaded ok (v0.2301)
    CPAN: Parse::CPAN::Meta loaded ok (v1.4405)
    CPAN: CPAN::Meta loaded ok (v2.120921)
    CPAN: Module::CoreList loaded ok (v2.90)

      CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz

    Checking if your kit is complete...
    Looks good
    Warning: prerequisite Taint 0 not found.
    Writing Makefile for Apache2::TaintRequest
    Writing MYMETA.yml and MYMETA.json
    ---- Unsatisfied dependencies detected during ----
    ----  PHRED/Apache2-TaintRequest-0.01.tar.gz  ----
        Taint [requires]
    Running make test
      Delayed until after prerequisites
    Running make install
      Delayed until after prerequisites
    Running install for module 'Taint'
    Running make for P/PH/PHOENIX/Taint-0.09.tar.gz
    Checksum for /root/.cpan/sources/authors/id/P/PH/PHOENIX/Taint-0.09.tar.gz ok

      CPAN.pm: Building P/PH/PHOENIX/Taint-0.09.tar.gz

    Checking if your kit is complete...
    Looks good
    Writing Makefile for Taint
    Writing MYMETA.yml and MYMETA.json
    cp Taint.pm blib/lib/Taint.pm
    Manifying blib/man3/Taint.3
      PHOENIX/Taint-0.09.tar.gz
      /usr/bin/make -- OK
    CPAN: YAML loaded ok (v0.84)
    Running make test
    PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/0-basic.t .... Failed 4/52 subtests 
    t/no-taint.t ... ok   
    t/tied.t ....... All 11 subtests passed 
    t/u-untaint.t .. ok     

    Test Summary Report
    -------------------
    t/0-basic.t  (Wstat: 0 Tests: 52 Failed: 4)
      Failed tests:  32, 38-40
    t/tied.t     (Wstat: 0 Tests: 12 Failed: 1)
      Failed test:  12
      Parse errors: Bad plan.  You planned 11 tests but ran 12.
    Files=4, Tests=78,  0 wallclock secs ( 0.07 usr  0.02 sys +  0.07 cusr  0.04 csys =  0.20 CPU)
    Result: FAIL
    Failed 2/4 test programs. 5/78 subtests failed.
    make: *** [test_dynamic] Error 255
      PHOENIX/Taint-0.09.tar.gz
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports PHOENIX/Taint-0.09.tar.gz
    Running make install
      make test had returned bad status, won't install without force
    Running make for P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz
      Has already been unwrapped into directory /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt

      CPAN.pm: Building P/PH/PHRED/Apache2-TaintRequest-0.01.tar.gz

    Warning: Prerequisite 'Taint => 0' for 'PHRED/Apache2-TaintRequest-0.01.tar.gz' failed when processing 'PHOENIX/Taint-0.09.tar.gz' with 'make_test => NO'. Continuing, but chances to succeed are limited.
    CPAN: Time::HiRes loaded ok (v1.9725)
    cp lib/Apache2/TaintRequest.pm blib/lib/Apache2/TaintRequest.pm
    Manifying blib/man3/Apache2::TaintRequest.3
      PHRED/Apache2-TaintRequest-0.01.tar.gz
      /usr/bin/make -- OK
    Running make test
    PERL_DL_NONLAZY=1 /local_perl/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
    t/Apache2-TaintRequest.t .. 1/1 
    #   Failed test 'use Apache2::TaintRequest;'
    #   at t/Apache2-TaintRequest.t line 7.
    #     Tried to use 'Apache2::TaintRequest'.
    #     Error:  Can't locate Taint.pm in @INC (you may need to install the Taint module) (@INC contains: /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/arch /local_perl/lib/site_perl/5.18.0/x86_64-linux /local_perl/lib/site_perl/5.18.0 /local_perl/lib/5.18.0/x86_64-linux /local_perl/lib/5.18.0) at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
    # BEGIN failed--compilation aborted at /root/.cpan/build/Apache2-TaintRequest-0.01-Hq_Pbt/blib/lib/Apache2/TaintRequest.pm line 29.
    # Compilation failed in require at (eval 4) line 2.
    # BEGIN failed--compilation aborted at (eval 4) line 2.
    # Looks like you failed 1 test of 1.
    t/Apache2-TaintRequest.t .. Dubious, test returned 1 (wstat 256, 0x100)
    Failed 1/1 subtests 

    Test Summary Report
    -------------------
    t/Apache2-TaintRequest.t (Wstat: 256 Tests: 1 Failed: 1)
      Failed test:  1
      Non-zero exit status: 1
    Files=1, Tests=1,  0 wallclock secs ( 0.04 usr  0.01 sys +  0.04 cusr  0.01 csys =  0.10 CPU)
    Result: FAIL
    Failed 1/1 test programs. 1/1 subtests failed.
    make: *** [test_dynamic] Error 1
      PHRED/Apache2-TaintRequest-0.01.tar.gz
    one dependency not OK (Taint); additionally test harness failed
      /usr/bin/make test -- NOT OK
    //hint// to see the cpan-testers results for installing this module, try:
      reports PHRED/Apache2-TaintRequest-0.01.tar.gz
    Running make install
      make test had returned bad status, won't install without force

I'm at a loss, any help would be greatly appreciated. Thanks.

Answer

Oesor picture Oesor · Aug 13, 2013

Have you seen if perlbrew sets the right flags and just works?