Net::SSH installation problems - how do I force local path?

I

Ishmael

I'm trying to install Net::SSH locally (not as root), but I'm having
trouble getting Make to recognize the paths to the required (also
locally installed) packages.

Here's what I'm doing. First, I create the Makefile.

perl Makefile.PL PREFIX=/home/kstahl/PERL/Net-SSH-Perl-1.30

** Note that I have edited Makefile.PL by adding the following line (in
the hopes that at least it will find my local version of GMP:

LIBS => ['-L/home/kstahl/PERL/Math-GMP-2.04/'],

The messages I then get are not promising. Still, the warnings below I
think are created by trying to run 'use mypackage' and then capturing
the error messages, and since 'use' doesn't know about my local
installation of GMP, the error doesn't mean much.

...
Checking if your kit is complete...
Looks good
Warning: prerequisite Digest::SHA1 2.10 not found. We have 2.04.
Warning: prerequisite Math::GMP 1.04 not found.
Warning: prerequisite Scalar::Util 0 not found.
Writing Makefile for Net::SSH::perl

Now 'make' doesn't give any errors, but 'make test' gives the following
(excerpt):

PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e"

"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/01-compile.....dubious

Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t/02-buffer......Can't load

'/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
for
module Math::GMP: ld.so.1: /usr/local/bin/perl: fatal: libgmp.so.3:
open failed:
No such file or directory at
/apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm
line 206.
at t/02-buffer.t line 9
Compilation failed in require at t/02-buffer.t line 9.
BEGIN failed--compilation aborted at t/02-buffer.t line 9.
...

As I read it, the compiler is looking for GMP.so in the Perl
installation directory, but that's not where it is - it's in my local
directory. How can I force the compiler to look in the right place?
Thanks a million for your help.
 
S

Sisyphus

..
..
As I read it, the compiler is looking for GMP.so in the Perl
installation directory, but that's not where it is - it's in my local
directory. How can I force the compiler to look in the right place?
Thanks a million for your help.

See Sherm Pendley's post in the thread "Math::GMP make test fails" (posted
yesterday).

Cheers,
Rob
 
I

Ishmael

Sisyphus said:
.
.

See Sherm Pendley's post in the thread "Math::GMP make test fails" (posted
yesterday).

Cheers,
Rob

Well, actually this is the same person that posted the previous thread.
Sherm's reply was very helpful, but I'm afraid it doesn't apply in
this case. His reply is where I got the idea of putting a 'LIBS =>
....' line in my Makefile.PL. Alas, it doesn't do the trick this time
around. Somehow, 'make test' is bypassing my explicit path definition.
Any ideas?
 
S

Sisyphus

..
..
..
..

Well, actually this is the same person that posted the previous thread.

Heh ... so it is :)
Sherm's reply was very helpful, but I'm afraid it doesn't apply in
this case. His reply is where I got the idea of putting a 'LIBS =>
...' line in my Makefile.PL. Alas, it doesn't do the trick this time
around. Somehow, 'make test' is bypassing my explicit path definition.
Any ideas?

When I go back to your original post in this thread, first thing I notice
is:
Warning: prerequisite Math::GMP 1.04 not found.

How does that happen ? You've successfully built Math::GMP (according to the
other thread).

I think it's a good idea to fix that problem first.

What does 'perl -MMath::GMP -e 'print "ok\n"' produce ?

Cheers,
Rob
 
I

Ishmael

When I go back to your original post in this thread, first thing I notice
is:


How does that happen ? You've successfully built Math::GMP (according to the
other thread).

I think it's a good idea to fix that problem first.

What does 'perl -MMath::GMP -e 'print "ok\n"' produce ?

Same problem - it's looking in the wrong directory. Here's the error
message:

Can't load

'/apps/gnu/perl_local/lib/site_perl/5.6.1/sol2.sun4/auto/Math/GMP/GMP.so'
for
module Math::GMP: ld.so.1: perl: fatal: libgmp.so.3: open failed: No
such file
or directory at /apps/gnu/perl-5.6.1/lib/sol2.sun4/DynaLoader.pm
line 206.
at -e line 0
Compilation failed in require.
BEGIN failed--compilation aborted.

Now, the only way I know of setting the Perl search path is to use the
PERL5LIB variable, which I've set as shown below.

echo $PERL5LIB

/home/kstahl/PERL/Digest-1.15:/home/kstahl/PERL/Digest-SHA1-2.11:/home/kstahl/PE

RL/gmp-4.2.1:/home/kstahl/PERL/Math-GMP-2.04:/home/kstahl/PERL/Scalar-List-Utils
-1.19:/home/kstahl/PERL/Net-SSH-Perl-1.30

As you can see, the path to the correct version of GMP is right there.
Is there something else I should be doing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top