summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/cuda/package.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/cuda/package.py b/var/spack/repos/builtin/packages/cuda/package.py
index 2da40d75d5..4e9cf41e7f 100644
--- a/var/spack/repos/builtin/packages/cuda/package.py
+++ b/var/spack/repos/builtin/packages/cuda/package.py
@@ -134,6 +134,15 @@ class Cuda(Package):
# https://gist.github.com/ax3l/9489132
# for details.
+ # CUDA 10.1 on ppc64le fails to copy some files, the workaround is adapted from
+ # https://forums.developer.nvidia.com/t/cuda-10-1-243-10-1-update-2-ppc64le-run-file-installation-issue/82433
+ # See also #21170
+ if spec.satisfies('@10.1.243') and platform.machine() == 'ppc64le':
+ includedir = "targets/ppc64le-linux/include"
+ os.makedirs(os.path.join(prefix, includedir))
+ os.makedirs(os.path.join(prefix, "src"))
+ os.symlink(includedir, os.path.join(prefix, "include"))
+
# CUDA 10.1+ has different cmdline options for the installer
arguments = [
runfile, # the install script