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

[BUG]: UseDotNet task installs x64 build on Mac OS arm64 #19174

Closed
1 of 4 tasks
jasongin opened this issue Oct 28, 2023 · 5 comments
Closed
1 of 4 tasks

[BUG]: UseDotNet task installs x64 build on Mac OS arm64 #19174

jasongin opened this issue Oct 28, 2023 · 5 comments

Comments

@jasongin
Copy link
Member

jasongin commented Oct 28, 2023

On a macOS arm64 (M1/M2) build agent, the task incorrectly detects the architecture as x64, and downloads the x64 build of .NET. It can run successfully via the Rosetta compatibility mode, but is probably not what anyone wants, and defeats the purpose of using a (more expensive) Mac M1 build agent.

Task name

UseDotNet

Task version

2.228.0

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

macOS 12.6.9

Task log

Tool to install: .NET Core sdk version 8.0.x.
Found version 8.0.100-rc.2.23502.2 in channel 8.0 for user specified version spec: 8.0.x
Version 8.0.100-rc.2.23502.2 was not found in cache.
Getting URL to download .NET Core sdk version: 8.0.100-rc.2.23502.2.
Detecting OS platform to find correct download package for the OS.
/Users/runner/work/_tasks/UseDotNet_b0ce7256-7898-45d3-9cb5-176b752bfea6/2.228.0/externals/get-os-distro.sh
Primary:osx-x64
Legacy:osx-x64
Detected platform (Primary): osx-x64
Detected platform (Legacy): osx-x64
Downloading: https://download.visualstudio.microsoft.com/download/pr/2cb4fcbd-ba5d-41c4-9907-8120aa4b5f23/98fd104ada4105462cefb1123a0df533/dotnet-sdk-8.0.100-rc.2.23502.2-osx-x64.tar.gz

Aditional info

This appears to be caused by an incomplete list of ARM64 detection strings in
get-os-distro.h get_machine_architecture()

Specifically, uname -m returns arm64 on a Mac arm64 (M1/M2) system.
Reference: https://stackoverflow.com/questions/65259300/detect-apple-silicon-from-command-line

@svaldetero
Copy link

This is currently an issue for me on my self-hosted macstudio agent. It causes my net8-ios build to freeze and eventually time out. This has been plaguing our builds for months. My workaround is to not run the UseDontNet task if on the self-hosted agent, but would prefer if it would install the correct dotnet version.

@merlynomsft
Copy link
Contributor

The change has been merged and will be in the next release of the task. Thank you for the contribution!

@svaldetero
Copy link

@merlynomsft when will this get released? It was merged 2 weeks ago but I still see task 2.232.0 being used on my ADO runs.

@merlynomsft
Copy link
Contributor

We roll out task updates incrementally, that said, this update should show up soon. @max-zaytsev, do you have an estimate when this will be available to everyone?

@max-zaytsev
Copy link

@svaldetero the fix should be available now.

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

No branches or pull requests

4 participants