Skip to content

[Draft] Breaking changes in ML.NET 7.0: Linux x64 OpenMP library name and glibc compatibility #7952

Todo

Description

@richlander

Important

Draft — subject to change. This notice describes planned changes and has not been approved by the ML.NET maintainers. Details, versions and guidance may change before release. Feedback is welcome.

Breaking changes: Linux native dependencies in ML.NET 7.0

The next major version of ML.NET (assumed to be 7.0.0) changes how its Linux native libraries are built. This has two customer-visible effects:

  1. x64 OpenMP library name: On Linux x64, Symbolic SGD now loads libomp.so.5 instead of libomp.so, the same name arm and arm64 already use.
  2. glibc compatibility: All Linux native assets now target the same glibc distro eras as the .NET 10 build. Some arm and arm64 assets now require newer distros.

There are no managed API changes. The packages' target frameworks don't change.

Background

ML.NET's Linux native assets were built two different ways:

RID Previous build New build
linux-x64 Native build in a CentOS Stream 8 container (end of life, image no longer maintained) Cross-build against an Ubuntu 18.04 sysroot
linux-arm64 Cross-build against an Ubuntu 16.04 sysroot (.NET 8 era) Cross-build against an Ubuntu 18.04 sysroot
linux-arm Cross-build against an Ubuntu 16.04 sysroot (.NET 8 era) Cross-build against an Ubuntu 22.04 sysroot

The new builds use the Azure Linux 4 .NET 11 cross-build images, which dotnet/runtime also uses. The build host is a current, maintained OS; the target sysroot determines which distros the binaries run on. For background, see dotnet/runtime#83428 and dotnet/runtime#109939, and the Linux build methodology. Tracking issue: #7925.

Change 1: x64 OpenMP library name (libomp.so → libomp.so.5)

Previous behavior

On Linux x64, libSymSgdNative.so (Microsoft.ML.Mkl.Components) depended on libomp.so, the unversioned name used by RHEL-family distros. On arm and arm64 it already depended on libomp.so.5.

New behavior

On every Linux architecture, libSymSgdNative.so depends on libomp.so.5. Both names refer to the same LLVM OpenMP runtime; only the file name the loader looks for has changed.

This doesn't change the existing x64 Intel MKL dependency: libMklImports.so still requires libiomp5.so.

Who is affected

Linux x64 apps that use Symbolic SGD on a system that provides libomp.so but not libomp.so.5, including Azure Linux, Fedora and RHEL-compatible distros. On those systems the load fails with an error like this:

libomp.so.5: cannot open shared object file: No such file or directory

Debian and Ubuntu install libomp.so.5 on the default library path with the libomp5 package. The released x64 binary needed libomp.so, which those distros put only under an LLVM-specific directory, not the default library path, so this change makes the x64 asset easier to use there.

How to update your environment

Debian and Ubuntu

sudo apt-get install -y libomp5      # provides libomp.so.5
sudo apt-get install -y libomp-dev   # x64 Intel MKL components: provides libiomp5.so

Verified on Ubuntu 24.04 and Debian 12.

Azure Linux, Fedora, RHEL, AlmaLinux and other RHEL-compatible distros

These distros ship the LLVM OpenMP runtime as /usr/lib64/libomp.so only; libomp-devel doesn't add libomp.so.5. Install libomp, then create the expected names, either next to your app or system-wide.

App-local (no system changes; good for containers and app deployments):

sudo dnf install -y libomp        # tdnf on Azure Linux
ln -s /usr/lib64/libomp.so <app-dir>/libomp.so.5
ln -s /usr/lib64/libomp.so <app-dir>/libiomp5.so   # x64 Intel MKL components only

System-wide:

sudo dnf install -y libomp        # tdnf on Azure Linux
sudo ln -s libomp.so /usr/lib64/libomp.so.5
sudo ln -s libomp.so /usr/lib64/libiomp5.so          # x64 Intel MKL components only
sudo ldconfig

For example, a Dockerfile for an app image:

FROM mcr.microsoft.com/dotnet/runtime:10.0-azurelinux4.0
RUN tdnf install -y libomp && tdnf clean all \
    && ln -s libomp.so /usr/lib64/libomp.so.5 \
    && ln -s libomp.so /usr/lib64/libiomp5.so

Azure Linux 3 doesn't provide an LLVM OpenMP (libomp) package, so Symbolic SGD needs another OpenMP source there (or use Azure Linux 4). This applies to 6.0.0 as well.

This guidance was validated with a Symbolic SGD train-and-evaluate smoke test (self-contained .NET 10 app) on Azure Linux 4, Fedora 43, and AlmaLinux 9 and 10, on x64 and arm64, using both app-local and system-wide links: https://github.com/richlander/machinelearning/actions/runs/45556406022

Note that released 6.0.0 Symbolic SGD also fails on these distros with only libomp installed: arm64 can't find libomp.so.5, and x64 can't find MKL's libiomp5.so. The same links fix both versions.

The same guidance is being added to platform-limitations.md in #7946.

Change 2: glibc compatibility

Key point: distro era, not .NET version

ML.NET packages still target the same frameworks. Which .NET versions can use ML.NET is unchanged. If your app can reference ML.NET 6.0 today, it can reference ML.NET 7.0.

What changes is the oldest Linux distro on which the native assets load. That's determined by the glibc version in the cross-build sysroot. It's independent of which .NET runtime the app uses.

  • ML.NET 6.0 built arm and arm64 against a .NET 8-era sysroot (Ubuntu 16.04).
  • ML.NET 7.0 builds against the .NET 10-era sysroots: Ubuntu 18.04 for x64 and arm64, and Ubuntu 22.04 for arm (the arm32 Y2038 baseline).

For example, a .NET 8 app using ML.NET 7.0 on Ubuntu 16.04 arm64 still runs .NET, but ML.NET's native assets fail to load because the distro's glibc is too old. The same app on Ubuntu 18.04 or later works. The minimums are the same as .NET 10's, so any distro that .NET 10 supports can run these assets.

New minimums

RID Minimum compatible distro era glibc
linux-x64 Ubuntu 18.04 2.27 (unchanged in practice)
linux-arm64 Ubuntu 18.04 2.27 (was 2.17)
linux-arm Ubuntu 22.04 2.35 (was 2.4)

Compatible glibc distros include (at the version shown or later): Ubuntu 18.04 (arm: 22.04), Debian 11 (arm: 12), RHEL / AlmaLinux 8, CentOS Stream 9, Amazon Linux 2023, Fedora 38, and Azure Linux 3. See dotnet/runtime#109939 for more distro glibc versions.

Measured changes in the candidate native assets, compared with the released 6.0.0 packages:

Asset 6.0.0 → 7.0 candidate
x64 SymSGD GLIBC_2.27 unchanged (and libomp.so → libomp.so.5, see change 1)
arm64 SymSGD and MatrixFactorization GLIBC_2.17 → GLIBC_2.27
arm64 Lda and MatrixFactorization GLIBCXX_3.4.21 → GLIBCXX_3.4.22
arm SymSGD GLIBC_2.4 → GLIBC_2.27; GLIBCXX_3.4.21 → GLIBCXX_3.4.29
arm Lda and MatrixFactorization GLIBC_2.4 → GLIBC_2.32; GLIBCXX_3.4.21 → GLIBCXX_3.4.30

ELF comparison of the native and MKL libraries against the released packages: https://github.com/richlander/machinelearning/actions/runs/45548312386

Who is affected

  • Apps on arm64 distros with glibc older than 2.27 (for example, Ubuntu 16.04).
  • Apps on arm32 distros older than the Ubuntu 22.04 era, such as Debian 10/11, Ubuntu 20.04, and Raspberry Pi OS based on Debian 11. .NET 9 and later already require this baseline on arm32.

Recommended action

Run on a distro at or above the minimums above. If you can't upgrade the OS, stay on ML.NET 6.x.

To check a system's glibc version:

ldd --version

Affected packages

Packages with Linux native assets (checked against the latest released versions):

Package Linux native asset Change 1 (OpenMP) Change 2 (glibc)
Microsoft.ML 6.0.0 libLdaNative.so No Yes (arm, arm64)
Microsoft.ML.Mkl.Components 6.0.0 libSymSgdNative.so Yes (x64) Yes (arm, arm64)
Microsoft.ML.Recommender 0.24.0 libMatrixFactorizationNative.so No Yes (arm, arm64)

Microsoft.ML.Recommender is versioned separately (0.x), so its next version would be the equivalent major update for that package.

Status

Activity

  1. added
    untriaged
    on Nov 25, 2026
  2. added
    area-Native
    on Nov 25, 2026
  3. added
    breaking-change
    on Nov 25, 2026
  4. added this to the ML.NET 7.0 milestone on Nov 26, 2026
  5. removed
    untriaged
    on Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area-Nativebreaking-change

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions