I am trying to build the latest (at the time of this writing) version of GCC on CentOS. I downloaded and built GMP, MPFR and MPC. These libraries are located in the / usr / local directory (for example, usr / local / lib for libraries and / usr / local / include for include). Now I am trying to configure GCC to build with the following command:
./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local
And I get the following error message:
checking for the correct version of gmp.h... yes checking for the correct version of mpfr.h... yes checking for the correct version of mpc.h... yes checking for the correct version of the gmp/mpfr/mpc libraries... no configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
What is the reason? Libraries are being built, the correct location, header files are recognized, but the libraries themselves are not. I also tried this:
./configure --with-gmp-lib=/usr/local/lib \ --with-mpfr-lib=/usr/local/lib --with-mpc-lib=/usr/local/lib
But the result is the same.
source share