Skip to content

Conversation

@adamjstewart
Copy link
Member

Follow-up to #63

It seems that if clang/flang are installed, Spack will register an external LLVM and use that instead of building LLVM. However, anything calling spec['llvm'].libs runs llvm-config, which is not installed on the image. This PR hopefully adds llvm-config to the image, although I have no idea how to test this. Suggestions for better solutions are welcome.

@rbberger

@becker33
Copy link
Member

If we can make spec["llvm"].libs work with normal external installs of llvm, I think that would be a better solution.

@adamjstewart
Copy link
Member Author

But I don't think the libs are actually installed, so I don't think that would work anyway.

@rbberger
Copy link
Member

rbberger commented Aug 22, 2025

While the /usr/bin/llvm-config is provided by the llvm package, it's just a symlink to /usr/bin/llvm-19-config of llvm-19 (or whatever version is installed). llvm-config --libfiles all will fail if the libraries are not installed. You only get them with llvm-dev (which pulls in the actual llvm-19-dev).

These are the commands to explore this in detail:

# tells you which package added this file
dpkg -S /usr/bin/llvm-config

# tells you the contents of an installed package
dpkg -L llvm-19-dev

@adamjstewart
Copy link
Member Author

Current bug due to spack/spack-packages#75

@zackgalbreath zackgalbreath merged commit 5b6830d into main Sep 15, 2025
30 of 44 checks passed
@zackgalbreath zackgalbreath deleted the ubuntu-24.04/llvm-config branch September 15, 2025 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants