actions / runner-images

GitHub Actions runner images
MIT License
10.22k stars 3.07k forks source link

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

Open AkihiroSuda opened 1 day ago

AkihiroSuda commented 1 day ago

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

Runner images affected

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 commented 12 hours ago

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

aartis17 commented 8 hours ago

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 commented 6 hours ago

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

erik-bershel commented 5 hours ago

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).