On Sat, Oct 8, 2022 at 11:21 AM Scott J. Crouch <scottjcrouch@xxxxxxxxx> wrote:
On 8/10/22 15:01, neutrino network wrote:
> How to update linux-headers for kernel (6.0.0) compiled from source in centos?
>
> System has kernel 4.18 headers while kernel is 6.0, however userspace program generates error e.g*fatal error: linux/mutex.h: No such file or directory*
linux/mutex.h is a kernel header. User-space programs don't use those.
Are you trying to compile an out-of-tree module by any chance? If so, you should
probably install the kernel development headers packaged by your distribution,
and point your makefile to those (or you can just point it to the directory where
you built your kernel).
Hope that helps.
Scott.
>> linux/mutex.h is a kernel header. User-space programs don't use those. Are you trying to compile an out-of-tree module by any chance?
This is a test on a patched kernel. The patch has an API for userspace programs.
>> If so, you should probably install the kernel development headers packaged by your distribution,
Trying to install headers with "sudo yum -y install kernel-headers" returns that headers are already installed even its removal reinstall the old kernel headers
Tried also "yum install kernel-headers-$(uname -r)
" !>> and point your makefile to those (or you can just point it to the directory whereyou built your kernel).
How can my application point to the kernel source, does it require settings in glibc?
Tried "make headers_install" in kernel source but still faced the error issue ! btw if a destination directory is passed e.g "make headers_install INSTALL_HDR_PATH=/usr/include", i found that "net" directory is missing in the destination directory it only place some files and not all, am i using it correctly?
Note: I don't "make install" after any of above commands
Regards
_______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx https://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies