Code Comments
Programming Forum and web based access to our favorite programming groups.HI, I am having a problem of using a module recently installed and just can't quite figure out a solution. I installed 'Cache::FastMmap' using -MCPAN, and made @INC contains the directory where I have installed the module (eg. .../.cpan/build/Cache-FastMmap-1.09/blib/lib/). When I use perldoc: perldoc 'Cache::FastMmap' and perldoc 'Cache::FastMmap::CImpl' the documents installed appear which supposingly mean both modules must have been installed properly. But when I test the module by using: perl -e 'use Cache::FastMmap' error came up which says: Can't locate loadable object for module Cache::FastMmap::CImpl in @INC (@INC contains: ....) at .../.cpan/build/Cache-FastMmap-1.09/blib/lib/Cache/FastMmap.pm line 217 The Cache::FastMmap::CImpl clearly is there in the directory because it it is not, perldoc wouldn't have been able to locate it with @INC ( I also double checked to make sure @INC contains the dirctory '.../.cpan/build/Cache-FastMmap-1.09/blib/lib/' under which both Cache::FastMmap::CImpl and Cache::FastMmap live) . How come this error occurs?
Post Follow-up to this messageOn Thu, 24 Mar 2005 22:48:44 -0500, nelsonstong@gmail.com (Nelson Tong) wrote: >perl -e 'use Cache::FastMmap' > >error came up which says: > >Can't locate loadable object for module Cache::FastMmap::CImpl in @INC >(@INC contains: ....) at >.../.cpan/build/Cache-FastMmap-1.09/blib/lib/Cache/FastMmap.pm line >217 > >The Cache::FastMmap::CImpl clearly is there in the directory because >it it is not, perldoc wouldn't have been able to locate it with @INC ( >I also double checked to make sure @INC contains the dirctory >'.../.cpan/build/Cache-FastMmap-1.09/blib/lib/' under which both >Cache::FastMmap::CImpl and Cache::FastMmap live) . How come this error >occurs? The "Can't locate loadable object" means that it can't find the .so compiled c component. So either you didn't compile the module properly, you have incompatible binary versions, or so permissions problem. In the directory where the Cache::FastMmap::CImpl module is, go up 2 directories to where the main Cache dir is. At that same directory level, there should be a directory called "auto". Go into auto/Cache/FastMmap/Clmpl and see if there is a file called CImpl.so, that is the file that it can't load. You can try to rebuild the module manually, and see if you are given error messages. Something could be amiss, like the if you have a perl, which was precompiled with a different compiler or library versions. You can also run strace perl -e 'use Cache::FastMmap' and see exactly where the problem is. -- I'm not really a human, but I play one on earth. http://zentara.net/japh.html
Post Follow-up to this messagezentara wrote:
>On Thu, 24 Mar 2005 22:48:44 -0500, nelsonstong@gmail.com (Nelson Tong)
>wrote:
>
>
>
>
>The "Can't locate loadable object" means that it can't find the
>.so compiled c component. So either you didn't compile the
>module properly, you have incompatible binary versions, or
>so permissions problem.
>
>In the directory where the Cache::FastMmap::CImpl module is,
>go up 2 directories to where the main Cache dir is. At that same
>directory level, there should be a directory called "auto".
>
>Go into auto/Cache/FastMmap/Clmpl and see if there is a file called
>CImpl.so, that is the file that it can't load.
>
>You can try to rebuild the module manually, and see if you are
>given error messages. Something could be amiss, like the if
>you have a perl, which was precompiled with a different compiler
>or library versions.
>
>You can also run
> strace perl -e 'use Cache::FastMmap'
>
>and see exactly where the problem is.
>
I found out why the error occurs. All this time, I had been using the
the wrong directory to be included in @INC
(".cpan/build/Cache-FastMmap-1.09/blib/lib/"- my current build
directory of CPAN as I later found out its real function)
when I should have put my local Perl's module installation dirctory
in @INC. No wonder the necessary CImpl.so file was missing and
couldn't be found.
Sorry about this and thanks for answering the question.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.