[Bug other/116119] Error building gcc 8.3.0
redi at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Mon Jul 29 16:58:30 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116119
--- Comment #12 from Jonathan Wakely <redi at gcc dot gnu.org> ---
I can build fine using these steps:
export TARGET=arm-linux-gnueabihf
export PREFIX=/tmp/rpi-toolchain
wget https://ftp.gnu.org/gnu/binutils/binutils-2.31.tar.gz
tar xf binutils-2.31.tar.gz
cd bobj
../binutils-2.31/configure --target=${TARGET} --prefix=${PREFIX}
--with-arch=armv8-a --with-fpu=vfp --with-float=hard --disable-multilib
make -j10 && make install
cd ../
~/src/gcc/gcc-8/configure --prefix=${PREFIX} --target=${TARGET}
--enable-languages=c,c++ --disable-multilib --enable-multiarch
--with-arch=armv8-a --with-fpu=vfp --with-float=hard
make all-gcc -j10
Where ~/src/gcc/gcc-8 contains the gcc-8.5.0 sources and gmp, mpfr and mpc
sources.
I don't have a sysroot, so I can't build libgcc and the rest of the compiler,
but I don't get an error from configure-gmp like in comment 7. My build gets
past that without problems. So you must be doing something differently.
Start again. Remove the entire working directory that you're building in, as
it's clearly messed up (see comment 11, with the error taken from the logs in
comment 6).
Build and install binutils first.
Use contrib/download_prerequisites after un-tarring the gcc sources.
Build and install gcc.
Don't reconfigure in the same directory where you've already got a failed build
using a different configuration. Don't mess with LD_LIBRARY_PATH.
Use gcc-8.5.0 not 8.3.0 because it has various bugs fixed (probably nothing
relevant to your problem, it's just a better release).
The instructions you're following seem broken:
cd ~/rpi0/toolchain/sources/gcc-8.3.0
contrib/download_prerequisites
mkdir -p ../../build/gcc2
pushd build/gcc2
^^^^^^^^^^ that's not the directory that was just created, should be
../../
../../src/gcc-8.3.0/configure
^^^ that's not where the sources are, should be sources not src
More information about the Gcc-bugs
mailing list