最近编译GCC的时候.遇到这个问题:
configure: error: Building GCC requires GMP 4.1+ and MPFR 2.3.0+.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/ .
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
Try the --with-gmp and/or --with-mpfr options to specify their locations.
Copies of these libraries' source code can be found at their respective
hosting sites as well as at ftp://gcc.gnu.org/pub/gcc/infrastructure/ .
See also http://gcc.gnu.org/install/prerequisites.html for additional info.
If you obtained GMP and/or MPFR from a vendor distribution package, make
sure that you have installed both the libraries and the header files.
They may be located in separate packages.
网上查了很久也没有解决.最后是到http://gcc.gnu.org/install/prerequisites.html上看了一下解释.以下是原文描述:
MPFR Library version 2.4.2 (or later)
Necessary to build GCC. It can be downloaded from
http://www.mpfr.org/. If an MPFR source distribution is found in a subdirectory of your GCC sources named
mpfr, it will be built together with GCC. Alternatively, if MPFR is already installed but it is not in your default library search path, the
--with-mpfr configure option should be used. See also
--with-mpfr-lib and
--with-mpfr-include.
MPC Library version 0.8.1 (or later)
Necessary to build GCC. It can be downloaded from
http://www.multiprecision.org/. If an MPC source distribution is found in a subdirectory of your GCC sources named
mpc, it will be built together with GCC. Alternatively, if MPC is already installed but it is not in your default library search path, the
--with-mpc configure option should be used. See also
--with-mpc-lib and
--with-mpc-include. 按图索骥,终于找到解决方法如下:
1.到http://www.mpfr.org/下一下2.4.2版本以上的MPFR.然后放到要编译的GCC目录下,注意目录名必须为mpfr
2.到http://www.multiprecision.org/下一下0.8.1版本以上的MPC.然后放到要编译的GCC目录下,注意目录名必须为mpc
重新编译.OK~~~
love 钓鱼竿
love 钓鱼竿