Fix LLVM easyblock for no-runtime builds (like Clang 20.1.8)#4083
Fix LLVM easyblock for no-runtime builds (like Clang 20.1.8)#4083Micket wants to merge 2 commits intoeasybuilders:developfrom
Conversation
|
Were you able to trigger this error somehow? Guarding the check for an empty |
|
Yes, it carshes hard at the end of my 3 hour clang build 😢 |
|
Yeah, disabling I'd keep your fix for sure, guarding these things is always a good idea I think. to also check if CC: @Crivella |
|
Test report by @Thyre Overview of tested easyconfigs (in order)
Build succeeded for 1 out of 1 (total: 1 secs) (1 easyconfigs in total) |
|
Wait, we don't need a more complicated check. If there are any files in Let me try to come up with a draft. |
|
I think this might be sufficient enough: diff --git a/easybuild/easyblocks/l/llvm.py b/easybuild/easyblocks/l/llvm.py
index d52cc8945..258b76e98 100644
--- a/easybuild/easyblocks/l/llvm.py
+++ b/easybuild/easyblocks/l/llvm.py
@@ -1613,9 +1613,6 @@ class EB_LLVM(CMakeMake):
def sanity_check_step(self, custom_paths=None, custom_commands=None, *args, **kwargs):
"""Perform sanity checks on the installed LLVM."""
- lib_dir_runtime = None
- if self.cfg['build_runtimes']:
- lib_dir_runtime = self.get_runtime_lib_path(self.installdir)
shlib_ext = '.' + get_shared_lib_ext()
if not hasattr(self, 'nvptx_target_cond'):
@@ -1808,6 +1805,10 @@ class EB_LLVM(CMakeMake):
custom_commands += ["python -c 'import clang'"]
custom_commands += ["python -c 'import mlir'"]
+ lib_dir_runtime = None
+ if self.cfg['build_runtimes'] or check_librt_files:
+ lib_dir_runtime = self.get_runtime_lib_path(self.installdir)
+
check_files.extend(os.path.join('bin', x) for x in check_bin_files)
check_files.extend(os.path.join('lib', x) for x in check_lib_files)
check_files.extend(os.path.join(lib_dir_runtime, x) for x in check_librt_files) |
|
But even then you need to protect if |
It's certainly better to miss a check than to hard crash. |
|
Feel free to submit test reports. I'll upload for Clang. |
|
Test report by @Micket Overview of tested easyconfigs (in order)
Build succeeded for 0 out of 1 (total: 2 hours 48 mins 25 secs) (1 easyconfigs in total) |
(created using
eb --new-pr)lib_runtime_diris assignedNonevalue, but this sanity check doesn't control for that. This crashes easybuild hard asos.path.join(None, 'xxx')errors withTypeError.I don't know the whole logic here, i just protect that use of this variable.