From c7300cd50a48e1c9e7b75929fe8415a3d5f4784a Mon Sep 17 00:00:00 2001 From: Alexander Grund Date: Tue, 26 Aug 2025 15:23:10 +0200 Subject: [PATCH] Fix sanity check step of LLVM When the system ld is used the sanity check step fails > g++ minimal.cpp -o minimal_cpp $(llvm-config --link-static --system-libs all) failed with exit code 1 (output: /usr/bin/ld.gold: /tmp/boegelbot/ecpr-23603/software/GCCcore/10.3.0/lib64/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /usr/bin/ld.gold) Ensure binutils gets loaded similar to the GCC sanity check step Fixes #3891 --- easybuild/easyblocks/l/llvm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/easybuild/easyblocks/l/llvm.py b/easybuild/easyblocks/l/llvm.py index 7242192a3f2..35d2fecf358 100644 --- a/easybuild/easyblocks/l/llvm.py +++ b/easybuild/easyblocks/l/llvm.py @@ -1714,6 +1714,9 @@ def sanity_check_step(self, custom_paths=None, custom_commands=None, *args, **kw # Here, we add the system libraries LLVM expects to find minimal_cpp_compiler_cmd += "$(llvm-config --link-static --system-libs all)" custom_commands.append(minimal_cpp_compiler_cmd) + # binutils is required for the linking step + kwargs.setdefault('extra_modules', []).extend( + d['short_mod_name'] for d in self.cfg.dependencies() if d['name'] == 'binutils') return super().sanity_check_step(custom_paths=custom_paths, custom_commands=custom_commands, *args, **kwargs) @@ -1734,7 +1737,6 @@ def make_module_step(self, *args, **kwargs): self.log.debug(f"List of subdirectories for libraries to add to $LD_LIBRARY_PATH + $LIBRARY_PATH: {lib_dirs}") self.module_load_environment.LD_LIBRARY_PATH = lib_dirs self.module_load_environment.LIBRARY_PATH = lib_dirs - return super().make_module_step(*args, **kwargs) def make_module_extra(self):