Browse Source

Use Rocky Linux Vault to get GCC 10.2 installed

This should hopefully only be a temporary workaround until Rocky 8
picks up GCC 10.4 which fixes the NVCC bug
Daniel Hiltgen 1 year ago
parent
commit
b8c2be6142
1 changed files with 13 additions and 1 deletions
  1. 13 1
      scripts/rh_linux_deps.sh

+ 13 - 1
scripts/rh_linux_deps.sh

@@ -20,7 +20,19 @@ if grep -i "centos" /etc/system-release >/dev/null; then
     fi
     dnf install -y devtoolset-10-gcc devtoolset-10-gcc-c++
 elif grep -i "rocky" /etc/system-release >/dev/null; then
-    dnf install -y git gcc-toolset-10-gcc gcc-toolset-10-gcc-c++
+    # Temporary workaround until rocky 8 AppStream ships GCC 10.4 (10.3 is incompatible with NVCC)
+    cat << EOF > /etc/yum.repos.d/Rocky-Vault.repo
+[vault]
+name=Rocky Vault
+baseurl=https://dl.rockylinux.org/vault/rocky/8.5/AppStream/\$basearch/os/
+gpgcheck=1
+enabled=1
+countme=1
+gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-rockyofficial
+EOF
+    dnf install -y git \
+        gcc-toolset-10-gcc-10.2.1-8.2.el8 \
+        gcc-toolset-10-gcc-c++-10.2.1-8.2.el8
 else
     echo "ERROR Unexpected distro"
     exit 1