-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
XCode SDK path changed; clang's sysroot is wrong. #2211
Comments
Hello @hv15 , default Xcode was changed from 12.0 to 12.2 recently on Hosted images. See #2056 ls -la /Applications/Xcode_12.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
echo "-----------"
ls -la /Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs returns
If you still need to use Xcode 12.0, #2056 contains the way to switch Xcode Update: |
Hi @maxim-lobanov, thanks for the quick reply. I didn't realise one could switch the Xcode version, excellent!
Spot on, just working to fix that!!! Thanks for your help! |
The same problem resurfaces again after switching to OS X 11.1 and XCode 12.3. The SDK now is
A better solution would be to not request a specific version of the Mac OS SDK at all, but the generic |
For whatever reason CMake seems to infer "12.6" as SDK version, because the GitHub Action macOS runner is based on macOS 12.6. But that number doesn't match the SDK version, which should be 13.1 here. This seems to be a long running issue with GitHub Actions' macOS runner: actions/runner-images#2211 Though I can't tell if it's a CMake bug or a GitHub Actions image setup issue.
For whatever reason CMake seems to infer "12.6" as SDK version, because the GitHub Action macOS runner is based on macOS 12.6. But that number doesn't match the SDK version, which should be 13.1 here. This seems to be a long running issue with GitHub Actions' macOS runner: actions/runner-images#2211 Though I can't tell if it's a CMake bug or a GitHub Actions image setup issue.
Description
Hi, just today we noticed that when compiling our software on the MacOS image, we get the following warning:
clang: warning: no such sysroot directory: '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk' [-Wmissing-sysroot]
. This then leads to errors when trying to compile valid C sources.Area for Triage:
Apple and XCode
Question, Bug, or Feature?:
Question
Virtual environments affected
Expected behavior
We should be able to compile our code fine using Clang.
Actual behavior
When compiling, we get the following error:
Repro steps
This affects our repo, see relevant example given through our PR: SacBase/Stdlib#43
The code in this instance doesn't matter, rather our compiler tool (sac2c) which we are using in the above project to compile a standard library, uses a hard-coded path for the sysroot flag. We determine that path when compiling sac2c, which we did on a MacOS 10.15 system (not image). This was about 3 months ago. I think that between then and now some changes (maybe XCode update per #2073) has changed this path.
Is there some generic path we can use instead?
The text was updated successfully, but these errors were encountered: