I am getting error while building gcc-4.8.5 on ubuntu 24.04
I had followed the below steps as mentioned in the page How to Install compiler g++-4.8.5 in ubuntu 20.04
sudo dpkg --add-architecture i386
sudo dpkg --add-architecture i386
sudo apt upgrade
sudo apt-get install gcc-multilib libstdc++6:i386
wget https://ftp.gnu.org/gnu/gcc/gcc-4.8.5/gcc-4.8.5.tar.bz2 --no-check-certificate
tar xf gcc-4.8.5.tar.bz2
sed -i -e 's/__attribute__///__attribute__/g' gcc-4.8.5/gcc/cp/cfns.h
sed -i 's/struct ucontext/ucontext_t/g' gcc-4.8.5/libgcc/config/i386/linux-unwind.h
mkdir xgcc-4.8.5
pushd xgcc-4.8.5
$PWD/../gcc-4.8.5/configure --enable-languages=c,c++ --prefix=/usr --enable-shared --enable-plugin -- program-suffix=-4.8.5
make MAKEINFO="makeinfo --force"
sudo make install
But, I got the make error as below:
gcc/reload1.c:89:24: error: use of an operand of type ‘bool’ in ‘operator++’ is forbidden in C++17 89 | (this_target_reload->x_spill_indirect_levels) | ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ../../gcc/reload1.c:443:7: note: in expansion of macro ‘spill_indirect_levels’ 443 | spill_indirect_levels++;
If some one has resolved the above errors , please suggest for solution
New contributor
Prabhu634 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1