Kernel – Mainline Kernel Depends on libc6 2.33, Non-Installable in Focal

20.04compilingglibckernel

I've been happily installing 5.10 mainline kernels (from https://kernel.ubuntu.com/~kernel-ppa/mainline/) on my Ubuntu 20.04.

Trying to update to 5.10.33, I discovered an unwelcome dependency on libc >=2.33 (focal is at 2.31) for the -headers package (though not the image itself — but who wants to live without the headers).

AFAIK, libc6 is next to impossible to upgrade. Is this… it? Am I stuck at 5.10.32 unless I give up LTS? Do these folks even have a public-facing site where one can report bugs?

Update: This seems to be the main launchpad bug. A good thing that came out of it: tuxinvader has come up with a Docker container (source on Github: focal-mainline-builder) for building kernel mainline images and uploaded 5.12 packages to his "lts-mainline" PPA (no 5.10 or 5.11 yet).

Hopefully this problem will go away. But let's face it, depending on the whims of the "kernel mainline PPA" (or whoever is behind it, I still don't understand how these developers can be reached) for binaries has not been a pleasant experience.

Best Answer

You can stay with LTS, but you will need to compile the mainline kernels yourself to overcome the new dependency issue.

The mainline compiler version used seems to have just changed:

doug@s19:~/temp-k-git/linux$ scripts/diffconfig .config-5.12.0-051200rc6-lowlatency .config-5.12.0-051200-lowlatency
 CC_VERSION_TEXT "gcc (Ubuntu 10.2.0-13ubuntu1) 10.2.0" -> "gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0"
 GCC_VERSION 100200 -> 100300
 LD_VERSION 23501 -> 23601
+DEBUG_INFO_BTF_MODULES y
+PAHOLE_HAS_SPLIT_BTF y

But if I just take the Ubuntu kernel configuration and compile myself, on my main 20.04 test server, it installs fine. I.E. the dependency is a function of the compiler version used not the kernel source code.

Not really relevant but here is the config difference for what I compiled:

doug@s19:~/temp-k-git/linux$ scripts/diffconfig .config-5.12.0-051200-lowlatency .config
-DEBUG_INFO_BTF y
-DEBUG_INFO_BTF_MODULES y
-DEBUG_INFO_COMPRESSED n
-DEBUG_INFO_DWARF4 y
-DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT n
-DEBUG_INFO_REDUCED n
-DEBUG_INFO_SPLIT n
-GDB_SCRIPTS y
-PAHOLE_HAS_SPLIT_BTF y
 CC_VERSION_TEXT "gcc (Ubuntu 10.3.0-1ubuntu1) 10.3.0" -> "gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0"
 DEBUG_INFO y -> n
 GCC_VERSION 100300 -> 90300
 LD_VERSION 23601 -> 23400
 SYSTEM_TRUSTED_KEYS "debian/canonical-certs.pem" -> ""
Related Question