mainline kernel now depends on libc6 2.33, non-installable in focal?

Solution 1:

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" -> ""

Solution 2:

I was able to install 5.12 on Ubuntu 20.04 with libc6 2.31 using the mentioned ppa:

sudo add-apt-repository ppa:tuxinvader/lts-mainline

sudo apt install linux-image-unsigned-5.12.4-051204-generic linux-modules-5.12.4-051204-generic linux-headers-5.12.4-051204-generic

Solution 3:

Here is how i made dkms modules generated with kernel 5.11.18 from ubuntu mainline-kernel. I run Linux Mint 20.1 Cinnamon and use nvidia-driver-460 version 460.73.01-0ubuntu0.20.04.1 in dkms. The gcc I use is version 10.3. Everything worked fine with ver 5.11.16-generic but stopped when i tried 5.11.18. So I tried to find the problem why dkms did not compiled the kernel modules. This is what I did:

  1. Installed kernel 5.11.18-generic
  2. Found that in kernel headers program fixdep relates to glibc 2.33
  3. Found that in kernel headers program modpost relates to glibc 2.33
  4. Replaced /lib/modules/5.11.18-generic/build/scripts/basic/fixdep with the one in 5.11.16
  5. Replaced /lib/modules/5.11.18-generic/build/scripts/mod/modpost with the one in 5.11.16
  6. Ran dkms against kernel 5.11.18 (/usr/lib/dkms/dkms_autoinstaller start 5.11.18-051118-generic)
  7. Successfully generated nvidia kernel modules. Rebooted and it works ok. Even tried the same with kernel 5.12.1 and it worked.

Hope this helps.