elenet has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
we are migrating our perl 5.8.7 environment from Solaris 9 to AIX 5.3. I'm really a begginer in perl installation stuff.

We need to install Math-BigInt-GMP-1.24, to be honest it seems to be already installed but we got some errors in using NET::SSH.
So trying to reinstall Math-BigInt-GMP-1.24 we had the following :

-bash-3.2$ make test PERL_DL_NONLAZY=1 /home/smash/global/perl5/bin/perl "-MExtUtils::Comma +nd::MM" "-e" "test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/bigfltpm....Math::BigInt: couldn't load specified math lib(s), fallb +ack to Math::BigInt::Calc at t/bigfltpm.t line 15 # Test 1 got: "Math::BigInt::Calc" (bigfltpm.inc at line 3) # Expected: "Math::BigInt::GMP" t/bigfltpm....ok 2/2042Can't locate object method "_zeros" via package + "Math::BigInt::GMP" at bigfltpm.inc line 167, <DATA> line 2. Compilation failed in require at t/bigfltpm.t line 22, <DATA> line 2. t/bigfltpm....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED tests 1, 3-2042 Failed 2041/2042 tests, 0.05% okay t/bigintg.....Can't load '../blib/arch/auto/Math/BigInt/GMP/GMP.so' fo +r module Math::BigInt::GMP: rtld: 0712-001 Symbol __gmpz_root was ref +erenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_sqrt was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_tstbit was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_init_set was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_ior was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_xor was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. rtld: 0712-001 Symbol __gmpz_and was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a ru +ntime definition of the symbol was not found. 0509-021 Additional errors occurred but are not reported. at / +advertising/smash/be-clust/global/perl5/lib/5.8.7/aix-thread-multi/Dy +naLoader.pm line 230. at t/bigintg.t line 15 Compilation failed in require at t/bigintg.t line 15. BEGIN failed--compilation aborted at t/bigintg.t line 15. t/bigintg.....dubious Test returned status 8 (wstat 2048, 0x800) DIED. FAILED tests 1-356 Failed 356/356 tests, 0.00% okay t/bigintpm....Math::BigInt: couldn't load specified math lib(s), fallb +ack to Math::BigInt::Calc at t/bigintpm.t line 17 Math::BigInt::GMP is missing method '_one' at bigintpm.inc line 12 Cannot load outdated Math::BigInt::GMP v1.24, please upgrade at bigint +pm.inc line 12 Math::BigInt: couldn't load specified math lib(s), fallback to Math::B +igInt::Calc at bigintpm.inc line 12 # Test 1 got: "Math::BigInt::Calc" (bigintpm.inc at line 39) # Expected: "Math::BigInt::GMP" t/bigintpm....ok 1972/3043Can't locate object method "_base_len" via p +ackage "Math::BigInt::GMP" at bigintpm.inc line 530. Compilation failed in require at t/bigintpm.t line 23. t/bigintpm....dubious Test returned status 255 (wstat 65280, 0xff00) DIED. FAILED test 1 Failed 1/3043 tests, 99.97% okay t/biglog......ok t/bigroot.....Couldn't load specified math lib(s) and fallback disallo +wed at t/bigroot.t line 34 BEGIN failed--compilation aborted at t/bigroot.t line 34. # Looks like your test exited with 8 before it could output anything. t/bigroot.....dubious Test returned status 8 (wstat 2048, 0x800) DIED. FAILED tests 1-17 Failed 17/17 tests, 0.00% okay t/pod.........ok 1/1 skipped: Test::Pod not installed on this system t/pod_cov.....ok 1/1 skipped: Test::Pod::Coverage 1.08 required for testing POD + coverage
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/bigfltpm.t 255 65280 2042 4081 199.85% 1 3-2042 t/bigintg.t 8 2048 356 712 200.00% 1-356 t/bigintpm.t 255 65280 3043 1 0.03% 1 t/bigroot.t 8 2048 17 34 200.00% 1-17 2 subtests skipped. Failed 4/7 test scripts, 42.86% okay. 2415/5530 subtests <br>failed, 5 +6.33% okay. make: 1254-004 The error code from the last command is 255. -----------------------------------------------------------
Our enviroment is :
Archive::Zip -- 1.18 AutoLoader -- 5.67 Class::ErrorHandler -- 0.01 Class::Loader -- 2.03 Compress::Raw::Zlib -- 2.015 Compress::Zlib -- 2.015 Convert::ASCII::Armour -- 1.4 Convert::ASN1 -- 0.20 Convert::PEM -- 0.07 Crypt::Blowfish -- 2.10 Crypt::CAST5_PP -- 1.04 Crypt::CBC -- 2.22 Crypt::CBCeasy -- 0.24 Crypt::DES -- 2.05 Crypt::DES_EDE3 -- 0.01 Crypt::DH -- 0.06 Crypt::DSA -- 0.14 Crypt::IDEA -- 1.08 Crypt::OpenPGP -- 1.03 Crypt::Primes -- 0.50 Crypt::RIPEMD160 -- 0.04 Crypt::RSA -- 1.58 Crypt::Random -- 1.25 Crypt::Rijndael -- 1.04 Crypt::Twofish -- 2.12 DBD::Oracle -- 1.19 DBI -- 1.53 Data::Buffer -- 0.04 Digest::BubbleBabble -- 0.01 Digest::HMAC -- 1.01 Digest::MD2 -- 2.03 Digest::MD5 -- 2.36 Digest::SHA1 -- 2.11 ExtUtils::Install -- 1.41 File::Which -- 0.05 Getopt::ArgvFile -- 1.11 HTML::Parser -- 3.60 HTML::Tagset -- 3.20 IO -- 1.23 IO::Compress::Base -- 2.015 IO::Compress::Zlib -- ??? LWP -- 5.826 MD5 -- 2.03 MIME::Base64 -- 3.07 Math-BigInt -- ??? Math::BigInt -- 1.89 Math::BigInt::GMP -- 1.24 Math::BigInt::Pari -- 1.13 Math::BigRat -- 0.22 Math::GMP -- 2.04 Math::Pari -- 2.010709 Module::Build -- 0.2808 Module::ScanDeps -- 0.86 Net::SFTP -- 0.10 Net::SSH::Perl -- 1.30 PAR -- 0.983 PAR::Dist -- 0.40 PAR::Packer -- 0.982 Perl -- 5.8.7 Security::Secureclient -- 0.01 Sort::Versions -- 1.5 String::CRC32 -- 1.4 Test::Simple -- 0.86 Tie::EncryptedHash -- 1.8 URI -- 1.37 XSLoader -- 0.10 YAML -- 0.62 bignum -- 0.23 version -- 0.76
Any suggestion will be appreciated.
Thanks in advance,
Elena

Replies are listed 'Best First'.
Re: Problem with Math-BigInt-GMP-1.24 on AIX
by marto (Cardinal) on Mar 03, 2010 at 12:06 UTC

    Did you install gmplib as described in the Math::BigInt::GMP INSTALL file?

    Update: Problems in Net::SSH Covers issues of compiling against a gmplib which has been built using a different compiler, the replies should be worth a read.

Re: Problem with Math-BigInt-GMP-1.24 on AIX
by almut (Canon) on Mar 03, 2010 at 12:14 UTC
    Can't load '../blib/arch/auto/Math/BigInt/GMP/GMP.so' for module Math::BigInt::GMP: rtld: 0712-001 Symbol __gmpz_root was referenced from module ../blib/arch/auto/Math/BigInt/GMP/GMP.so(), but a runtime definition of the symbol was not found. (...)

    Usually, such "symbol not found" errors mean that GMP.so has been linked against a wrong version of the GMP lib (the C library that Math::BigInt::GMP is a wrapper for), or hasn't been linked against it at all.  Were there any warnings in earlier steps of the build?

      The make process generated GM.so as following, i don't see the problem :
      -bash-3.2$ make
      cp lib/Math/BigInt/GMP.pm blib/lib/Math/BigInt/GMP.pm
      /home/smash/global/perl5/bin/perl -e 'use ExtUtils::Mksymlists; Mksymlists("NAME" => "Math::BigInt::GMP", "DL_FUNCS" => { }, "FUNCLIST" => [], "DL_VARS" => []);' /home/smash/global/perl5/bin/perl /advertising/smash/be-clust/global/perl5/lib/5.8.7/ExtUtils/xsubpp -typemap /advertising/smash/be-clust/global/perl5/li b/5.8.7/ExtUtils/typemap -typemap typemap GMP.xs > GMP.xsc && mv GMP.xsc GMP.c
      gcc -c -D_THREAD_SAFE -D_ALL_SOURCE -D_ANSI_C_SOURCE -D_POSIX_SOURCE -DUSE_NATIVE_DLOPEN -DNEED_PTHREAD_INIT -fno-strict-aliasing -pipe -D_LARGE_FILES -O -DVERSION=\"1.24\" -DXS_VERSION=\"1.24\" "-I/advertising/smash/be-clust/global/perl5/lib/5.8.7/aix-thread-multi/CORE" GMP.c
      Running Mkbootstrap for Math::BigInt::GMP ()
      chmod 644 GMP.bs
      rm -f blib/arch/auto/Math/BigInt/GMP/GMP.so
      LD_RUN_PATH="" gcc -Wl,-bhalt:4 -Wl,-bexpall -Wl,-G -Wl,-bnoentry -lpthreads -lc -L/usr/local/lib GMP.o -o blib/arch/auto/Math/BigInt/GMP/GMP.so -lgmp

      chmod 755 blib/arch/auto/Math/BigInt/GMP/GMP.so
      cp GMP.bs blib/arch/auto/Math/BigInt/GMP/GMP.bs
      chmod 644 blib/arch/auto/Math/BigInt/GMP/GMP.bs
      Manifying blib/man3/Math::BigInt::GMP.3

        Is your libgmp.so a current version? (As -lgmp is on the link command line, and you didn't get an error, some version of libgmp appears to have been found...)   You could check with dump whether the (shared) lib provides the symbols in question, e.g.

        $ dump -T /usr/local/lib/libgmp.so | grep ...

        (The -T option is from memory (I don't have an AIX system here at the moment). Use nm instead of dump in case you have a static library. See the respective man pages in case of doubt...)

Re: Problem with Math-BigInt-GMP-1.24 on AIX
by salva (Canon) on Mar 03, 2010 at 14:20 UTC
    Net::SSH::Perl is mostly unmaintained nowadays with lots of unresolved bugs in its CPAN rt queue... being in AIX will certainly not help either!

    So, make yourself a favor an move to any of the Perl SSH client modules that are being actively maintained, that is Net::SSH2 or Net::OpenSSH.