Hi Rob,

this one turned out to be harder than expected.

First of all, I have to correct myself. While I did a ./configure --disable-static --enable-shared for gmp-4.2.1, I didn't check on the results, which was neglegance on my part - there were none. There is a problem with libgmp's configure script, which prevents shared libraries from being built, and silently falls back to static. Duh.

After upgrading libtool (which didn't resolve anything), I found the following patch here, which immediately solves the problem:

--- configure.old 2006-07-19 11:01:44.000000000 +0200 +++ configure 2006-07-19 10:49:59.000000000 +0200 @@ -12547,7 +12547,7 @@ ;; darwin* | rhapsody*) - if test "$GXX" = yes ; then + if test "$GCC" = yes ; then archive_cmds_need_lc=no case "$host_os" in rhapsody* | darwin1.[012])

Now that the shared library has been built, everything works fine for Math::GMP without further intervention, just as you expected.

dailuaine:~/Documents/Develop/Math-GMP-2.04 pete$ perl Makefile.PL Writing Makefile for Math::GMP dailuaine:~/Documents/Develop/Math-GMP-2.04 pete$ make gcc -c -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasin +g -pipe -Wdeclaration-after-statement -I/usr/local/include -I/opt/loc +al/include -O3 -DVERSION=\"2.04\" -DXS_VERSION=\"2.04\" "-I/usr/lo +cal/lib/perl5/5.8.8/darwin-2level/CORE" GMP.c Running Mkbootstrap for Math::GMP () chmod 644 GMP.bs rm -f blib/arch/auto/Math/GMP/GMP.bundle LD_RUN_PATH="/usr/local/lib" env MACOSX_DEPLOYMENT_TARGET=10.3 cc -bu +ndle -undefined dynamic_lookup -L/usr/local/lib -L/opt/local/lib GMP. +o -o blib/arch/auto/Math/GMP/GMP.bundle \ -lgmp \ chmod 755 blib/arch/auto/Math/GMP/GMP.bundle cp GMP.bs blib/arch/auto/Math/GMP/GMP.bs chmod 644 blib/arch/auto/Math/GMP/GMP.bs Manifying blib/man3/Math::GMP.3 dailuaine:~/Documents/Develop/Math-GMP-2.04 pete$ make test PERL_DL_NONLAZY=1 /usr/local/bin/perl "-MExtUtils::Command::MM" "-e" " +test_harness(0, 'blib/lib', 'blib/arch')" t/*.t t/gmppm....ok + All tests successful. Files=1, Tests=350, 1 wallclock secs ( 0.21 cusr + 0.04 csys = 0.25 + CPU)

Thanks again for your help. It seems that the problem is on the libgmp side, so I'll send the problem description and the workaround to the developers.

Best regards,

  Peter.


In reply to Re^11: Math::GMP won't install on Darwin by peckel
in thread Math::GMP won't install on Darwin by jkeenan1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.