Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with CPAN 1

Status
Not open for further replies.

bluegroper

Technical User
Dec 12, 2002
407
AU
I'm trying to install Text::Iconv module and have done the usual
Code:
perl -MCPAN -e shell
followed by
Code:
install Text::Iconv
But then I get an error that I don't know how to fix.
Code:
[i]8< <Snip><Snip>[/i]
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/00_load........Can't load '/root/.cpan/build/Text-Iconv-1.4/blib/arch/auto/Text/Iconv/Iconv.so' for module Text::Iconv: libiconv.so.2: cannot open shared object file: No such file or directory at /usr/lib/perl5/5.8.5/i386-linux-thread-multi/DynaLoader.pm line 230.
 at t/00_load.t line 3
Compilation failed in require at t/00_load.t line 3.
BEGIN failed--compilation aborted at t/00_load.t line 3.
t/00_load........dubious
        Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED test 1
        Failed 1/1 tests, 0.00% okay
Can somebuddy tell me how to fix this ?
Much thx's
- BG
 
Would you like to tell us what OS you're using?
It can make a big difference.
Looks like a unix variant.
You need to see if the file "libiconv.so.2" exists.
If you're running linux (as I suspect) then you should be able to do a "locate libiconv.so.2"
If not, you'll probably have to run a find from the /lib level.
Once you have it you need to ensure that your linkloader knows where to find it.



Trojan.
 
Thanks Trojan
Yes its linux. Sorry, I often forget that perl also works on that other non-*nix OS.
To be more precise, I'm using a fresh install of ClarkConnect 3.1 which is based on CentOS.
The libiconv.so.2 file resides in /usr/local/lib
How do I tell the linkloader to find it ?
Ive tried the following without success :
perl Makefile.PL LIBS='-L/usr/local/lib' INC='-I/usr/local/include'
perl Makefile.PL LIBS='-L/usr/local/lib/libiconv' INC='-I/usr/local/include'
and other variations.
Also tried editing the LIBS and INC lines in Makefile.PL
I'd be really grateful for any more clues so that I can do this correctly.
More Thx's
- BG
 
From DynaLoader.pm at line 230
Code:
    # Many dynamic extension loading problems will appear to come from
    # this section of code: XYZ failed at line 123 of DynaLoader.pm.
    # Often these errors are actually occurring in the initialisation
    # C code of the extension XS file. Perl reports the error as being
    # in this perl code simply because this was the last perl code
    # it executed.
So maybe the answer is harder to find.
- BG
 
The fact that the path is /usr[red]/local[/red]/lib tells me that there's a good chance that this is your problem.
As root, open up /etc/ld.so.conf in your favourite editor and check to see if /usr/local/lib is there. My guess is that it's missing.
If it's missing, add it and save back.
Then run "ldconfig"
When all is finished, try your perl again.
Let me know how you get on.


Trojan.
 
Trojan
You're a champion. I give you TWO stars !!.
I thinks its worked.
At least the perl Makefile.PL, make, and make test worked without errors.
I'll press on with the rest of the install.
Muchas gacias.
- BG
 
You're welcome. Glad I could help.
You'll know what to look for in future.
;-)

Trojan.
 
Oh, and I'll also RTFM about ldconfig and /etc/ld.so/conf and try and understand what makes it tick. More small steps up the learning curve.
- BG
 
/etc/ld.so.conf simply tells the loader where to look for libraries. The ldconfig "creates the necessary links and cache to the most recent shared libraries" (since the loader uses that cache and not /etc/ld.so.conf).
Simple really.


Trojan.
 
And mine also contains :
include ld.so.conf.d/*.conf
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top