Linux – Can new glibc versions be used with an old kernel

compatibilityglibckernellinux

Apparently glibc can be compiled with --enable-kernel to support older kernel versions. However, I haven't been able to find information on what kernel versions are supported on a particular glibc version. Ideally, I want to see a compatibility matrix for every glibc (2.x) and kernel (2.6.x) releases. Does it exist?

If it doesn't exist, perhaps it's because every glibc versions (in the last 5 years or so) supports all kernels since 2.6.0?

(Arch = x86-64, if that matters)

Best Answer

For some versions of glibc, the announcement email says which kernel versions are compatible.

glibc    Released      Requires Linux kernel version
----------------------------------------------------------

2.31     1 Feb 2020    ?   (same as 2.26?)
2.30     1 Aug 2019    ?   (same as 2.26?)
2.29     1 Feb 2019    ?   (same as 2.26?)
2.28     1 Aug 2018    ?   (same as 2.26?)
2.27     2 Feb 2018    ?   (same as 2.26?)
2.26     2 Aug 2017    3.2 (or higher)
2.25     5 Feb 2017    ?   (same as 2.24?)

2.24     4 Aug 2016    on i[4567]86 and x86_64  ->  2.6.32
2.24     4 Aug 2016    on other platforms       ->  3.2

Note 1:  Some minor architectures require a higher kernel version than
         listed above.

Note 2:  Your Linux distribution may vary from the above, as Glibc can
         optionally be configured at compile time to require a kernel
         version newer than the oldest supported version.

It may be possible to extend the above table by tracking down and reading more of the announcement emails for older (or newer) versions of glibc.

For reference:

Linux distribution    glibc version    Requires Linux kernel version

Debian 10 Buster      2.28             3.2 ?
Debian 9 Stretch      2.24 on x86      2.6.32
Debian 9 Stretch      2.24 on other    3.2

Ubuntu 20.04          2.31             3.2 ?
Ubuntu 18.04          2.27             3.2 ?
Ubuntu 17.10          2.26             3.2
Ubuntu 17.04          2.24             ? 
Ubuntu 16.10          2.24             ?
Ubuntu 16.04          2.23             ?

Sources:
The GNU C Library (glibc)
The GNU C Library version 2.27 is now available
The GNU C Library version 2.26 is now available
The GNU C Library version 2.25 is now available
The GNU C Library version 2.24 is now available
DistroWatch.com: Ubuntu

Related Question