summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark W. Krentel <krentel@rice.edu>2021-06-08 17:06:16 -0500
committerGitHub <noreply@github.com>2021-06-08 17:06:16 -0500
commit968d393f6b8460eae730ac3775fc5099fa460b1d (patch)
treeca3e52a803665b63559c56a3a2edc13906e91dcc
parentac3b46fc95e526ecd17bfb18b105a8859346a2ee (diff)
downloadspack-968d393f6b8460eae730ac3775fc5099fa460b1d.tar.gz
spack-968d393f6b8460eae730ac3775fc5099fa460b1d.tar.bz2
spack-968d393f6b8460eae730ac3775fc5099fa460b1d.tar.xz
spack-968d393f6b8460eae730ac3775fc5099fa460b1d.zip
intel-tbb: explicitly set OS var and pass to TBB (#23852)
The common.inc script in TBB uses the environ var 'OS' to determine the platform it's on. On Linux, this is normally empty and TBB falls back to uname. But some systems set this to 'CentOS Linux 8' which is descriptive, but not exactly what common.inc is looking for. Instead, take the value from python and explicitly set OS to what TBB expects to avoid this problem.
-rw-r--r--var/spack/repos/builtin/packages/intel-tbb/package.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/intel-tbb/package.py b/var/spack/repos/builtin/packages/intel-tbb/package.py
index 8ef66abafa..aba173496c 100644
--- a/var/spack/repos/builtin/packages/intel-tbb/package.py
+++ b/var/spack/repos/builtin/packages/intel-tbb/package.py
@@ -135,6 +135,11 @@ class IntelTbb(Package):
name = '{0}'.format(version)
return url.format(name)
+ # We set OS here in case the user has it set to something else
+ # that TBB doesn't expect.
+ def setup_build_environment(self, env):
+ env.set('OS', platform.system())
+
def coerce_to_spack(self, tbb_build_subdir):
for compiler in ["icc", "gcc", "clang"]:
fs = glob.glob(join_path(tbb_build_subdir,