Problems building gcc

Jonathan Wakely jwakely.gcc@gmail.com
Wed Jul 27 08:22:00 GMT 2016


On 27 July 2016 at 08:47, Douglas Houston <dhouston@staffmail.ed.ac.uk> wrote:
> Hi all,
>
> I'm having some trouble installing the latest gcc (which I need to build
> another program called Gromacs).
>
> I am on Scientific Linux release 6.8 (Carbon) (kernel
> 2.6.32-573.3.1.el6.x86_64), trying to install gcc-5.4.0.
>
> After installing the latest gmp, mpfr and mpc, I create a separate objdir
> build/install directory as recommended. In there, as root, I run:
>
>
> ../gcc-5.4.0/configure
>
>
> Which fails with:
>
>
> /usr/bin/ld: crt1.o: No such file: No such file or directory
> collect2: ld returned 1 exit status
> configure: error: I suspect your system does not have 32-bit developement
> librar
> ies (libc and headers). If you have them, rerun configure with
> --enable-multilib
> . If you do not have them, and want to build a 64-bit-only compiler, rerun
> confi
> gure with --disable-multilib.

https://gcc.gnu.org/wiki/FAQ#gnu_stubs-32.h


> So as directed by the output, I try:
>
>
> ../gcc-5.4.0/configure  --disable-multilib
>
>
> Now it fails with:
>
>
> checking for x86_64-unknown-linux-gnu-gcc...
> /root/gcc-5.4.0-install/./gcc/xgcc
> -B/root/gcc-5.4.0-install/./gcc/ -B/usr/local/x86_64-unknown-linux-gnu/bin/
> -B/u
> sr/local/x86_64-unknown-linux-gnu/lib/ -isystem
> /usr/local/x86_64-unknown-linux-
> gnu/include -isystem /usr/local/x86_64-unknown-linux-gnu/sys-include
> checking for suffix of object files... configure: error: in
> `/root/gcc-5.4.0-ins
> tall/x86_64-unknown-linux-gnu/libgcc':
> configure: error: cannot compute suffix of object files: cannot compile
> See `config.log' for more details.

https://gcc.gnu.org/wiki/FAQ#configure_suffix

> Can anyone suggest what the fix might be? I've looked in config.log as the
> output suggests but can't find any reference to
> x86_64-unknown-linux-gnu-gcc.

As it says at https://gcc.gnu.org/wiki/FAQ#configure_suffix, you're
probably looking at the wrong config.log file.

https://gcc.gnu.org/wiki/InstallingGCC might be useful. You've
probably installed gmp, mpfr and mpc awkwardly.



More information about the Gcc-help mailing list