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

Xcode local build failure: xcode-select : error : tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance #102471

Closed
carlossanlop opened this issue May 20, 2024 · 6 comments · Fixed by #102473

Comments

@carlossanlop
Copy link
Member

When building runtime in my local Macbook Pro with build.sh -rc Release today, I got this failure:

xcode-select : error : tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance [/Users/carlos/repos/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj]
/Users/carlos/repos/runtime/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj(79,24): error MSB4086: A numeric comparison was attempted on "$(_XcodeVersion)" that evaluates to "" instead of a number, in condition "'$(_XcodeVersion)' >= '15'".

It came from here:
https://github.com/dotnet/runtime/blob/main/src/coreclr/tools/aot/ILCompiler/ILCompiler.csproj#L79

Root cause was that the Xcode -> Preferences -> Location -> Command Line Tools dropdown was set to No Xcode selected. So I had to manually select the single only option in the dropdown and now the local build succeeded. It's explained here:
https://stackoverflow.com/a/72115137

The top error comes from Xcode itself, but that message wasn't helpful. But we could kind of address this from our side:

@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label May 20, 2024
Copy link
Contributor

Tagging subscribers to this area: @dotnet/runtime-infrastructure
See info in area-owners.md if you want to be subscribed.

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

@jkotas
Copy link
Member

jkotas commented May 20, 2024

Related to #100189

jkotas added a commit to jkotas/runtime that referenced this issue May 20, 2024
jkotas added a commit to jkotas/runtime that referenced this issue May 20, 2024
@carlossanlop
Copy link
Member Author

Yes, it seems like the same failure, it just happened at different times. I'll close this and update that one with my findings and my suggestions.

@carlossanlop
Copy link
Member Author

carlossanlop commented May 20, 2024

Oh I typed too soon - That one is already closed as fixed. Maybe it was a different root cause, as that one was merged 2 months ago.

Edit: Same root cause, different MSBuild script.

@jkotas
Copy link
Member

jkotas commented May 20, 2024

You can try the change in #102473 to check that it fixes the build break for you.

jkotas added a commit that referenced this issue May 21, 2024
@dotnet-policy-service dotnet-policy-service bot removed the untriaged New issue has not been triaged by the area owner label May 21, 2024
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this issue May 30, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants