Reputation:
I am attempting to build GCC-5.3.0 on a PC running Windows 10 with MinGW software. I got this error
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.
My input was
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
Note: /d/ path as my D:/ drive
I have added the path in environment variables
D:\MinGW\bin
I already installed libgmp 5.1.2, libmpfr 3.1.2, and libmpc 1.0.2 from MinGW installation manager
I followed the guide from http://gnutoolchains.com/building/ to build my own GNU toolchains on Windows
Upvotes: 2
Views: 3658
Reputation: 36
Download more library package build and install them into a new folder for example /c/gnu/install
gmp-6.1.2.tar.bz2
mpfr-3.1.5.tar.bz2
mpc-1.0.2.tar.gz
1> Build gmp
cd gmp-6.1.2
configure --prefix=/c/gnu/install/
make -j4 install
2> Build mpfr
cd mpfr-3.1.5
configure --prefix=/c/gnu/install/ --with-gmp=/c/gnu/install/ --enable-static --disable-shared
make -j4 install
3> Build 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
Then you configure building gcc with options :
--with-gmp=/c/gnu/install/ --with-mpfr=/c/gnu/install/ --with-mpc=/c/gnu/install/
Upvotes: 2
Reputation: 28454
The error message is self-explanatory: you need to provide paths to required libraries via --with-*
option, like --with-gmp=/d/path/to/gmp
.
Upvotes: 1