Skip to content

buildroot macOS SDK finder script fails on new Xcode cipd package: SDK "macosx10.15" cannot be located #94513

@jmagman

Description

@jmagman

The buildroot SDK finder script is checking directory names.
https://github.com/flutter/buildroot/blob/42be4395efc85e455bbdd555ef2791615338dbea/build/mac/find_sdk.py#L64

xcodebuild: error: SDK "macosx10.15" cannot be located.
Traceback (most recent call last):
  File "/opt/s/w/ir/cache/builder/src/build/mac/find_sdk.py", line 102, in <module>
    print((main()))
  File "/opt/s/w/ir/cache/builder/src/build/mac/find_sdk.py", line 86, in main
    sdk_output = subprocess.check_output(['xcodebuild', '-version', '-sdk',
  File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/subprocess.py", line 415, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File "/opt/s/w/ir/cipd_bin_packages/cpython3/lib/python3.8/subprocess.py", line 516, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['xcodebuild', '-version', '-sdk', 'macosx10.15', 'Path']' returned non-zero exit status 64.

https://logs.chromium.org/logs/flutter/led/magder_google.com/355a07526ede203cdf1fd176b7fffb6a86037c080eb7dac95af40ecd954a02fb/+/u/gn_--ios_--runtime-mode_debug_--simulator_--no-lto/stdout

Due to an unfortunate Ruby header issue, there is a macosx10.15 SDK directory, but Xcode doesn't think it's actually installed. It would be better to check with Xcode for which SDKs are actually installed instead of path parsing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    engineflutter/engine related. See also e: labels.platform-macBuilding on or for macOS specifically

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions