-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
llvm-ar not found when building with clang-tidy #3812
Comments
This is a common issue for os-provided llvm installs, particularly when you're using an older macos system install (from "/Users" I assume this is macos). See contribution tools for advice on installing llvm. If that doesn't address your issue, please provide the output of these troubleshooting commands:
|
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as abuse.
This comment was marked as abuse.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as duplicate.
This comment was marked as duplicate.
@justzh - Please keep comments on PRs and issues constructive and on-topic. I'm hiding yours, but you've had warnings now and so I will block if this continues. Rapid-fire asking of questions, or speaking for the reporter isn't a constructive or appropriate use of issues. |
This comment was marked as spam.
This comment was marked as spam.
Sorry for the delay. I followed the instructions at Contribution Tools but I am still getting the same error:
|
Outputs for the requested commands: $ which $CC
# no output $ which clang
/usr/bin/clang $ which clang-16
clang-16 not found $ clang --version
Apple clang version 15.0.0 (clang-1500.1.0.2.5)
Target: arm64-apple-darwin23.4.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin $ grep llvm_bindir $(bazel info workspace)/bazel-execroot/external/bazel_cc_toolchain/clang_detected_variables.bzl
INFO: Invocation ID: ce012800-43b0-4d82-b9f5-9ddb32bfb8fe
grep: /Users/dzc/Repos/github/carbon-language/carbon-lang/bazel-execroot/external/bazel_cc_toolchain/clang_detected_variables.bzl: No such file or directory $ brew --prefix llvm
/opt/homebrew/opt/llvm |
It looks like you need to add brew's llvm to your path, as described at https://github.com/carbon-language/carbon-lang/blob/trunk/docs/project/contribution_tools.md#macos:
|
We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please comment or remove the This issue is labeled |
Closing, please let us know if the |
Description of the bug:
Building Carbon with the clang-tidy configuration results in an error reporting that "
llvm-ar
not found in PATH or adjacent to clang"What did you do, or what's a simple way to reproduce the bug?
Fresh check-out of the repo and then run:
What did you expect to happen?
The build to succeed.
What actually happened?
Any other information, logs, or outputs that you want to share?
No response
The text was updated successfully, but these errors were encountered: