Bug 34818 - --with-gmp overrides --with-mpfr
Summary: --with-gmp overrides --with-mpfr
Status: NEW
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.3.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-16 20:29 UTC by benoit.hudson
Modified: 2021-11-06 23:56 UTC (History)
4 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2008-01-22 04:38:24


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description benoit.hudson 2008-01-16 20:29:43 UTC
From fink, I have gmp 4.1 in /sw/{lib,include}, but mpfr is ancient.  I put a new mpfr in $HOME, and tried to build with:
  ../gcc-4.3-20080111/configure --with-gmp=/sw --with-mpfr=$HOME
Unfortunately, that tells me that my mpfr is too old.

The order of the flags does not matter; I always get, in config.log:
  gmpinc='-I/sw/include -I/Users/bhudson/include'
  gmplibs='-L/sw/lib -L/Users/bhudson/lib -lmpfr -lgmp'

In other words, it's possible to update gmp and use the system mpfr, but not to update mpfr and use the system gmp.  Given that the required mpfr is much newer (29 August 2007) than the required gmp (circa 2004), the easy fix would be to reverse this: allow updating mpfr while leaving the system gmp in place.
Comment 1 Ben Elliston 2008-01-22 04:57:28 UTC
I agree with your reasoning for the easy fix.  I'll post a patch and we'll see if it is accepted.  If not, there is a fair bit more work involved to split the gmplibs variable into two new variables.
Comment 2 Kaveh Ghazi 2009-04-16 01:05:45 UTC
Where on your system is the "ancient" mpfr located?  Is it in the /sw directory?
(In reply to comment #0)
> From fink, I have gmp 4.1 in /sw/{lib,include}, but mpfr is ancient.  I put a
> new mpfr in $HOME, and tried to build with:
> [...]
> In other words, it's possible to update gmp and use the system mpfr, but not to
> update mpfr and use the system gmp.

Where on your system the "ancient" mpfr located?  Is it in the /sw directory?  If so, why are you calling it the "system mpfr"?  Does gcc search the /sw directory by default like /usr/include & /usr/lib?

Comment 3 Eric Gallager 2018-07-06 05:00:25 UTC
(In reply to Ben Elliston from comment #1)
> I agree with your reasoning for the easy fix.  I'll post a patch and we'll
> see if it is accepted.  

Did this happen?