You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Ubuntu 22.04: 2.35
Ubuntu 20.04: 2.31
Ubuntu 18.04: 2.27
Ubuntu 16.04: 2.23
Here are some other distributions (bolded distro versions are compatible):
AlmaLinux 8: 2.28
AlmaLinux 9: 2.34
Amazon Linux 2023: 2.34
Amazon Linux 2: 2.26
CentOS 7: 2.17
CentOS Stream 9: 2.34
Debian 11: 2.31
Debian 12: 2.36
Arch Linux 20230723.0.166908: 2.37
Fedora 37: 2.36
Fedora 38: 2.37
Activity
ghost added
needs-area-labelAn area label is needed to ensure this gets routed to the appropriate area owners
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?
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.
@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.
Activity
richlander commentedon Sep 8, 2023
/cc @socketnorm @dotnet/distro-maintainers
am11 commentedon Sep 9, 2023
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
debootsrapto 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-0ubuntu6in rootfs). This way we will end up with "old libc and new $everythingElse". Note that we don't "execute" anything in rootfs environment aside fromapt installet al. during the creation of docker layer.If we set it up this way, would this satisfy everyone?
tmds commentedon Sep 9, 2023
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
jkoritzinsky commentedon Sep 9, 2023
@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.
jkotas commentedon Sep 9, 2023
Agree. It can complicate the RHEL build bootstrapping though.
tmds commentedon Sep 10, 2023
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).
normj commentedon Sep 10, 2023
Acknowledging from AWS and we will be encouraging users to migrate to Amazon Linux 2023.
richlander commentedon Sep 11, 2023
We could target 18.04 instead. There is no pressing reason to move to 20.04. Would that resolve the challenges?
tmds commentedon Sep 11, 2023
Yes. If you can use Ubuntu 18.04, that would be preferable.
richlander commentedon Feb 14, 2024
I updated this doc to Ubuntu 18.04. Sorry for the delay.
Build against Y2038-compatible glibc for linux arm32 (#102410)
Build against Y2038-compatible glibc for linux arm32 (dotnet#102410)
Build against Y2038-compatible glibc for linux arm32 (dotnet#102410)
agocke commentedon Aug 17, 2024
Closing this. I don't think we're going to change anything unless there's a specific reason.
richlander commentedon Aug 19, 2024
Just in time to create a new one for .NET 10!