the installed/available version of kernel-headers does not match the current kernel:
dnf list kernel.* kernel-devel* kernel-headers-*
Is version 5.4.7-200 of kernel-headers identical to version 5.4.15-200?
It’s not necessary to rebuild them everytime.
This recently came up on the kernel mailing list.
As it is shown in one of the Learn C++ © lessons (it isn’t exact copy;
// means comments):
// something.cpp -- source file
// definitions (and declarations? I'm forget)
// void: function doesn't return anything to the caller
// a: name of the function
// (): function doesn't accept arguments == function has no parameters
// call to b()
// just to simplify
Trouble is: Compilers make their job line by line. a() should know what b() is before calling it. Same goes for b(). To not … play with all of such things (and place functions somewhere inside of sources “between this and that”), and to provide other advantages, the header files were invented:
// something.h -- header file
// Header guard. I'd forget how to do this.
// declarations (not definitions!)
// compiler will be unaware about the implementation,
// but it wll be aware of this functions "ins" and "outs"
// something.cpp -- sources file, again
/* use it as "forward declaration"
* to make the compiler know what a(), b() and such is.
Summary: If your’d modified a() or b()'s implementation, but neither their return types, nor their parameters, there is no need to update the header file.
// something.cpp -- again: source file
// update !
void a(char c, int d)
// no update...
PS: Linux written in C, not in C++.
Thank you for the information.
In my opinion this isn’t a good a solution because matching version numbers would allow to easily verify matching packages and also allows to use $(uname -r). Oracle Virtualbox, nvidia, and I guess other sources suggest to verify/use this:
The running kernel and the kernel header files must be updated to matching versions.
The kernel headers and development packages for the currently running kernel can be installed with:
sudo dnf install kernel-devel-(uname -r) kernel-headers-(uname -r)
And the people would need to guess in which versions of the Kernel the changes to headers were maded?
Last changes were maded in 5.4.7, so i
know think that the developers’ work was a maintenance work up to the (at least) 5.4.15 Kernel. Adding anything new, or changing existing things would require the developers to update the headers.
I think I pointed out why. And I think that for the majority it is confusing and not relevant to know when changes have been made. This information is relevant for developers.
BTW, your link to GenToo was not helpful as it states that headers can be newer.
Anyways, I do not want to start a basic disussion about this and I accepted the answer.
Last one from me, please:
a b c
a b c
kh-1.1 == kh-1.2
→ 5.4.7 isn’t older than 5.4.15!
And for the people with a “tricky” hardwares!
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.