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

Regression in macos-15-arm64/20241118.362: xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located. #11021

Open
2 of 15 tasks
AkihiroSuda opened this issue Nov 21, 2024 · 5 comments

Comments

@AkihiroSuda
Copy link

Description

xcrun --show-sdk-version began to fail in macos-15-arm64/20241118.362:
https://github.com/lima-vm/lima/actions/runs/11926090231/job/33239305288

2024-11-20 03:19:58.872 xcodebuild[3694:23068] Writing error result bundle to /var/folders/lk/k1lvvf3j5wv0tknvl_jqs0hw0000gn/T/ResultBundle_2024-20-11_03-19-0058.xcresult
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

No error in 20241022.250.
https://github.com/lima-vm/lima/actions/runs/11924369458/job/33234574412

Platforms affected

  • Azure DevOps
  • GitHub Actions - Standard Runners
  • GitHub Actions - Larger Runners

Runner images affected

  • Ubuntu 20.04
  • Ubuntu 22.04
  • Ubuntu 24.04
  • macOS 12
  • macOS 13
  • macOS 13 Arm64
  • macOS 14
  • macOS 14 Arm64
  • macOS 15
  • macOS 15 Arm64
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/actions/runner-images/releases/tag/macos-15-arm64%2F20241118.362

https://github.com/lima-vm/lima/actions/runs/11926090231/job/33239305288

Is it regression?

Yes

Expected behavior

xcrun --show-sdk-version should successfully print the SDK version

Actual behavior

xcrun --show-sdk-version fails as above.

Repro steps

xcrun --show-sdk-version

@aartis17
Copy link
Contributor

HI @AkihiroSuda, We will look into the issue and keep you posted with updates.

@aartis17
Copy link
Contributor

Hi @AkihiroSuda, The error is coming because of Xcode CLT was updated from 16.0 to 16.1.

To find the macOS 15 arm64 SDKs, we need to select the xcode version as 16.1. Please find the code below.
Our readme file is in accordance with the below:

  - name: Get SDKs
      run: |
           sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
           xcodebuild -showsdks
           
  - name: SDK
      run : xcrun --show-sdk-version
           

Output:

Screenshot 2024-11-22 at 2 40 51 PM Screenshot 2024-11-22 at 2 34 09 PM

Hope this resolves issue ! Please free to reach out if any further questions.

@AkihiroSuda
Copy link
Author

Thanks, is there any intentional reason that 16.1 isn't selected by default?

@erik-bershel
Copy link
Contributor

Thanks, is there any intentional reason that 16.1 isn't selected by default?

Yes, we leave it to the users. Switching the default version on our side does not make much sense - each user is free to choose the version of Xcode they need. We usually do this either upon request (usually due to some very global issues in a specific release) or after the release of new minor versions is completed (for example, for version 15.4).

@nirs
Copy link

nirs commented Nov 22, 2024

Hi @AkihiroSuda, The error is coming because of Xcode CLT was updated from 16.0 to 16.1.

To find the macOS 15 arm64 SDKs, we need to select the xcode version as 16.1. Please find the code below. Our readme file is in accordance with the below:

  - name: Get SDKs
      run: |
           sudo xcode-select -s /Applications/Xcode_16.1.app/Contents/Developer
           xcodebuild -showsdks
           
  - name: SDK
      run : xcrun --show-sdk-version
           

So we need to select the xcode version before we run xcrun?

This is reasonable workaround, but feels wrong. The xcodebuild and xcrun commands should work regardless of the currently selected xcode version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants