Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for llvm-config (without a version suffix) #435

Open
smoelius opened this issue Dec 14, 2023 · 3 comments
Open

Check for llvm-config (without a version suffix) #435

smoelius opened this issue Dec 14, 2023 · 3 comments

Comments

@smoelius
Copy link
Member

Additionally, on Arch Linux the current officially supported LLVM version is 16.0.6 so llvm-config command comes without a version prefix but the build script fails because it invokes llvm-config-16 --version instead of llvm-config --version. I had to create a symbolic link in order to fix this but it would be better if the build script checked llvm-config --version first before invoking the command with a specific prefix.

Originally posted by @a1akris in #434 (comment)

@h49nakxs
Copy link

Hi there,

Adding my 2 cents to the issue.

llvm-config command exists in two situations :

  • LLVM has been installed using the distribution default package.
  • LLVM has been built from source and then installed system-wide (by the way, AFLplusplus@9f6b012 cannot be build with LLVM 20).

But if a later version has been installed using another distribution package, e.g. llvm-17, llvm-18, then the command will be llvm-config-xx.

So I think you better retrieve the correct command using something like :
which llvm-config > /dev/null 2>&1 && echo 'llvm-config' || ls /usr/bin | grep -o 'llvm-config-[0-9][0-9]' | sort -r | head -1

@smoelius
Copy link
Member Author

Thanks very much for these observations, @h49nakxs.

@vanhauser-thc
Copy link
Contributor

Hi!

Thanks for the notice about the recent change in LLVM 20, fixed that in the dev branch.

Note that the current nightly is on LLVM 19, so that is the llvm version that needs to be installed (and matched against with llvm-config).

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

No branches or pull requests

3 participants