Difficulty building gcc 8

Hi all,

My Manjaro currently has cuda 11.7.1-1 and I’d like to downgrade it to 10.2. In my pacman cache folder I have only 11.7 and 11.6.

I found cuda-10.2 in AUR and tried to build it using yay -S cuda-10.2, however, it aborted when trying to build the dependency gcc8, giving the following errors:

checking whether the target has CRLF as line terminator... no
configure: updating cache ./config.cache
configure: creating ./config.status
config.status: creating Makefile
config.status: creating libgfortran.spec
config.status: creating config.h
config.status: executing default-1 commands
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing gstdint.h commands
make[1]: Leaving directory '/home/guangzhi/.cache/yay/gcc8/src/gcc-build'
make: *** [Makefile:948: all] Error 2
==> ERROR: A failure occurred in build().
 -> error making: gcc8 (gcc8-libs gcc8)

Not sure it is the correct way of fixing it, but I then tried to set up a clean chroot, inside which I tried to build gcc8 again. The steps I followed:

  1. mkdir ~/chroot
  2. CHROOT=$HOME/chroot
  3. mkarchroot $CHROOT/root base-devel
  4. arch-nspawn $CHROOT/root pacman -Syu
  5. download the gcc8 PKGBUILD using yay --getpkgbuild gcc8, then cd into the folder containing the PKGBUILD file.
  6. makechrootpgk -c -r $CHROOT

This failed at the same error messages.

Could anyone give some hint what’s going wrong? Do I have to get gcc8 in order to downgrade to an older cuda?

You’re on a rolling release distro. For the most part, you have to live with it.

What do you want to do with CUDA? The NGC docker images are still available with 10.2.

1 Like

I managed to get a working gcc8 by using conda install -c conda-forge gxx=8.

What’s exactly causing the failure to build a gcc8?