Configuring fails on missing mpc.h on Mac OS 10.5.8
IainS
developer@sandoe-acoustics.co.uk
Fri Dec 18 09:02:00 GMT 2009
On 17 Dec 2009, at 20:54, Matt Fago wrote:
>> I've seen similar confusing errors when the configure process
>> picked up old versions of the libraries that were installed in some
>> unexpected places. As, say, mpfr requires gmp, both (using a
>> hopefully obvious notation) $WITH_GMP_DIR/include and
>> $WITH_MPFR_DIR/include will be passed to the compiler as parts of
>> the include search path (i.e. -I). So if you have an old version of
>> mpfr in $WITH_GMP_DIR, this will be picked up instead of the newer
>> version of $WITH_MPFR_DIR (or vice versa, depending of the ordering
>> of the command line). So I guess you should try uninstalling any
>> old versions of these libraries that are lying around, or try
>> installing all new versions in one place, and then simply using --
>> with-gmp to point to them once and for all.
>
>
> Unless you know exactly what you are doing I would very strongly
> suggest doing in-tree builds of gmp, mpfr, and mpc. This will let
> gcc compile these three libraries for you and link gcc/gfortran
> statically to these libraries. This way you never have to worry
> about them at all, really.
>
> See http://gcc.gnu.org/install/prerequisites.html
>
> The key lines are:
>
> "...if a GMP source distribution is found in a subdirectory of your
> GCC sources named gmp, it will be built together with GCC."
> "...if a MPFR source distribution is found in a subdirectory of your
> GCC sources named mpfr, it will be built together with GCC."
> "...if an MPC source distribution is found in a subdirectory of your
> GCC sources named mpc, it will be built together with GCC. "
>
> So just unpack the sources into the top of the gcc source tree and
> change the directory names appropriately.
>
> Yes, this is quite hidden, and completely overlooked by 99.9% of
> everyone. But at least it's documented somewhere now.
>
> IMHO, this should be more obvious, and the recommended practice.
This is a great idea (and I was doing it all the time until approx. 6
months ago).
however, in-tree builds are broken right now on darwin and i686-pc-
linux-gnu (PR42424) and have been broken on & off since the move to
make c++ compat.
I lost enthusiasm since earlier PRs provoked no response at all (from
which I infer not many people are using the in-tree method).
.... Notwithstanding this, if one is doing a one-off build it's a
great idea.
However, for repeated build/regtest the gmp/mpfr/mpc builds and checks
start to chew up a fair amount of time.
Darwin GMP/MPFR build requires some finessing - see the comment(s) on
the GMP site:
I build GMP/MPFR as 4-way fat static libraries (scripts attached,
you'll need Apple's Developer tools installed so that the SDKs can be
found - free download). [there are no instructions and I've nowhere
to host them - so if you want/need help have to contact me off list].
... this method means that there's no issue with having to supply/
locate the dylibs for gmp/mpfr/mpc...
The resulting trees can be placed anywhere (I put them on the same
partition as I use for building gcc). One then refers to them with --
with-{gmp,mpfr}=/wherever/you/put/them.
MPC in-tree build is then working (although its make check fails
because it can't find the gmp lib).
The scripts are NOT user-friendly nor generic - you have to edit them
to your requirements ;
I don't recommend trying to build the objects in the source directory
- it will get immensely confusing (might not even work..) ;-)
cheers,
Iain
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gmp-cover.h
Type: application/octet-stream
Size: 1355 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091218/008890d0/attachment.obj>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-gmp-431-x5.sh
Type: application/octet-stream
Size: 8833 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091218/008890d0/attachment-0001.obj>
-------------- next part --------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: make-mpfr-241-x5.sh
Type: application/octet-stream
Size: 7154 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20091218/008890d0/attachment-0002.obj>
-------------- next part --------------
More information about the Fortran
mailing list