Open matthewabrown opened 2 weeks ago
For what it's worth, if use the short version
clangversion = '16'
in the easyconfig, the installation succeeds with no errors. But not using the dotted decimal seems contrary to all other comments and logic around clangversion
.
Looking at my local (non-EasyBuild) LLVM/Clang installations, the same thing can be seen:
$ ls */lib/clang
12.0.1/lib/clang:
12.0.1
13.0.1/lib/clang:
13.0.1
14.0.6/lib/clang:
14.0.6
15.0.7/lib/clang:
15.0.7
16.0.6/lib/clang:
16
17.0.6/lib/clang:
17
18.1.8/lib/clang:
18
19.1.0-rc3/lib/clang:
19
WIth LLVM 16, they switched to just using the major version as the folder name. AOCC basically just copied the LLVM/Clang behavior.
We could probably add some handling for this, like done in the clang.py
EasyBlock:
diff --git a/easybuild/easyblocks/a/aocc.py b/easybuild/easyblocks/a/aocc.py
index ff33673af..71156fa4a 100644
--- a/easybuild/easyblocks/a/aocc.py
+++ b/easybuild/easyblocks/a/aocc.py
@@ -138,6 +138,12 @@ class EB_AOCC(PackedBinary):
def sanity_check_step(self):
"""Custom sanity check for AOCC, based on sanity check for Clang."""
+
+ # Clang v16+ only use the major version number for the resource dir
+ resdir_version = self.clangversion
+ if self.clangversion >= '16':
+ resdir_version = LooseVersion(self.clangversion).version[0]
+
shlib_ext = get_shared_lib_ext()
custom_paths = {
'files': [
@@ -147,7 +153,7 @@ class EB_AOCC(PackedBinary):
'lib/clang/%s/include/stddef.h' % self.clangversion, 'lib/libclang.%s' % shlib_ext,
'lib/libomp.%s' % shlib_ext,
],
- 'dirs': ['include/llvm', 'lib/clang/%s/lib' % self.clangversion, 'lib32'],
+ 'dirs': ['include/llvm', 'lib/clang/%s/lib' % resdir_version, 'lib32'],
}
custom_commands = [
At the same time, I would suggest updating the version list in _aocc_guess_clang_version
.
https://github.com/easybuilders/easybuild-easyblocks/blob/cc5b95dab1aabae2a64360c492a4f068f8eab267/easybuild/easyblocks/a/aocc.py#L150
I'm creating a new easyconfig AOCC-4.2.0-GCCcore-13.2.0.eb. I use the latest 4.0.0 easyconfig but
The user supplied dotted decimal (16.0.3) is reused during sanity check but the AOCC installer uses major version (16) only.
Installation failed during sanity checking:
In the build and install directories, I can confirm that I have the header files such as this one
Perhaps this is different behavior from previous versions of AOCC. The easiest fix might be to add some logic to the sanity check in the easyblock to provide version strings that match the expected format.