Ticket #7466 (closed bug: fixed)

Opened 7 months ago

Last modified 6 months ago

[PATCH] integer-gmp silently ignores --with-gmp-* whenever it finds GMP.framework in the system-standard path

Reported by: PHO Owned by:
Priority: normal Milestone:
Component: libraries (other) Version: 7.6.1
Keywords: Cc:
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Other Difficulty: Unknown
Test Case: Blocked By:
Blocking: Related Tickets:

Description

integer-gmp's ./configure should not ignore --with-gmp-includes/--with-gmp-libraries just because GMP.framework is found. It should search for GMP.framework only when libgmp/libgmp3 is absent.

Here is my  patch:

% git fetch git://github.com/phonohawk/packages-integer-gmp.git libgmp-on-darwin

Change History

  Changed 7 months ago by PHO

  • status changed from new to patch

follow-up: ↓ 4   Changed 7 months ago by igloo

  • difficulty set to Unknown

Why is the non-framework preferable?

  Changed 7 months ago by igloo

  • status changed from patch to infoneeded

in reply to: ↑ 2   Changed 7 months ago by PHO

  • status changed from infoneeded to patch
  • summary changed from [PATCH] Prefer libgmp/libgmp3 over GMP.framework on Darwin to [PATCH] integer-gmp silently ignores --with-gmp-* whenever it finds GMP.framework in the system-standard path

Sorry, my explanation was a bit misleading.

Replying to igloo:

Why is the non-framework preferable?

Most package managers, including my favorite  pkgsrc, install libgmp to some non-standard locations. If the configure script ignores whatever paths specified with --with-gmp-includes/--with-gmp-libraries, the resulting binary might end up being linked to GMP.framework in the system-standard path (which might be installed by some 3rd party softwares), instead of libgmp installed with a package manager. For that reason  pkgsrc-wip/ghc has locally had the above patch for a long time but I think it's worth merging to the upstream.

  Changed 6 months ago by igloo

  • status changed from patch to closed
  • resolution set to fixed

Fixed by:

commit 2cf2423a0c0c1e6495812467deee4df0cb4320fa
Author: Ian Lynagh <ian@well-typed.com>
Date:   Tue Jan 1 17:01:00 2013 +0000

    Provide a way for OS X users to indicate a preference for the GMP framework

    We used to always use the framework if it existed. Now the make variable
    GMP_PREFER_FRAMEWORK can be used to control whether the library or the
    framework is preferred.

    Fixes #7466.
commit d86166d5ca901eb339c4f1f5aca4d636ee86d91f
Author: Ian Lynagh <igloo@earth.li>
Date:   Tue Jan 1 18:41:51 2013 +0000

    Fix configure when we don't have a gmp library
Note: See TracTickets for help on using tickets.