binutils: detect the "gold" and "headers" variants#40214
binutils: detect the "gold" and "headers" variants#40214alalazo merged 2 commits intospack:developfrom
Conversation
Fixes #29350: - binutils: Make spack external find binutils set ~headers to fix build of llvm Changes: Add initial def determine_variants(): - llvm needs binutils+headers for plugin-api.h which most distros don't install and therefore make spack external find binutils detect binutils~headers. This forces spack to build binutils for llvm when binutils have been imported from the system. This fixes the build of llvm in #29350. - Also check for installed gold linker and set +gold/~gold
929f8c7 to
828fe66
Compare
|
I have run into this same issue with LLVM. I don't understand the patch though and will wait for @alalazo to provide a proper review. |
|
Ping @alalazo is this ever going to be fixed? binutils external detection remains broken in spack:develop, which breaks LLVM and other packages on important systems (e.g. HPE Cray EX, where the binutils provided by the SLES15 distro is missing the Currently the external detection for CC: @arezaii |
bonachea
left a comment
There was a problem hiding this comment.
@alalazo wrote:
...
I installed the sprinkler myself, in 8e1ac7c Hope nobody minds.If you confirm this works I'll merge the PR.
Fix confirmed on NERSC Perlmutter:
perlmutter$ spack external find binutils
==> The following specs have been detected on this system and added to <redacted>/packages.yaml
[email protected] [email protected]
perlmutter$ grep -A6 binutils $SPACK_USER_CONFIG_PATH/packages.yaml
externals:
- spec: [email protected]~gold~headers
prefix: /opt/cray/pe/cce/17.0.0/binutils/x86_64/x86_64-pc-linux-gnu
- spec: [email protected]~gold~headers
prefix: /usr
Thanks for the quick turnaround!
Co-authored-by: Massimiliano Culpo <[email protected]>
Co-authored-by: Massimiliano Culpo <[email protected]>
Co-authored-by: Massimiliano Culpo <[email protected]>
Fixes #29350:
Changes:
Add initial
def determine_variants():llvmneedsbinutils+headersforplugin-api.hwhich most distros don't installand therefore make
spack external find binutilssearch for the header and set~headers/+headersAlso check for installed
goldlinker and set+gold/~gold