Skip to content

For *-apple-ios targets, if license agreement is not agreed to (yet), better behaviour is necessary #56829

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

Closed
nagisa opened this issue Dec 14, 2018 · 1 comment · Fixed by #139010
Labels
A-licensing Area: Compiler licensing O-ios Operating system: iOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@nagisa
Copy link
Member

nagisa commented Dec 14, 2018

Currently if one attempts to use *-apple-ios targets right after XCode is installed, it will appear that the target does not exist. This happens because xcrun says something about license, sudo and whatnot.

We should have a better behaviour here.

bad behaviour

@nagisa
Copy link
Member Author

nagisa commented Dec 14, 2018

cc #55029

@nagisa nagisa added O-ios Operating system: iOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 14, 2018
@Enselic Enselic added the A-licensing Area: Compiler licensing label Nov 18, 2023
jhpratt added a commit to jhpratt/rust that referenced this issue Mar 27, 2025
…eywiser

Improve `xcrun` error handling

The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs.

Fixes rust-lang#56829.
Fixes rust-lang#84534.
Part of rust-lang#129432.
See also the alternative rust-lang#131433.

Tested on:
- `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6
    - With no tooling installed
    - With Xcode 9.2
    - With Xcode 9.2 Commandline Tools
- `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4
    - With Xcode 13.4.1
    - With Xcode 16.2
    - Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim)
- `aarch64-apple-darwin`, VM running macOS 15.3.1
    - With no tooling installed
    - With Xcode 16.2 Commandline Tools

`@rustbot` label O-apple
r? compiler
CC `@BlackHoleFox` `@thomcc`
@bors bors closed this as completed in 0b40e6e Mar 28, 2025
rust-timer added a commit to rust-lang-ci/rust that referenced this issue Mar 28, 2025
Rollup merge of rust-lang#139010 - madsmtm:parse-xcrun-better, r=wesleywiser

Improve `xcrun` error handling

The compiler invokes `xcrun` on macOS when linking Apple targets, to find the Xcode SDK which contain all the necessary linker stubs. The error messages that `xcrun` outputs aren't always that great though, so this PR tries to improve that by providing extra context when an error occurs.

Fixes rust-lang#56829.
Fixes rust-lang#84534.
Part of rust-lang#129432.
See also the alternative rust-lang#131433.

Tested on:
- `x86_64-apple-darwin`, MacBook Pro running Mac OS X 10.12.6
    - With no tooling installed
    - With Xcode 9.2
    - With Xcode 9.2 Commandline Tools
- `aarch64-apple-darwin`, MacBook M2 Pro running macOS 14.7.4
    - With Xcode 13.4.1
    - With Xcode 16.2
    - Inside `nix-shell -p xcbuild` (nixpkgs' `xcrun` shim)
- `aarch64-apple-darwin`, VM running macOS 15.3.1
    - With no tooling installed
    - With Xcode 16.2 Commandline Tools

``@rustbot`` label O-apple
r? compiler
CC ``@BlackHoleFox`` ``@thomcc``
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-licensing Area: Compiler licensing O-ios Operating system: iOS T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
2 participants