Skip to content

Source-build supports ARM64 #750

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
3 of 7 tasks
dseefeld opened this issue Sep 6, 2018 · 18 comments
Closed
3 of 7 tasks

Source-build supports ARM64 #750

dseefeld opened this issue Sep 6, 2018 · 18 comments
Assignees
Labels
Epic Groups multiple user stories. Can be grouped under a theme.
Milestone

Comments

@dseefeld
Copy link
Contributor

dseefeld commented Sep 6, 2018

ARM64 is the emerging first architecture to tackle. Fedora and RHEL both have ARM64 as primary architectures:

  • Acquire ARM64 hardware
  • Build source-build on ARM64 machines
  • Add ARM64 machines to an internal agent pool
  • Update internal CI to run ARM64 jobs
  • Conform to distro build guidelines
    • Build with distro versions of .NET SDK
    • Do native bootstrapping with native ARM64
@dseefeld dseefeld added the Epic Groups multiple user stories. Can be grouped under a theme. label Sep 6, 2018
@dseefeld dseefeld changed the title Re-enable ARM builds Source-build supports ARM Sep 6, 2018
@omajid
Copy link
Member

omajid commented Sep 6, 2018

Just for clarification, is this arm32 or arm64 (aka aarch64)? Or both?

@wfurt
Copy link
Member

wfurt commented Sep 6, 2018

would there be a reason to do one but not the other? I would think they would be pretty similar.

@markwilkie markwilkie added this to the S142 Sept 24 - Oct 12 (9/24/2018) milestone Sep 26, 2018
@deinok
Copy link

deinok commented Oct 1, 2018

What is left to be done?

@dagood
Copy link
Member

dagood commented Oct 1, 2018

@deinok If you get ZenHub, you should be able to see the issues that are part of this epic, #655 and #699 (as of writing).

@deinok
Copy link

deinok commented Oct 2, 2018

@dagood About the Yocto issue, I think that the issue requires this first to be solved.
Yocto is just a toolchain to join multiple packages. The hipotetic meta-dotnet should use source-build to orchestate the compilation of the Yocto layers.
Here you have the meta-mono layer to take it as an example (http://git.yoctoproject.org/cgit/cgit.cgi/meta-mono).

@dagood
Copy link
Member

dagood commented Oct 3, 2018

Thanks for the clarification. I think an issue can be in an epic for other reasons than a done dependency--like maybe it still makes sense to track as part of this effort since it's a way to prove out that source-build ARM support is working well enough for people to use. @dseefeld, PTAL, maybe add a done condition to the description?

This epic also isn't broken down yet. I'd expect issues for things like adding ARM CI to be filed once we start working on this.

@deinok
Copy link

deinok commented Oct 3, 2018

Just one question @dagood, I feel like there are efforts to have runtime and SDK for x86 and ARM ready for 3.0.0. I'm right?

@tmds
Copy link
Member

tmds commented Nov 12, 2018

@dseefeld, does this issue cover building on an arm64 platform. Packaging guidelines may require this.

For example, https://fedoraproject.org/wiki/Architectures:

All builds have to happen in a native environment. this means cross compiling is not allowed, you can however use virtualisation to emulate your target system.

@dleeapho
Copy link
Contributor

I feel like there are efforts to have runtime and SDK for x86 and ARM ready for 3.0.0. I'm right?

@deinok correct. Though ARM64 tarballs are currently available for the Microsoft distribution (ie non-source-built) the overall effort is to round out ARM64 support with packages etc.

Packaging guidelines may require this.
@tmds Thanks for bringing this to our attention. What you say may help to bring up ARM64 priority for source-build.

I'm updating the description with more info. As we get to this work we will be more focused.
/cc @leecow

@omajid
Copy link
Member

omajid commented Feb 2, 2019

I was playing around with source-build (master) on arm64, and we use a .NET Core SDK 2.1.403 to build the buildtools. That fails on my arm64 box:

$ /home/omajid/source-build/Tools/dotnetcli/dotnet publish --no-restore /home/omajid/source-build/packages/microsoft.dotnet.buildtools/3.0.0-preview1-03406-03/lib/tool-runtime/project.csproj -f netcoreapp2.0 -o /home/omajid/source-build/Tools
Microsoft (R) Build Engine version 15.8.169+g1ccb72aefa for .NET Core
Copyright (C) Microsoft Corporation. All rights reserved.

/home/omajid/source-build/Tools/dotnetcli/sdk/2.1.403/Roslyn/Microsoft.CSharp.Core.targets(52,5): error MSB6006: "csc.dll" exited with code 139. [/home/omajid/source-build/packages/microsoft.dotnet.buildtools/3.0.0-preview1-03406-03/lib/tool-runtime/project.csproj]
$ git rev-parse --short HEAD 
f864f9e
$ /home/omajid/source-build/Tools/dotnetcli/dotnet --info
.NET Core SDK (reflecting any global.json):
 Version:   2.1.403
 Commit:    04e15494b6

Runtime Environment:
 OS Name:     rhel
 OS Version:  8
 OS Platform: Linux
 RID:         linux-arm64
 Base Path:   /home/omajid/source-build/Tools/dotnetcli/sdk/2.1.403/

Host (useful for support):
  Version: 2.1.5
  Commit:  290303f510

.NET Core SDKs installed:
  2.1.403 [/home/omajid/source-build/Tools/dotnetcli/sdk]

.NET Core runtimes installed:
  Microsoft.NETCore.App 2.1.5 [/home/omajid/source-build/Tools/dotnetcli/shared/Microsoft.NETCore.App]

To install additional .NET Core runtimes or SDKs:
  https://aka.ms/dotnet-download

Looking around, it looks like 2.x coreclr doesn't actually support arm64 (https://github.com/dotnet/coreclr/issues/19578) ?

@tmds
Copy link
Member

tmds commented Feb 2, 2019

arm64 support is for .net core 3.0. This issue tracks that: dotnet/announcements#82

@omajid
Copy link
Member

omajid commented Feb 2, 2019

Yeah, but source-build downloaded the 2.1.403 SDK. I guess we will switch to a more recent buildtools/dotnet cli as we get closer to 3.0 release?

@wfurt
Copy link
Member

wfurt commented Feb 2, 2019

That is problematic and brings lot of other issues. I think the correct answer for now is to cross-compile.

I know for sure that corefx will not build on arm as not all dependencies are ARM safe or available. This is more than just the SDK.

@tmds
Copy link
Member

tmds commented Feb 4, 2019

We need 1 arm sdk (which could be cross-compiled) to use as the bootstrap sdk.

I know for sure that corefx will not build on arm as not all dependencies are ARM safe or available. This is more than just the SDK.

Can you be more specific? My expectation for Fedora (which could be wrong) is, we have the same packages available to compile corefx for arm64 as we do for x64.

@dleeapho dleeapho modified the milestones: S142 Sept 24 - Oct 12 (9/24/2018), Future Aug 8, 2019
@dleeapho
Copy link
Contributor

dleeapho commented Aug 8, 2019

Moving this the Future milestone since we are concentrating on prebuilt and patch hygiene on x64 in the 3.0 milestone.

@omajid
Copy link
Member

omajid commented Oct 9, 2019

I got source-build to build on arm64 here: #1300

@dleeapho dleeapho modified the milestones: Future, 5.0 Dec 5, 2019
@dleeapho
Copy link
Contributor

dleeapho commented Dec 5, 2019

I'm setting up the milestone to 5.0 so we can move on getting CI running for ARM64 to ensure #1300 going forward. Let's figure what machines we can use (can we use existing Centriq servers), how many we need, the AzDo agent support that is required etc.

@crummel please liaise with @ilyas1974

@dleeapho dleeapho removed this from the 5.0 milestone Mar 3, 2021
@dleeapho dleeapho added this to the 6.0 milestone Mar 3, 2021
@dleeapho dleeapho changed the title Source-build supports ARM Source-build supports ARM64 Mar 3, 2021
@MichaelSimons
Copy link
Member

[Triage] Arm64 is officially supported by source-build. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Epic Groups multiple user stories. Can be grouped under a theme.
Projects
None yet
Development

No branches or pull requests

10 participants