<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Oct 8, 2022 at 11:21 AM Scott J. Crouch <<a href="mailto:scottjcrouch@gmail.com">scottjcrouch@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 8/10/22 15:01, neutrino network wrote:<br>
> How to update linux-headers for kernel (6.0.0) compiled from source in centos?<br>
> <br>
> 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*<br>
<br>
linux/mutex.h is a kernel header. User-space programs don't use those.<br>
<br>
Are you trying to compile an out-of-tree module by any chance? If so, you should<br>
probably install the kernel development headers packaged by your distribution,<br>
and point your makefile to those (or you can just point it to the directory where<br>
you built your kernel).<br>
<br>
Hope that helps.<br>
<br>
Scott.<br></blockquote><div> </div><div>>> 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? </div><div>This is a test on a patched kernel. The patch has an API for userspace programs.</div><div><br></div><div>>> If so, you should probably install the kernel development headers packaged by your distribution,</div><div>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</div><div> Tried<span style="font-family:arial,sans-serif"> <font size="2">also "yum install kernel-headers-$(uname -r)<span style="font-family:arial,sans-serif"><code></code> " !</span></font></span><br></div><div><br></div><div></div><div></div><div>>> and point your makefile to those (or you can just point it to the directory whereyou built your kernel).</div><div>How can my application point to the kernel source, does it require settings in glibc?<br></div><div><br></div><div>Tried "make headers_install" in kernel source but still faced the error issue ! btw if a destination directory is passed e.g "<span style="color:rgb(0,0,0)">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?<br></span></div><div><br></div><div>Note: I don't "make install" after any of above commands</div><div><br></div><div>Regards<br></div></div></div>