LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-29-2009, 03:01 PM   #1
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Rep: Reputation: 17
Question 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.

Thanks
 
Old 07-29-2009, 03:13 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
http://lkml.indiana.edu/hypermail/li...07.3/0587.html
 
Old 07-29-2009, 03:42 PM   #3
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
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.
 
Old 07-29-2009, 04:49 PM   #4
epilitimus
Member
 
Registered: Jul 2009
Distribution: Slackware
Posts: 35

Original Poster
Rep: Reputation: 17
Talking

Okay, got it.

It just wasn't the way I was used to.

Thanks for the info, my world is now stable again
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
do kernel headers come with kernel-source package? janos Linux - Kernel 1 05-30-2006 09:38 AM
Kernel headers and kernel source Gryphonsword MEPIS 1 05-28-2006 01:57 PM
trying to find/install kernel-source or kernel-headers timsch75 Slackware 3 10-22-2005 09:17 AM
need kernel-source/headers Foress_89 Linux - Hardware 2 10-04-2005 06:22 AM
Difference between kernel-headers kernel-source twinkers Debian 2 06-18-2005 11:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:55 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration