MinGW:构建 GCC 需要 GMP 4.2+、MPFR 2.4.0+ 和 MPC 0.8.0+
MinGW: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+
我正在尝试使用 MinGW 软件在 PC 运行 Windows 10 上构建 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 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:/盘
我在环境变量里添加了路径
D:\MinGW\bin
我已经从 MinGW 安装管理器安装了 libgmp 5.1.2、libmpfr 3.1.2 和 libmpc 1.0.2
我按照 http://gnutoolchains.com/building/ 的指南在 Windows
上构建了我自己的 GNU 工具链
错误消息不言自明:您需要通过 --with-*
选项提供所需库的路径,例如 --with-gmp=/d/path/to/gmp
.
下载更多库包构建并将它们安装到新文件夹中,例如 /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/
我正在尝试使用 MinGW 软件在 PC 运行 Windows 10 上构建 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 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:/盘
我在环境变量里添加了路径
D:\MinGW\bin
我已经从 MinGW 安装管理器安装了 libgmp 5.1.2、libmpfr 3.1.2 和 libmpc 1.0.2
我按照 http://gnutoolchains.com/building/ 的指南在 Windows
上构建了我自己的 GNU 工具链错误消息不言自明:您需要通过 --with-*
选项提供所需库的路径,例如 --with-gmp=/d/path/to/gmp
.
下载更多库包构建并将它们安装到新文件夹中,例如 /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/