in reply to Net::SFTP and the GMP pre-req.

Symbol not found: ___gmpz_init_set_str

That looks quite odd to me. Whilst the gmp library defines mpz_init_set_str it does *not*, afaik, define gmpz_init_set_str - nor, to the best of my knowledge, has it ever done so.

My guess is that the problem therefore might lie with the Math::BigInt::GMP module. Are they the same version of that module in both cases ? If so, where does Math::BigInt::GMP find __gmpz_init_set_str on the machine where things work fine ?

Cheers,
Rob
Update: Hmmm ... in gmp.h:
#define mpz_init_set_str __gmpz_init_set_str
I'm now not at all sure about what's going on - not that I ever really was :-)
It still looks odd to me that you're getting an error for that particular symbol. Does Math::BigInt::GMP explicitly call __gmpz_init_set_str ? If so, shouldn't it be calling mpz_init_set_str instead ?
Is the gmp library on the problem machine functional ? (Can you run C programs that use it, and can you build Math::GMP against it ?)
Btw, I would also prefer to use Net::SSH2, as suggested elsewhere in this thread.

Replies are listed 'Best First'.
Re^2: Net::SFTP and the GMP pre-req.
by Anonymous Monk on May 06, 2008 at 07:57 UTC
Re^2: Net::SFTP and the GMP pre-req.
by saintly (Scribe) on Jun 12, 2008 at 18:02 UTC
    FWIW, I encountered the same problem when I installed Math::BigInt::GMP improperly. I tried to install it without having libgmp3 installed. When it failed (unable to find gmp.h) I installed the library, then did another 'make' and 'make install'. It broke (unknown symbol) until I went back, did 'perl Makefile.PL' to remake the makefile, then reinstalled (this time, with 'make test' first, like I should have done the first time). Without Math::BigInt::GMP, Net::SSH::Perl was really slow, taking over a minute to connect. Net::SFTP::Foreign supports password authentication now, with the latest versions (albeit as an experimental feature). That's probably the only reason I didn't use it before.