josh
josh

Reputation: 1554

configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+

I am attempting to build GCC-4.7.0 on a MacBook Pro running OS X 10.7.4. However, I am continuing to experience the same error:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.

This error occurred after running the following line:

./configure --prefix=/Users/jreese/Documents/school/edinburgh/project/local/

To get rid of this error I have tried the following actions:

Then I read somewhere that there could be a problem if I didn't explicitly set the configuration to run in 64-bit mode. So, I tried all of these configurations again with the added setting of 'CC=gcc -m64'. But this didn't change anything. If anyone has any ideas I would be greatly appreciative.

Upvotes: 2

Views: 5931

Answers (3)

eagle_bear
eagle_bear

Reputation: 47

I've faced the same issue and it was easily solved by installing the corresponding development packages: gmp-devel, mpfr-devel and libmpc-devel

  • Yigal

Upvotes: 3

Kenneth Hoste
Kenneth Hoste

Reputation: 2971

EasyBuild (a tool to make building software easier) can be of help here. It comes with a small easyconfig file that specifies which GCC version to build, and which features to enable (see for example https://github.com/hpcugent/easybuild/blob/master/easybuild/easyconfigs/g/GCC/GCC-4.7.0.eb).

Once you've downloaded EasyBuild and configured it, you can just run

$EBHOME/easybuild.sh myGCC.eb

with EBHOME set to the location where you unpacked EasyBuild, and myGCC.eb a copy of the example GCC easyconfig, which you modified to your needs.

This command will download the GCC source tarball for you and build/install it, after doing the same to any dependencies, for example GMP, MPFR and MPC, saving you a lot of headaches.

For more information on EasyBuild, see https://github.com/hpcugent/easybuild/wiki .

Upvotes: 0

rubenvb
rubenvb

Reputation: 76785

If you don't know how to build and properly direct GCC's configure to the libraries you can put them in the source tree of GCC itself:

/some/dir/source/gcc/[libstdc++|libgomp|gcc|libiberty|....] /some/dir/source/gcc/gmp/[configure|...] /some/dir/source/gcc/mpfr/[configure|...] /some/dir/source/gcc/mpc/[configure|...]

So without the version number appended. Then just run GCC configure without any arguments related to GMP/MPC/MPFR.

Upvotes: 5

Related Questions