configure for gcc 6.4.0 build on Fedora 27

U.Mutlu um@mutluit.com
Thu Jun 14 07:59:00 GMT 2018


And after the make, do this:

Make this new compiler the default for this user
by appending these lines to this user's ~/.bashrc :
   export PATH=/usr/local/gcc-latest/bin:$PATH
   export LD_LIBRARY_PATH=/usr/local/gcc-latest/lib64:$LD_LIBRARY_PATH

Then start a fresh bash shell (or logout from bash and re-login),
so that the above settings will take effect.
You can verify with "echo $PATH" --> the new ccompiler's dir
should come as first.
...and try the new compilers "g++-latest", "gcc-latest",
or whatever names you chose for them.


U.Mutlu wrote on 06/14/2018 09:51 AM:
> Hi,
> FYI: this is my configure command:
>
> ../gcc_trunk/configure -v \
> --build=x86_64-linux-gnu \
> --host=x86_64-linux-gnu \
> --target=x86_64-linux-gnu \
> --disable-multilib \
> --enable-checking=release \
> --enable-languages=c,c++ \
> --enable-lto \
> --prefix=/usr/local/gcc-latest \
> --program-suffix=-latest
>
> This way the compilers will be named "gcc-latest" and "g++-latest"
> You can change this to your 6.4.0 version.
>
>
>
> U.Mutlu wrote on 06/14/2018 09:41 AM:
>> stimits@comcast.net wrote on 06/14/2018 08:53 AM:
>>> 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/".
>>>
>>> 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
>>>
>>> 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?
>>>
>>> Thanks!
>>>
>>
>> Just leave the downloaded directories in the repository directory.
>> Then, from a new directory outside the repository start the configure...
>> Ie. something like ../my_repo/configure ...
>
>
>



More information about the Gcc-help mailing list