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

In ARM64, fallback to ARM32/x86 if SDK installer is not found #5885

Open
Tracked by #2053
carlossanlop opened this issue Aug 4, 2020 · 1 comment
Open
Tracked by #2053

In ARM64, fallback to ARM32/x86 if SDK installer is not found #5885

carlossanlop opened this issue Aug 4, 2020 · 1 comment
Milestone

Comments

@carlossanlop
Copy link
Member

Related to: dotnet/roslyn-analyzers#3933

If the architecture is arm64, but the dotnet-install script does not find an SDK installer for that architecture, fallback to arm32. And if no arm32 SDK installer is found, fallback to x86.

Here is the output of build.cmd from the roslyn-analyzers repo, when executed from my ARM64 machine:

C:\User\carlos\source\repos\roslyn-analyzers ❯ .\Build.cmd
dotnet-install: Downloading link: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.200/dotnet-sdk-3.1.200-win-arm64.zip
dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.200/dotnet-sdk-3.1.200-win-arm64.zip
dotnet-install: Downloading legacy link: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.200/dotnet-dev-win-arm64.3.1.200.zip
dotnet-install: Cannot download: https://dotnetcli.azureedge.net/dotnet/Sdk/3.1.200/dotnet-dev-win-arm64.3.1.200.zip
Failed to install dotnet runtime '' from public location.

The ARM64 SDK installer does not exist for 3.1.

So I had to hardcode the $architecture = '' argument to x86 in the script that attempts the installation, so that I could get a successful compilation:

roslyn-analyzers/eng/common/tools.ps1#L223-L225
From:

 function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = '') { 
   InstallDotNet $dotnetRoot $version $architecture 
 }

To:

 function InstallDotNetSdk([string] $dotnetRoot, [string] $version, [string] $architecture = 'x86') { 
   InstallDotNet $dotnetRoot $version x86
 }

cc @jmarolf

@garath
Copy link
Member

garath commented Aug 21, 2020

Arcade avoids making these kinds of assumptions. It would be better aligned if we looked at plumbing these parameters further up so that build logic can configure them properly (instead of requiring edits to managed files). Would that be an acceptable solution for you?

@michellemcdaniel michellemcdaniel mentioned this issue Feb 14, 2022
74 tasks
@missymessa missymessa added this to the Arcade SDK milestone Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants