Welcome to LQ.
Just a thought: The book says gcc-4.7 or later, not sure it means a gcc with 192 changes.
I.e. the Debian compiler gcc-5 used by Ubuntu 16.04 got 192 patches added at gcc build time.
My test build, using an original gcc → gcc54, g++54 (Not LFS configure options):
Code:
cd gcc-7.3.0/
tar xvf mpfr-4.0.0.tar.xz && mv mpfr-4.0.0/ mpfr
tar xvf gmp-6.1.2.tar.xz && mv gmp-6.1.2/ gmp
tar xvf mpc-1.1.0.tar.gz && mv mpc-1.1.0/ mpc
cd ../ && mkdir build-gcc730 && cd build-gcc730/
export CC=gcc54 CXX=g++54 && ../gcc-7.3.0/configure --prefix=/usr/local/gcc7 --program-suffix=7 --enable-languages=c,c++ --disable-multilib --disable-libstdcxx-pch
make && sudo make install
... No errors.
Links to "gcc54-c++_5.4.0-ubuntu16"
.
https://stackoverflow.com/questions/...32797#50232797
.
https://drive.google.com/drive/folde...Jm?usp=sharing
-