configure for gcc 6.4.0 build on Fedora 27

Jonathan Wakely jwakely.gcc@gmail.com
Thu Jun 14 09:22:00 GMT 2018


On Thu, 14 Jun 2018 at 07:53, <stimits@comcast.net> wrote:
>
> Hi,
>
> I downloaded the subversion tag for gcc 6.4.0. Within this I used the "contrib/download_prerequisites" script, and thus there now exists subdirectories to the gcc source of:
>  mpfr-2.4.2
> gmp-4.3.2
> mpc-0.8.1
> isl-0.15
>
> I also built and installed these in "/usr/local/mpfr-2.4.2/", "/usr/local/gmp-4.3.2/", "/usr/local/mpc-0.8.1/", and "/usr/local/isl-0.15/".

Why did you do that? The point of putting the sources inside the gcc
source tree is that you don't need to do that, it happens
automatically.


> If I use "./configure" for gcc in any way it fails claiming incorrect versions shortly after declaring they are correct. For example, directly from the download_prerequisites content:
> ./configure --prefix=/usr/local/gcc_6-4-0 --with-mpfr=/usr/local/src/gcc-x86_64/gcc_6_4_0/mpfr-2.4.2/ --with-gmp=/usr/local/src/gcc-x86_64/gcc_6_4_0/gmp-4.3.2 --with-mpc=/usr/local/src/gcc-x86_64/gcc_6_4_0/mpc-0.8.1 --with-isl=/usr/local/src/gcc-x86_64/gcc_6_4_0/isl-0.15

No no no.

You should read https://gcc.gnu.org/wiki/InstallingGCC

Stop running ./configure inside the source tree (use a separate build
directory).

You are giving the location of the source directories with --with-mpfr
etc. but that should be the location of the installed files, not the
sources.

But you should simply stop using --with-mpfr and --with-gmp etc.
because the sources are in the gcc source dir already (and you can
completely remove the directories "/usr/local/mpfr-2.4.2/",
"/usr/local/gmp-4.3.2/", "/usr/local/mpc-0.8.1/", and
"/usr/local/isl-0.15/" because you don't need them).


> It also fails if I configure for the "/usr/local/" installs:
> ./gcc_6_4_0/configure --prefix=/usr/local/gcc_6-4-0 --with-mpfr=/usr/local/mpfr-2.4.2/ --with-gmp=/usr/local/gmp-4.3.2 --with-mpc=/usr/local/mpc-0.8.1 --with-isl=/usr/local/isl-0.15
>
> In all cases the log shows the header files were correct, and that the libraries exist, but that for some reason (I suspect a bug) the versions are not accepted:
> checking for the correct version of gmp.h... yeschecking for the correct version of mpfr.h... yeschecking for the correct version of mpc.h... yeschecking for the correct version of the gmp/mpfr/mpc libraries... noconfigure: 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 specifytheir locations.  Source code for these libraries can be found at
> I have tried with the separate objdir as well as in the source tree. Is there a bug preventing the correct versions from being detected? Is there something missing in the documentation needed as a workaround when using the "download_prerequisites" script?

You're using it wrong.

You will have messed up the GCC source tree now, so start again from
the beginning. Remove /usr/local/src/gcc-x86_64/gcc_6_4_0 completely
and extract the GCC sources again, then run
contrib/download_prerequisites again, then **in a different
directory** run:

/usr/local/src/gcc-x86_64/gcc_6_4_0/configure --prefix=/usr/local/gcc_6-4-0
make -j4

Then as root run "make install" (you do not need to do the rest of the
build as root).



More information about the Gcc-help mailing list