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

swift build results in PlatformPath warning from xcrun, fails completely for some #7480

Open
1 task done
timoffex opened this issue Apr 22, 2024 · 1 comment
Open
1 task done
Labels

Comments

@timoffex
Copy link

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

When I use swift build to build a simple package (just this: https://github.com/wandb/wandb/tree/main/apple_stats), I see the following warning in the terminal:

  warning: could not determine XCTest paths: terminated(1): /usr/bin/xcrun --sdk macosx --show-sdk-platform-path output:
      xcrun: error: unable to lookup item 'PlatformPath' from command line tools installation
      xcrun: error: unable to lookup item 'PlatformPath' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk'

For some coworkers, this is an error instead of a warning, failing the build completely.

I'm guessing this is a version issue, but it's difficult to figure out online how/what to upgrade for those who get an error. I also do not understand why there is a warning at all.

Expected behavior

No warning and no error. It should just build.

Actual behavior

A warning for some; an error for others.

Steps to reproduce

  1. Download this folder https://github.com/wandb/wandb/tree/main/apple_stats
  2. cd into it and run swift build

Swift Package Manager version/commit hash

No response

Swift & OS version (output of swift --version ; uname -a)

Apple Swift version 5.10 (swiftlang-5.10.0.13 clang-1500.3.9.4)
Target: arm64-apple-darwin23.1.0
Darwin Timofey-Peshin-K50H236L02.local 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct 9 21:33:00 PDT 2023; root:xnu-10002.41.9~7/RELEASE_ARM64_T6031 arm64

@timoffex timoffex added the bug label Apr 22, 2024
@timoffex
Copy link
Author

softwareupdate --install "Command Line Tools for Xcode-15.3" turns the error into a warning for at least one person.

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

No branches or pull requests

1 participant