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

Update .NET Linux Build for .NET 10 #109939

Open
richlander opened this issue Nov 18, 2024 · 7 comments
Open

Update .NET Linux Build for .NET 10 #109939

richlander opened this issue Nov 18, 2024 · 7 comments
Labels
area-Infrastructure untriaged New issue has not been triaged by the area owner

Comments

@richlander
Copy link
Member

The Microsoft distribution of .NET is built to be compatible with the broad Linux ecosystem. We decide and communicate minimum supported distro versions with each release, first to get feedback, and then to set expectations. Distro compatibility is an important property of each release.

Minimum compatible distros:

We model compatibility on Ubuntu for glibc distros and Alpine for musl distros.

This means that .NET 10 apps will run on Alpine 3.17 and Ubuntu 18.04 and later (and other compatible distro versions). They will not run on distros versions before that (like Ubuntu 16.04), while .NET 8 and 9 apps will.

If an app is run on a distro with an older libc than the .NET build targets, the app will fail to launch with errors related to missing libc exports.

We have communicated similar plans for .NET 8 and .NET 9.

Details

The Microsoft distribution for .NET 10 is built in an Azure Linux 3.0 container and targets the minimum supported distro using cross-compilation techniques. The approach we use is covered in more detail in Linux build methodology.

It is important that we continue to move the minimum supported versions forward so that we can securely build .NET and to take advantage of low-level capabilities that are present in newer libc versions. For example, we were forced to do that Arm32.

The versions listed in this document are a compatibility not support statement. We'll publish support statements, later, and add a link here.

glibc compatibility

Ubuntu 18.04 includes glibc version 2.27.

The following distro versions (and higher) are compatible:

  • AlmaLinux 8: 2.28
  • Amazon Linux 2023: 2.34
  • Arch Linux 20241027.0.273886: 2.40
  • CentOS Stream 9: 2.34
  • Debian 11: 2.31
  • Fedora 38: 2.37
  • RHEL 8: 2.28

Recent Ubuntu glibc versions:

  • Ubuntu 24.04: 2.39
  • Ubuntu 22.04: 2.35
  • Ubuntu 20.04: 2.31
  • Ubuntu 18.04: 2.27
  • Ubuntu 16.04: 2.23

musl compatibility

Alpine 3.17 includes musl version 1.2.3.

The following distro versions (and higher) are compatible:

  • None listed; please contribute non-Alpine distros you use.

Recent Alpine musl versions:

  • Alpine 3.20: 1.2.5
  • Alpine 3.19: 1.2.4
  • Alpine 3.18: 1.2.4
  • Alpine 3.17: 1.2.3
  • Alpine 3.16: 1.2.3
  • Alpine 3.15: 1.2.2
  • Alpine 3.14: 1.2.2
  • Alpine 3.13: 1.2.2

Toolset

The Microsoft build uses a variety of tools. This choice is most relevant for distros that build .NET from source and want to use the same or similar tool versions to ensure compatible results. It can also be important for users that want to understand if an observed behavior is due to known issues with those tools.

Tools:

  • clang 20
  • cmake 3.26
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Nov 18, 2024
Copy link
Contributor

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

@richlander
Copy link
Member Author

@dotnet/distro-maintainers @omajid @dviererbe @mateoatr @normj

Copy link
Contributor

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

@dviererbe
Copy link
Contributor

I talked today to Mateus and Samir about this issue and we think it is totally reasonable, that .NET 10 will not support the glibc version of Ubuntu 16.04. Thanks for keeping us in the loop :)

@richlander
Copy link
Member Author

Great! Thanks for the feedback.

For clarity, this plan only affects the Microsoft build. It would be possible for another party to build .NET targeting a different glibc or musl version, higher or lower. We have no expectation that others follow our approach.

@normj
Copy link

normj commented Nov 19, 2024

For clarity, this plan only affects the Microsoft build. It would be possible for another party to build .NET targeting a different glibc or musl version, higher or lower. We have no expectation that others follow our approach.

Doesn't your comment in the post "take advantage of low-level capabilities that are present in newer libc versions." imply that .NET will start calling APIs that are only available in newer versions of libc which would block users from building with older versions glibc? Not that I'm saying this shouldn't be done but it does seem the change raises the contract between .NET and the platform for everybody.

@richlander
Copy link
Member Author

richlander commented Nov 19, 2024

Great q. Those calls can always be made conditional. For example, .NET 9+ Arm32 is now built for Ubuntu 22.04+. It's possible to build it another way.

Example: #107989

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-Infrastructure untriaged New issue has not been triaged by the area owner
Projects
Status: No status
Development

No branches or pull requests

4 participants