On 6 June 2015 at 10:12, Ritchie Cai wrote: > Hi, > I'm trying to install GCC 4.8.4 on my Redhat 6 workstation. I have > already installed gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel > packages through yum. When I tried to configure it, I get the following > error: > > ... > checking for the correct version of gmp.h... yes > checking for the correct version of mpfr.h... no > 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. > > > I have checked, the mpfr.h is there in /usr/include, since mpfr-devel is > already installed. When I look into config.log I found these errors: > > configure:5462: checking for the correct version of gmp.h > configure:5482: gcc -c -g -O2 conftest.c >&5 > configure:5482: $? = 0 > configure:5500: gcc -c -g -O2 conftest.c >&5 > configure:5500: $? = 0 > configure:5501: result: yes > configure:5517: checking for the correct version of mpfr.h > configure:5535: gcc -c -g -O2 conftest.c >&5 > In file included from conftest.c:11: > /usr/include/mpfr.h:125: error: expected '=', ',', ';', 'asm' or > '__attribute__' before '__mpfr_struct' That line is: typedef __gmp_const __mpfr_struct *mpfr_srcptr; All the other errors are also caused by the __gmp_const token, which should be defined by /usr/include/gmp.h What type of hardware do you have? How did you configure GCC? What is the output of this command? gcc -x c - -E -dD <<< '#include <gmp.h>' | grep -C 5 gmp_const