Skip to content

Enable linux-musl-arm* builds in CI - #8984

Merged
sdmaclea merged 8 commits into
dotnet:masterfrom
sdmaclea:AlpineSDKs
Oct 30, 2020
Merged

sdmaclea merged 8 commits into
dotnet:masterfrom
sdmaclea:AlpineSDKs

Conversation

@sdmaclea

@sdmaclea sdmaclea commented Oct 28, 2020 •

Copy link
Copy Markdown

Enable linux-musl-arm* builds in CI

Revise recent build table

Reorder platform table more naturally

  • Windows -> Linux -> Linux-musl -> RHEL -> macOS
  • x64 -> arm -> arm64

Rename linux-musl -> linux-musl-x64
Add linux-musl-arm* rows

/cc @richlander

Fixes #8777
Fixes #8778

Reorder platform table more naturally
- Windows -> Linux -> Linux-musl -> RHEL -> macOS
- x64 -> arm -> arm64

Rename linux-musl -> linux-musl-x64
Add linux-musl-arm* rows
@sdmaclea sdmaclea added this to the 6.0.1xx milestone Oct 28, 2020
@sdmaclea sdmaclea self-assigned this Oct 28, 2020
@sdmaclea
sdmaclea marked this pull request as draft October 28, 2020 19:27
@sdmaclea

sdmaclea commented Oct 28, 2020 •

Copy link
Copy Markdown
Author

@richlander I took a stab at the significant cleanup required in the recent SDK table as part of this. I fixed the stuff that seemed obvious to me. Take a look and see if that is what you wanted.

@sdmaclea
sdmaclea requested review from janvorli and mmitche October 29, 2020 20:00
@sdmaclea
sdmaclea marked this pull request as ready for review October 29, 2020 20:01
@janvorli

Copy link
Copy Markdown
Member

@sdmaclea should the src/redist/targets/GenerateBundledVersions.targets be updated in the Net50RuntimePackRids item? I can see that NetCore30RuntimePackRids contains linux-musl-arm64 and linux-musl-x64.

@sdmaclea

Copy link
Copy Markdown
Author

@janvorli I guess I didn't update them because I thought this was the 6.0 SDK. I was thinking 6.0 was the first time we would support linux-musl-arm.

Did we build the linux-musl-arm runtimes for 3.1 and/or 5.0. What about the aspnetcore runtimes?

Also what about Net50Crossgen2SupportedRids

@janvorli

Copy link
Copy Markdown
Member

We do build linux-musl-arm runtime packages for 5.0. I've back ported that to 5.0 some time ago. The aspnetcore packages should also be built, at the time I was making the change, the repo was still at 5.0 RC2 and I could see those packages got produced.
The Net50Crossgen2SupportedRids seem to contain only x64 rids, so I don't think arm or arm64 should be added.

@sdmaclea

sdmaclea commented Oct 29, 2020 •

Copy link
Copy Markdown
Author

I wanted to try an official internal build, but I couldn't find it.

@janvorli janvorli left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I've ran the build locally and it generated tarballs with proper musl-arm binaries.

@sdmaclea

sdmaclea commented Oct 30, 2020 •

Copy link
Copy Markdown
Author

I tested in a docker alpine container on linux-arm

After setting up an environment with

sudo docker run -i -t -v $PWD:/home alpine sh
/ # apk add --no-cache ca-certificates krb5-libs libgcc libintl libssl1.1 libstdc++ zlib
/ # export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=true

The following commands seemed to work OK

# /home/dotnet --info
# /home/dotnet tools install --global dotnet-dump
# /home/dotnet new console -o nc
# /home/dotnet build

dotnet run failed.

/home/dotnet /nc/bin/Debug/net5.0/nc.dll succeeded, but only after fixing the vi bin/Debug/net5.0/nc.runtimeconfig.json to reference 6.0.0-alpha.1.20513.9 instead of 5.0.0-rc.2.20475.5

The default content seems to be still referring to 5.0. So we don't yet have coherent 6.0 builds.

 # cat bin/Debug/net5.0/nc.runtimeconfig.json 
{
  "runtimeOptions": {
    "tfm": "net5.0",
    "framework": {
      "name": "Microsoft.NETCore.App",
      "version": "5.0.0-rc.2.20475.5"
    }
  }

I think the issues are orthogonal issues related to updating master to 6.0

@sdmaclea
sdmaclea merged commit 01930de into dotnet:master Oct 30, 2020
@sdmaclea

Copy link
Copy Markdown
Author

@jeffschwMSFT @richlander There was some talk of possibly backporting this to .NET 5.0. My feelings:

  • A lot of this change is build infrastructure, so often the bar is lower. (In fact most of the code in this repo seems to be final compositing infrastructure).
  • The risk could be lower with slightly different code. Some of the code changes touch linux-musl-x64 to generalize to linux-musl-*.
  • We probably need some bake time to test these SDKs. I would guess we would target .NET 5.0.2 at the earliest.

@janvorli

janvorli commented Dec 9, 2020

Copy link
Copy Markdown
Member

/backport to release/5.0.1xx

janvorli added a commit to janvorli/installer that referenced this pull request Dec 10, 2020
* Enable linux-musl-arm* builds in CI

* Revise recent build table

  Reorder platform table more naturally
  - Windows -> Linux -> Linux-musl -> RHEL -> macOS
  - x64 -> arm -> arm64

  Rename linux-musl -> linux-musl-x64
  Add linux-musl-arm* rows

* Generalize linux-musl-* code to include arm*

- Set /p:OSName='linux-musl'

* Fix linux-musl-arm crossgen logic

* Build linux-musl-arm on Ubuntu 18.04

* Add linux-musl-arm to .NET 5.0 RuntimePackRids
@sdmaclea
sdmaclea deleted the AlpineSDKs branch June 10, 2021 00:32
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

Successfully merging this pull request may close these issues.

Build .NET SDK for Alpine ARM32 Build .NET SDK for Alpine ARM64

2 participants