kernel headers - why not use actual ones from the kernel source?
Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
kernel headers - why not use actual ones from the kernel source?
Hello,
I recently upgraded from a fairly old distro to a recent one (slackware 12.2 in case it matters) that came with the 2.6.27.7 kernel.
One of the things I noticed is that the kernel headers aren't accessed by a link like they used to be. I am used to /usr/include/linux being a link to the /usr/src/linux/include/linux and the asm stuff being similarly linked to the relevant kernel source directory. Now they are actual directories. When I do diff on a random file in the /usr/include/linux directory compared to the matching file in the installed source tree they come up different.
All this came up because I am in the process of upgrading the kernel. I did a search on the subject and came up with a thread saying that you didn't need to worry about it, and in fact shouldn't use the actual kernel headers, but no explanation.
So my question, why not? My instincts say that if I am compiling stuff against a kernel I should be using that kernel's headers.
If there is a complete explanation somewhere a link to it would be great.
This is one of those questions where I have trouble seeing the point. When I compile a kernel, I don't do anything in particular about kernel headers. Anything that actually needs to reference headers can find them through /lib/modules/`uname -r` anyway. Of course, I don't remove my kernel source trees, so that's one possible issue. IOW, if you must remove your kernel source trees, then you'll need to make the headers.
At this time, the only thing I can think of that I use that's an issue is VirtualBox and my Nvidia driver.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.