Kernel & kernel-headers versions

The current kernel version on F34 is 5.12.7 but the kernel header is at 5.12.5.
Shouldn’t these two packages be in sync?
I have some dkms kernel modules that aren’t building and I think this is the problem.

Kernel headers only get updated when there is a change. That is the current version.

3 Likes

This topic pops up quite often:

Search results for 'kernel-headers' - Fedora Discussion && Search results for 'kernel headers' - Fedora Discussion

2 Likes

Kernel-headers packages are used for building userspace applications, not for dkms kernel modules. The kernel-devel package is what is used for building kernel-modules, and is always built with new kernels. I typically only rebuild kernel-headers if a stable release has changed the actual uapi headers. Laura Abbott did a great blog post about this if you want more detail.

4 Likes

Thanks. It turns out that the build failure was caused by a change in a kernel module header; however, I’d swear I saw a warning about kernel-headers when I installed an update.

1 Like

DKMS will complain about not finding kernel headers. It is somewhat confusing in that drivers need headers from the built kernel to build. Those are in the kernel-devel package, which generally matches the format most things use. libfoo is the library you might use or link against, libfoo-devel is the development files and headers to build something against libfoo. But there is also a section of kernel headers that userspace uses to build programs, it does things like defining syscalls and such, these are the userspace api bits. That is what is in the “kernel-headers” package, and the kernel source tree installs those with ‘make headers_install’. Sadly, the terminology is confusing, and technically correct in both cases, as both things need headers from the kernel, but different sets of headers.

3 Likes