Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions easybuild/tools/toolchain/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,11 @@ def prepare_rpath_wrappers(self, rpath_filter_dirs=None, rpath_include_dirs=None

# always include filter for 'stubs' library directory,
# cfr. https://github.com/easybuilders/easybuild-framework/issues/2683
lib_stubs_pattern = '.*/lib(64)?/stubs/?'
if lib_stubs_pattern not in rpath_filter_dirs:
rpath_filter_dirs.append(lib_stubs_pattern)
# (since CUDA 11.something the stubs are in $EBROOTCUDA/stubs/lib64)
lib_stubs_patterns = ['.*/lib(64)?/stubs/?', '.*/stubs/lib(64)?/?']
for lib_stubs_pattern in lib_stubs_patterns:
if lib_stubs_pattern not in rpath_filter_dirs:
rpath_filter_dirs.append(lib_stubs_pattern)

# directory where all wrappers will be placed
wrappers_dir = os.path.join(tempfile.mkdtemp(), RPATH_WRAPPERS_SUBDIR)
Expand Down
8 changes: 8 additions & 0 deletions test/framework/toolchain.py
Original file line number Diff line number Diff line change
Expand Up @@ -2437,12 +2437,16 @@ def test_toolchain_prepare_rpath(self):
# check whether 'stubs' library directory are correctly filtered out
paths = [
'prefix/software/CUDA/1.2.3/lib/stubs/', # should be filtered (no -rpath)
'prefix/software/CUDA/1.2.3/stubs/lib/', # should be filtered (no -rpath)
'tmp/foo/',
'prefix/software/stubs/1.2.3/lib', # should NOT be filtered
'prefix/software/CUDA/1.2.3/lib/stubs', # should be filtered (no -rpath)
'prefix/software/CUDA/1.2.3/stubs/lib', # should be filtered (no -rpath)
'prefix/software/CUDA/1.2.3/lib64/stubs/', # should be filtered (no -rpath)
'prefix/software/CUDA/1.2.3/stubs/lib64/', # should be filtered (no -rpath)
'prefix/software/foobar/4.5/notreallystubs', # should NOT be filtered
'prefix/software/CUDA/1.2.3/lib64/stubs', # should be filtered (no -rpath)
'prefix/software/CUDA/1.2.3/stubs/lib64', # should be filtered (no -rpath)
'prefix/software/zlib/1.2.11/lib',
'prefix/software/bleh/0/lib/stubs', # should be filtered (no -rpath)
'prefix/software/foobar/4.5/stubsbutnotreally', # should NOT be filtered
Expand All @@ -2465,12 +2469,16 @@ def test_toolchain_prepare_rpath(self):
'-Wl,-rpath=%s/prefix/software/foobar/4.5/stubsbutnotreally' % self.test_prefix,
'%(user)s.c',
'-L%s/prefix/software/CUDA/1.2.3/lib/stubs/' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/stubs/lib/' % self.test_prefix,
'-L%s/tmp/foo/' % self.test_prefix,
'-L%s/prefix/software/stubs/1.2.3/lib' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/lib/stubs' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/stubs/lib' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/lib64/stubs/' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/stubs/lib64/' % self.test_prefix,
'-L%s/prefix/software/foobar/4.5/notreallystubs' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/lib64/stubs' % self.test_prefix,
'-L%s/prefix/software/CUDA/1.2.3/stubs/lib64' % self.test_prefix,
'-L%s/prefix/software/zlib/1.2.11/lib' % self.test_prefix,
'-L%s/prefix/software/bleh/0/lib/stubs' % self.test_prefix,
'-L%s/prefix/software/foobar/4.5/stubsbutnotreally' % self.test_prefix,
Expand Down