29

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)

3 Answers 3

23

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

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

2.34     1 Aug 2021    ?   (same as 2.26?)
2.33     1 Feb 2021    ?   (same as 2.26?)
2.32     5 Aug 2020    ?   (same as 2.26?)
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 11 Bullseye    2.31             3.2 ?
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 Release Timeline
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
Ubuntu glibc MIN_KERNEL_SUPPORTED

1
5

According to the project's README you can use glibc 2.4 with kernels older than 2.6, but you will lose some functionality:

When working with Linux kernels, the GNU C Library version 2.4 is intended primarily for use with Linux kernel version 2.6.0 and later. We only support using the NPTL implementation of pthreads, which is now the default configuration. Most of the C library will continue to work on older Linux kernels and many programs will not require a 2.6 kernel to run correctly. However, pthreads and related functionality will not work at all on old kernels and we do not recommend using glibc 2.4 with any Linux kernel prior to 2.6.

Note that --enable-kernel=VERSION means:

compile for compatibility with kernel not older than VERSION

1
  • Nice answer, but nowadays outdated.
    – pevik
    Jun 16, 2020 at 19:19
5

You can check in in the sources. General dependency is defined in sysdeps/unix/sysv/linux/configure.ac and currently (in master branch, before 2.32 release) is: 3.2.0

There are some architecture specific dependencies, search for arch_minimum_kernel in sysdeps/unix/sysv/linux/[arch]/configure, e.g. in the current master branch (before 2.32 release):

Although this is not 100% correct, see RISC-V change in NEWS: 64-bit RISC-V requires a minimum kernel headers version of 5.0.

1
  • Most useful answer for me
    – nodakai
    Jan 7, 2022 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.