feat: build ROOT against external llvm - #288
Conversation
There was a problem hiding this comment.
Pull request overview
Enables building ROOT against an external LLVM (instead of ROOT's bundled copy) by adding ~builtin_llvm to the ROOT require list, and pulls in the corresponding spack-packages cherry-pick that introduces the builtin_llvm variant.
Changes:
- Add cherry-pick
8cd9959etospack-packages.shthat adds thebuiltin_llvmvariant to the ROOT package recipe. - Add
~builtin_llvmto the ROOT requirements inspack-environment/packages.yamlto use the external LLVM.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| spack-packages.sh | Adds new spack-packages cherry-pick hash and matching descriptive comment for the ROOT builtin_llvm variant. |
| spack-environment/packages.yaml | Adds ~builtin_llvm to ROOT's required variants, switching to external LLVM. |
901a1d3 to
ac164f0
Compare
52caa62 to
2b36d4d
Compare
97f979c to
4881ab5
Compare
4881ab5 to
e25b423
Compare
e25b423 to
7e5e143
Compare
|
This fails due to mixing of gcc libstdc++ and llvm libc++ symbols. |
Added installation of libllvm for Clang support.
7e5e143 to
173f75b
Compare
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
containers/debian/Dockerfile:313
- The comment above says both
gcc-arandgcc-ranlibshould be used for LTO-safe archives, but the yq mutation only setsGCC_AR. Ifranlibis invoked during archive creation/indexing, builds can still hit the same LTO plugin issue. SetGCC_RANLIBalongsideGCC_ARin the external GCC environment block.
"set": {
"GCC_AR": "gcc-ar"
}
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (1)
spack-packages.sh:53
- The new ROOT cherry-pick description line starts with
$$instead of the established##comment prefix. Because this line is inside theSPACKPACKAGES_CHERRYPICKS_FILESheredoc, it will be treated as data (not a comment) and can break downstream parsing that expects only## ...comment lines plus the optionalhash: filesmappings.
## 438abd1e09f0cea9cb0ccc7e0326adcd0408196b: herwig3: add CT14(?n)lo pdfsets as build-time resources
## 4dc856a13e9066ca3249a593d351af8cda521fa3: root: add v6.40.00, v6.40.02
$$ e41e172d579e30881556873fe32f8408f6647800: root: allow ~builtin_llvm with 6.40 and newer
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
containers/debian/Dockerfile:325
- The
yqedit for LLVM externals assumes.packages.llvm.externals[]exists; ifspack external find llvmdoesn’t register a system LLVM (e.g., missingllvm-config/dev package or discovery changes), this fails with a low-signal jq error. Sinceroot~builtin_llvmrelies on a usable external LLVM, fail with an explicit diagnostic so build failures are easier to interpret.
yq -iy '.packages.llvm.externals[] |= (
.spec += " targets=all" |
.extra_attributes += {
"environment": {
"set": {
containers/debian/Dockerfile:316
- The
yqedit for GCC externals assumes.packages.gcc.externals[]exists; ifspack external find --not-buildable gccdoesn’t populate anexternalslist (e.g., discovery failure or format change), this will fail with a cryptic jq error (Cannot iterate over null). Wrap theyqcall to emit a clear diagnostic before failing the build, so troubleshooting is actionable.
This issue also appears on line 321 of the same file.
yq -iy '.packages.gcc.externals[] |= (
.extra_attributes += {
"environment": {
"set": {
"GCC_AR": "gcc-ar"
Briefly, what does this PR introduce? Please link to any relevant presentations or discussions.
ROOT includes its version of llvm, but it should be possible to build against an external llvm. With ROOT 6.36, that external llvm is at the same level as what ROOT requires. This PR enables the external llvm build.
Needs:
What is the urgency of this PR?
What kind of change does this PR introduce?
Please check if any of the following apply