From 9d34326992fd467476380474d3101bc26eec16ed Mon Sep 17 00:00:00 2001 From: Denis Davydov Date: Wed, 15 May 2019 20:03:19 +0200 Subject: fix suite-sparse built with tbb from intel-parallel-studio (#11134) * fix suite-sparse built with tbb from intel-parallel-studio * intel: add tbb_headers, strip newline from cxx_lib * use property --- lib/spack/spack/build_systems/intel.py | 12 +++++++++++- var/spack/repos/builtin/packages/suite-sparse/package.py | 2 +- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/spack/spack/build_systems/intel.py b/lib/spack/spack/build_systems/intel.py index 36e0b966d1..73cdcd8eaf 100644 --- a/lib/spack/spack/build_systems/intel.py +++ b/lib/spack/spack/build_systems/intel.py @@ -695,6 +695,13 @@ class IntelPackage(PackageBase): debug_print(gcc_name) return Executable(gcc_name) + @property + def tbb_headers(self): + # Note: TBB is included as + # #include + return HeaderList([ + self.component_include_dir('tbb') + '/dummy.h']) + @property def tbb_libs(self): '''Supply LibraryList for linking TBB''' @@ -710,7 +717,7 @@ class IntelPackage(PackageBase): cxx_lib_path = gcc( '--print-file-name', 'libstdc++.%s' % dso_suffix, output=str) - libs = tbb_lib + LibraryList(cxx_lib_path) + libs = tbb_lib + LibraryList(cxx_lib_path.rstrip()) debug_print(libs) return libs @@ -941,6 +948,9 @@ class IntelPackage(PackageBase): ['mkl_cblas', 'mkl_lapacke'], root=self.component_include_dir('mkl'), recursive=False) + if '+tbb' in self.spec or self.provides('tbb'): + result += self.tbb_headers + debug_print(result) return result diff --git a/var/spack/repos/builtin/packages/suite-sparse/package.py b/var/spack/repos/builtin/packages/suite-sparse/package.py index fc53051825..1d375acdfa 100644 --- a/var/spack/repos/builtin/packages/suite-sparse/package.py +++ b/var/spack/repos/builtin/packages/suite-sparse/package.py @@ -111,7 +111,7 @@ class SuiteSparse(Package): if 'tbb' in spec: make_args += [ 'SPQR_CONFIG=-DHAVE_TBB', - 'TBB=-L%s -ltbb' % spec['tbb'].prefix.lib, + 'TBB=%s' % spec['tbb'].libs.ld_flags, ] if '@5.3:' in spec: -- cgit v1.2.3-60-g2f50