FW: Configuring fails on missing mpc.h on Mac OS 10.5.8
Matt Fago
fago@earthlink.net
Thu Dec 17 20:55:00 GMT 2009
> 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.
HTH,
Matt
More information about the Fortran
mailing list