It looks like gcc-5 was recently removed from Debian's unstable repository. I need gcc-5 to compile an older Linux kernel (3.19) and so I am looking to build it from source, through this is causing me a great deal of trouble. I have been following the instructions found here, but I find myself wondering what settings I need to set and more. Thus far, I have done the following.
- Downloaded and unpacked the source code.
- Configured gcc-5 by doing the following:
% mkdir objdir
% cd objdir
% ../gcc-5.4.0/configure (I included neither options nor target flags)
- Attempted to build using the following in my
objdir
directory:
% make BOOT_CFLAGS='-O' bootstrap
However, bootstrapping raised errors that prevented me from moving onto the install. After running for about 5 minutes, I encounter the following errors:
In file included from ../../../../gcc-5.4.0/libgcc/unwind-dw2.c:401:0:
./md-unwind-support.h: In function 'x86_fallback_frame_state':
./md-unwind-support.h:141:18: error: field 'uc' has incomplete type
struct ucontext uc;
^
make[5]: *** [../../../../gcc-5.4.0/libgcc/shared-object.mk:14: unwind-dw2.o] Error 1
make[5]: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/32/libgcc'
make[4]: *** [Makefile:1154: multi-do] Error 1
make[4]: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc'
make[3]: *** [Makefile:119: multi-do] Error 2
make[3]: Leaving directory '/home/me/objdir/x86_64-unknown-linux-gnu/libgcc'
make[2]: *** [Makefile:16510: all-stage1-target-libgcc] Error 2
make[2]: Leaving directory '/home/me/objdir'
make[1]: *** [Makefile:22461: stage1-bubble] Error 2
make[1]: Leaving directory '/home/me/objdir'
make: *** [Makefile:22798: bootstrap] Error 2
I am running Debian 10 (Buster) and have the necessary prerequisites installed as listed here.
Any help or guidance either in fixing the errors I have during bootstrapping or with building from source in general would be much appreciated! Thank you.
gcc48-c++_4.8.4-2ubuntu14_amd64.deb
... Also usable with Debian : No dependencies (except libc6 >= 2.14) Provides/usr/local/bin/{gcc48, g++48}
... Link to extra "Debian compilers" https://drive.google.com/drive/folders/1xVEATaYAwqvseBzYxKDzJoZ4-Hc_XOJm?usp=sharing ... ( gcc-5.4.0 is also available.) – Knud Larsen Feb 09 '20 at 23:03