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

Greetings fellow monks. I'm having difficulties installing Math::GMP on a Solaris 8 box.

The sysadmin has installed Perl 5.8.3, and it looks to be a 32-bit version. I have built libgmp as 32-bit (using ABI=32), and installed that in /usr/local. Then I did 'make' on the Math::GMP module, and that went okay. But when I do 'make test' it fails, saying that DynaLoader.pm can't find libgcc_s.so.1 (line 229).

I'm stumped... libgcc_s.so.1 is in /usr/local/lib and is 32-bit. Any clues as to what I'm doing wrong?

BTW, I am going through this particular mode of torture because I need to enable Net::SSH::Perl on this box.

Ever grateful... PCS

Replies are listed 'Best First'.
Re: Struggling with Math::GMP on Solaris 8
by hawtin (Prior) on Mar 26, 2004 at 03:52 UTC

    From back in the mists of time this problem rings a bell. Unfortunately I can't remember the exact fix.

    Have you tried forcing the link to libgcc_s.so.1 to be static (assuming you have a static version). My recollection is that you would need to modify Makefile.PL from:

    my $libs = "-lgcc_s";

    to:

    my $libs = "-Bstatic -lgcc_s";

    (Assuming you are using gcc) I have no experience with this module but have found the need to do that type of thing in the past

    You need to be absolutely sure that the Perl, your module and the shared library are all 32bit. The file command should tell you.

    Another trick is to try various settings of the environment variable $LD_LIBRARY_PATH

    Update:Ahh, I asked about some related stuff in this node Finding loadable objects (script refuses to fail)

Re: Struggling with Math::GMP on Solaris 8
by xorl (Deacon) on Mar 25, 2004 at 21:20 UTC
    Is DynaLoader.pm looking for libgcc_s.so.1 in some weird place??

      That's what I'm unsure of. How do I determine where it is looking? Is that to be found somewhere in the Makefile?

      I think it should be looking in /usr/local/lib. The only other place is in /usr/local/lib/sparcv9, which has only 64-bit files, so I'm pretty sure that isn't the right place.

        How do I determine where it is looking?
        The error message should tell you where its looking. Try perl -V:'.*?pa?th.*?' for ideas