Windows MinGW:建筑GCC需要GMP 4.2+;,MPFR 2.4.0+;mpc0.8.0+;
我正在尝试在运行Windows10和MinGW软件的PC上构建GCC-5.3.0。 我犯了这个错误Windows MinGW:建筑GCC需要GMP 4.2+;,MPFR 2.4.0+;mpc0.8.0+;,windows,gcc,mingw,gnu,msys,Windows,Gcc,Mingw,Gnu,Msys,我正在尝试在运行Windows10和MinGW软件的PC上构建GCC-5.3.0。 我犯了这个错误 configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations. Source code for these libraries ca
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC
0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries 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, MPFR and/or MPC 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.
我的意见是
username@computername /d/gnu/gcc-5.3.0-build
$ ../gcc-5.3.0/configure --target arm-eabi --enable-win32-registry=My
ToolchainName --prefix /f/gnu/out/ --enable-languages=c,c++ --disable
-nls --disable-shared --with-newlib --with-headers=../newlib-2.4.0/ne
wlib/libc/include
注意:/d/路径作为我的d:/drive
我在环境变量中添加了路径
D:\MinGW\bin
我已经从MinGW安装管理器安装了libgmp 5.1.2、libmpfr 3.1.2和libmpc 1.0.2
我遵循的指南是在Windows上构建自己的GNU工具链。错误消息是不言自明的:您需要通过
--with-*
选项提供到所需库的路径,类似于--with gmp=/d/path/to/gmp
下载更多库包build并将其安装到一个新文件夹中,例如/c/gnu/install
gmp-6.1.2.tar.bz2
mpfr-3.1.5.tar.bz2
mpc-1.0.2.tar.gz
1> 建立gmp
cd gmp-6.1.2
configure --prefix=/c/gnu/install/
make -j4 install
2> 构建mpfr
cd mpfr-3.1.5
configure --prefix=/c/gnu/install/ --with-gmp=/c/gnu/install/ --enable-static --disable-shared
make -j4 install
3> 构建mpc
cd mpc-1.0.2
configure --prefix=/c/gnu/install/ --with-gmp=/c/gnu/install/ --with-mpfr=/c/gnu/install/ --enable-static --disable-shared
make -j4 install
然后使用以下选项配置构建gcc:
--with-gmp=/c/gnu/install/ --with-mpfr=/c/gnu/install/ --with-mpc=/c/gnu/install/
错误消息是不言自明的:您需要通过
--使用-*
选项提供到所需库的路径,如--使用gmp=/d/path/to/gmp
。谢谢。我已经发现我没有gmp.h文件,所以我必须建立自己的gmp,并修改我的评论来回答。