3

just starting out with perl (trying to get an Request Tracker install working): For some reason I can't install Cache::Cache! (or rather the tests are failing): Notes: perl 5.8.8 on CentOS 5.8 Final (x86_64, 2.6.18-308.13.1.el5), Apache 2.2.23 (I've seen no reports for 2.6.18-308 on cpan.org, but some versions of 2.6.18-xyz fail (mostly alpha5 or xend4 versions are the failures), but most pass:

I've tried with cpan, cpanm, I've tried to use pm-uninstall to get rid of it, but it says it's not there..

cpanm Cache::Cache
--> Working on Cache::Cache
Fetching http://www.cpan.org/authors/id/J/JS/JSWARTZ/Cache-Cache-1.06.tar.gz ... OK
Configuring Cache-Cache-1.05 ... OK
Building and testing Cache-Cache-1.06 ... FAIL
! Installing Cache::Cache failed. See /root/.cpanm/build.log for details.

so I:

more /root/.cpanm/build.log

relevant section of output is (seems to be):

 Manifying blib/man3/Cache::NullCache.3
PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/1_test_cache_interface.t ................. ok
t/2_test_memory_cache.t .................... ok

Error:
Can't call method "set_size" on unblessed reference at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm line 240.

Can't call method "set_size" on unblessed reference at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 38.
    Error::_throw_Error_Simple('HASH(0x11e14db8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 310
    Error::subs::run_clauses('HASH(0x11e14d48)', 'Can\'t call method "set_size" on unblessed reference at /root...', undef, 'ARRAY(0x11efcbd8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 
430
    Error::subs::try('CODE(0x11e14ba8)', 'HASH(0x11e14d48)') called at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/CacheTester.pm line 59
    Cache::CacheTester::test('Cache::CacheTester=HASH(0x11e14ae8)', 'Cache::FileCache=HASH(0x121d2ea8)') called at t/3_test_file_cache.t line 41


t/3_test_file_cache.t ...................... 
Failed 33/35 subtests 

Error:
Can't call method "set_size" on unblessed reference at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm line 240.

Can't call method "set_size" on unblessed reference at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 38.
    Error::_throw_Error_Simple('HASH(0x15e77d8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 310
    Error::subs::run_clauses('HASH(0x15e7768)', 'Can\'t call method "set_size" on unblessed reference at /root...', undef, 'ARRAY(0x15a1bd8)') called at /usr/local/lib/perl5/site_perl/5.8.8/Error.pm line 43
0
    Error::subs::try('CODE(0x15e74a8)', 'HASH(0x15e7768)') called at /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/CacheTester.pm line 59
    Cache::CacheTester::test('Cache::CacheTester=HASH(0x15e7618)', 'Cache::SharedMemoryCache=HASH(0x15e6af8)') called at t/4_test_shared_memory_cache.t line 41


t/4_test_shared_memory_cache.t ............. 
Failed 33/35 subtests 

And then it just repeats for a while...

This is line 240/241 from /root/.cpanm/work/1354840722.23539/Cache-Cache-1.06/blib/lib/Cache/BaseCache.pm

  $object->set_size( $self->_get_backend( )->
                 get_size( $self->get_namespace( ), $p_key ) );

Sorry if this seems like a total newb question. I've searched for so many different string combinations from all of these different errors and it's like nobody has ever had this problem before. To boot, I read about Cache::Cache, that it's like so solid that it hasn't been updated in two years or something, and it's one of the most common modules.

I need this module because it's a dependency of HTML::Mason, which is a dependency of Request Tracker 4.0.8. I've installed almost all the other dependencies (I've tried installing IPC::ShareLite, successfully, and 'mason' instead, to no avail). Sure I could force install something, but I'm really not that comfortable with it as a newbie to just go around '--force' everything, as I know that it won't necessarily work, and that's what the tests are telling me.

The other modules I can see I'm missing, some of which fail to be installed mentioned above, and additionally Plack won't install:

PSGI missing dependencies:
    Plack ...MISSING

HTML::Mason ...MISSING
        Can't locate HTML/Mason.pm in @INC

HTML::Mason::PSGIHandler ...MISSING
        Can't locate HTML/Mason/PSGIHandler.pm in @INC

Plack::Handler::Starlet ...MISSING
  • 1
    did you ever find something with this? I am experiencing the same problems, although it is on a working Catalyst system rather than during an install. I think it is something that has changed recently in a depending module and that is why we are seeing it suddenly. –  Jan 13 '13 at 18:43
  • What I did in the meantime, before I completely switched from RT to MantisBT (non-perl), was, use a WHM GUI to 'install' the modules. They went in without a hitch, but I imagine this was kinda like using the --force option. I abandoned the software shortly thereafter anyway and did a complete restore on the VPS since mysql went crazy shortly after that, not sure why. But Andy's response below might be of help to you. – NOTjust -- user4304 Feb 26 '13 at 17:49

1 Answers1

1

Is there a reason you are installing modules from CPAN on CentOS instead of using the CentOS repository /RPMs for the perl modules? If not, then you might try using RPMs from the EPEL repository: http://fedoraproject.org/wiki/EPEL

They have version 1.05 in EPEL for CentOS 5: http://mirrors.kernel.org/fedora-epel/5/x86_64/perl-Cache-Cache-1.05-1.el5.noarch.rpm. You might find you can more easily satisfy dependencies by locating modules in the CentOS base or EPEL repos (if they don't call explicitly for version 1.06).

I know this doesn't solve the actual question of why building the module failed. But could be an alternative to getting Cache-Cache installed at least. If you do end up going the RPM package route then another good tool to check out is http://perl.arix.com/cpan2rpm/. I use cpan2rpm to build RPMs for perl modules that don't exist in CentOS or EPEL repos and have had good success with them playing nicely with the system installed version of perl.

Andy Shinn
  • 4,131
  • 8
  • 38
  • 55
  • Thanks Andy, this is some great info. I eventually went with different bug tracking software altogether, but this is really useful information, thank you. +1 – NOTjust -- user4304 Feb 26 '13 at 17:44