Building Net::SFTP support on solaris with libpari etc.

D

depke

I thought I would share my experience getting this to work for solaris.
It seems that this has been a recurring problem.

Net::SFTP depends upon Net::SSH(protocol 2). This in turn depends upon
a
number of packages. But Math::pari was the fun one to build.
Math::pari requires libpari. On my system(gcc version 3.4.3 SunOS 5.8)
I was only able to build the "c" version of the library. There are
tuned versions of the routines which use assembler. But I found that
the
assembler versions would not build on my compiler.

So now I thought I was done, and if I were a patient person I would
have
been. The problem was that the key generation was horribly slow. After
digging into which calls were taking so long I discovered that even
though
I had successfully installed Math::pari it wasn't being used.
Apparently you
need Math::BigInt::pari. This overrides the core of Math::BigInt with a
pari
implementation. So I tried this but I got the following error:
_is_zero
Not an ARRAY reference at
/opt/local/perl/5.8/lib/5.8.6/Math/BigInt/Calc.pm line 998.
I tried various combinations of Math::BigInt, Math::BigInt::pari
versions
but all failed for me.

So then I decided to try Math::BigInt::GMP. I noticed that Crypt::DH
actually
prefers GMP(from DH.pm use Math::BigInt lib => "GMP,Pari";)
I believe that part of building libpari I build libgmp. Also I read
that
Math::BigInt::GMP also replaces the slow implementation of BigInt with
c code.

Eureka! It finally worked. Although I never got pari supported, at
least within
SFTP, I did get SFTP working which was my goal. I hope this helps, here
are
the package versions I am running:

Math::BigInt::GMP v1.17
Math::GMP v2.04
Math::pari v2.010602
Math::BigInt v1.74
Math::BigInt::pari v1.10 also tried v1.11
Math::BigInt::GMP v1.17
gmp-4.1
pari-2.1.6

Regards,
Tom
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top