Closed richlander closed 2 weeks ago
/cc @socketnorm @dotnet/distro-maintainers
The older the libc, the broader the compatibility.
IIUC, this update is desired not because we are actually using anything specific from modern glibc in code, but the reason for update is infrastructure related. In that case:
We are building the official image with older glibc on modern distro. We use debootsrap
to create a cross-build environment, select older version of Ubuntu during the setup, and then install headers, dependencies etc. During the runtime build, we use -isystem=/path/to/rootfs/dir
. This means that libc and the build dependencies are old in the rootfs environment. As the time is passing by, those old dependencies are getting hard to acquire and pass the security scan.
If that is the whole reason of this update, it is possible to setup rootfs environment with newer version of Ubuntu while keeping libc6 version lower. (apt install libc-bin=2.19-0ubuntu6 libc6=2.19-0ubuntu6
in rootfs). This way we will end up with "old libc and new $everythingElse". Note that we don't "execute" anything in rootfs environment aside from apt install
et al. during the creation of docker layer.
If we set it up this way, would this satisfy everyone?
CentOS Stream 8/RHEL8 have 2.28.
If I recall correctly, we (Red Hat) would like to provide a supported version of .NET during the maintenance support phase of RHEL. For RHEL8, that is till May 2029. To cover that period, we'll need to build .NET 10 on RHEL8.
cc @omajid
Tagging subscribers to this area: @dotnet/runtime-infrastructure See info in area-owners.md if you want to be subscribed.
Author: | richlander |
---|---|
Assignees: | - |
Labels: | `area-Infrastructure`, `untriaged`, `needs-area-label` |
Milestone: | - |
@tmds this change in minimum glibc version will only apply to the Microsoft build. RedHat's build should still be able to be built against RHEL8's glibc.
RedHat's build should still be able to be built against RHEL8's glibc.
Agree. It can complicate the RHEL build bootstrapping though.
Can you use Ubuntu 18.04 for .NET 9?
That will evade the need to bootstrap.
It will also make self-contained apps built using the Microsoft SDK work on RHEL 8 (and RHEL 8 compatible distros).
Acknowledging from AWS and we will be encouraging users to migrate to Amazon Linux 2023.
We could target 18.04 instead. There is no pressing reason to move to 20.04. Would that resolve the challenges?
Yes. If you can use Ubuntu 18.04, that would be preferable.
I updated this doc to Ubuntu 18.04. Sorry for the delay.
Closing this. I don't think we're going to change anything unless there's a specific reason.
Just in time to create a new one for .NET 10!
Update (2024-07): We decided to keep on targeting Ubuntu 16.04 based on other feedback. Doing so hasn't had any significant drawback and maintains significant compatibility.
We should update the Linux build to use Azure Linux 3.0 and target Ubuntu 18.04 for .NET 9. This plan builds on our successful .NET 8 Linux build project. This is for the Microsoft build. Other builders of .NET 9 can and will make different choices.
For .NET 8, we targeted Ubuntu 16.04, in order to provide broad support for older Linux distributions. We considered targeting Ubuntu 18.04 in that timeframe, but that would have broken compatibility with Amazon Linux 2. Upon the request of Amazon, we chose to support Ubuntu 16.04 to avoid that compatibility break. NET 8 will be the last release to provide
glibc
compatibility for Amazon Linux 2, such that we can move forward to targeting Ubuntu 18.04. This means that the Linux support matrix for .NET 8 and 9 will be significantly different.Ubuntu
glibc
versions:Here are some other distributions (bolded distro versions are compatible):