net*_*ope 22 linux kernel compatibility glibc
显然可以编译 glibc--enable-kernel
以支持旧的内核版本。但是,我无法找到有关特定 glibc 版本支持哪些内核版本的信息。理想情况下,我希望看到每个 glibc (2.x) 和内核 (2.6.x) 版本的兼容性矩阵。它存在吗?
如果它不存在,也许是因为每个 glibc 版本(在过去 5 年左右)都支持自 2.6.0 以来的所有内核?
(Arch = x86-64,如果这很重要)
mpb*_*mpb 16
对于某些版本的glibc
,公告电子邮件会说明兼容哪些内核版本。
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.
Run Code Online (Sandbox Code Playgroud)
可以通过跟踪和阅读更多旧(或新)版本的公告电子邮件来扩展上表glibc
。
以供参考:
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 ?
Run Code Online (Sandbox Code Playgroud)
来源:
GNU C 库发布时间表
GNU C 库 (glibc)
GNU C 库 2.27 版现已发布
GNU C 库 2.26 版现已发布
GNU C 库 2.25 版现已发布
GNU C 库 2.24 版现已发布可用的
DistroWatch.com:Ubuntu
您可以检查来源。一般依赖项在sysdeps/unix/sysv/linux/configure.ac中定义,当前(在 master 分支中,2.32 版本之前)是:3.2.0
有一些特定于架构的依赖项,请arch_minimum_kernel
在 中搜索sysdeps/unix/sysv/linux/[arch]/configure
,例如在当前 master 分支(2.32 版本之前)中:
虽然这不是 100% 正确,但请参阅新闻中的 RISC-V 更改:64 位 RISC-V 要求最低内核头版本为 5.0。
根据该项目的自述文件,您可以将 glibc 2.4 与早于 2.6 的内核一起使用,但您将失去一些功能:
使用 Linux 内核时,GNU C 库版本 2.4 主要用于 Linux 内核版本 2.6.0 及更高版本。我们仅支持使用 pthreads 的 NPTL 实现,这是现在的默认配置。大多数 C 库将继续在较旧的 Linux 内核上工作,并且许多程序不需要 2.6 内核即可正确运行。但是,pthreads 和相关功能在旧内核上根本不起作用,我们不建议将 glibc 2.4 与 2.6 之前的任何 Linux 内核一起使用。
请注意,这--enable-kernel=VERSION
意味着:
编译以与不早于版本的内核兼容