in reply to Problem with Math-BigInt-GMP-1.24 on AIX

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?

Replies are listed 'Best First'.
Re^2: Problem with Math-BigInt-GMP-1.24 on AIX
by elenet (Initiate) on Mar 03, 2010 at 13:18 UTC
    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...)