-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
clang-tidy broken with llvm v19.1.3 #196344
Comments
I get the same errors when I run clang-tidy from pip (latest version is 19.1.0) when brew llvm 19.1.3 is installed. |
Oh, that's annoying. Looks like As a workaround, try
|
Similar problem, but with clang. With 19.1.3, clang can't find stuff like Now I'll have to manually add I wonder if this is as expected. Or what is the right way to fix this system-header-missing problem? |
For me, I didn’t have any problem compiling with clang++. Does my simple example compile? |
@Congyuwang, I can't reproduce your issue so I'll need to know:
|
For the
|
This seems to be why:
It doesn't know where the driver is, so it can't resolve the path to the config file. |
would it work to use a custom prefix flag with path while building to fix issue? |
Not quite, since In any case, we also do set |
LLVM is designed to be relocatable so it does not bake in install prefixes. |
@Congyuwang, I think your issue should have been fixed by #197410. You'll need to |
@carlocab Not working. Running the following main.c int main() {
return 0;
} build.sh eval "$(brew shellenv)"
export LLD=${HOMEBREW_PREFIX}/opt/lld/bin/ld64.lld
export CC=${HOMEBREW_PREFIX}/opt/llvm/bin/clang
${CC} -O3 --target=arm64-apple-macosx10.14 -fuse-ld=${LLD} -o main main.c -v
Run We get
Seems like However, specifying |
I only have the above. MacOS 15.1, Xcode 16.1. There is no Whereas we have
|
@Congyuwang, don't use |
I must say that this maybe the correct way to go. But I didn’t add the target flag myself, but it is added by some (I need further investigation to see) upstream dependencies. So this incorrect use of target for the purpose can be quite common. |
brew gist-logs <formula>
link ORbrew config
ANDbrew doctor
outputVerification
brew doctor
output saysYour system is ready to brew.
and am still able to reproduce my issue.brew update
and am still able to reproduce my issue.brew doctor
and that did not fix my problem.What were you trying to do (and why)?
clang-tidy is no longer finding system headers since the llvm 19.1.3 update (#196094)
What happened (include all command output)?
What did you expect to happen?
Using llvm 19.1.2 formula, the output is:
(Some warnings but no error finding <iostream>).
Step-by-step reproduction instructions (by running
brew
commands)The text was updated successfully, but these errors were encountered: