0

I have a Ubuntu22 version running on an arm architecture (Mac M2) and need to install an earlier version of the gcc compiler (Version 8).

I am sorry if this sounds stupid but I have so far only found cross-compiler gcc8 packages which (I assume) are meant to run on intel and compile for arm. Is there a way to install gcc8 for arm specifically?

I know the packages are no longer in any ubuntu22 repository but can be found for ubuntu20. But I seem to be to stupid to transfer this answer to my arm architecture.

J0sh
  • 11

1 Answers1

1

Here's the equivalent URLs for gcc-8 packages, but for arm64, from the ports server.

sudo apt update
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/gcc-8_8.4.0-3ubuntu2_arm64.deb
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/gcc-8-base_8.4.0-3ubuntu2_arm64.deb
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/libgcc-8-dev_8.4.0-3ubuntu2_arm64.deb
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/cpp-8_8.4.0-3ubuntu2_arm64.deb
# libmpx2 omitted as it's not available for arm64
wget http://ports.ubuntu.com/ubuntu-ports/pool/main/i/isl/libisl22_0.22.1-1_arm64.deb
sudo apt install ./gcc-8_8.4.0-3ubuntu2_arm64.deb ./gcc-8-base_8.4.0-3ubuntu2_arm64.deb ./libgcc-8-dev_8.4.0-3ubuntu2_arm64.deb ./cpp-8_8.4.0-3ubuntu2_arm64.deb ./libisl22_0.22.1-1_arm64.deb
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/libstdc++-8-dev_8.4.0-3ubuntu2_arm64.deb
wget http://ports.ubuntu.com/ubuntu-ports/pool/universe/g/gcc-8/g++-8_8.4.0-3ubuntu2_arm64.deb
sudo apt install ./libstdc++-8-dev_8.4.0-3ubuntu2_arm64.deb ./g++-8_8.4.0-3ubuntu2_arm64.deb
popey
  • 23,667