-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Compile fails with LLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libc;libunwind" on Mac M1 #112151
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
Comments
Looks like the issue with Apple-installed SDKs as the error is:
Would be better to report to Apple |
Bad example... :)
Also, the apple sdk compiler can find stdbool.h. However, the bootstrapped clang is causing the trouble: 'llvm-project/build2/bin/clang' It is some interaction with the system and the bootstrapped compiler. Because the same build tree that was working stopped working after a mac system update. Basically when building libunwind there are multiple instances of stdbool.h not being found. If I just have a hello world that includes stdbool.h the bootstrapped compiler can't find it. The system one can find it. |
I think the problem might be that something moved on the mac. If I run the clang with -v you can see these warnings:
If you look for stdbool.h in the SDK directory you see this:
|
So, I am not seeing the problem in the 19.x branch only in origin/main. So, it is likely an issue with llvm and not the system I am building on. |
In the 19.x clang compiler that is in the build tree I can compile a Here is the broken one:
Here is the same thing with the build tree clang from 19.x:
In addition, if I run ninja -t deps on the 19.x where things work you can see where it is getting stdbool.h
In 19.x you can see there is a |
Which SDK are you using? I would expect to see this on macOS 15 SDKs prior to Beta 5, but not in Beta 5 or the released version. |
I think this means I am running 15 SDK: AFAIK I am not using anything Beta, just released Xcode. clang --version |
OK, this is all my fault... Sorry for the trouble here. In trying to fix this issue #109895 I made this patch
This issue can be closed, maybe the location of |
c++ -v
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin23.6.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
In file included from /Users/hoffman/Work/llvm/llvm-project/libunwind/src/AddressSpace.hpp:35:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX15.0.sdk/usr/include/dlfcn.h:36:10: fatal error: 'stdbool.h' file not found
cmake -DLLVM_ENABLE_PROJECTS=clang -DCMAKE_INSTALL_PREFIX=/Users/hoffman/Work/llvm-main-inst-mine -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libc;libunwind" -G Ninja ../llvm
The text was updated successfully, but these errors were encountered: