Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Why separate packages for kernel headers and sources?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Duplicate Threads
View previous topic :: View next topic  
Author Message
Hanu
n00b
n00b


Joined: 05 Jul 2005
Posts: 1

PostPosted: Tue Jul 05, 2005 12:20 pm    Post subject: Why separate packages for kernel headers and sources? Reply with quote

Most linux distros have a symlink from /usr/include/linux to /usr/src/linux/include/linux but on my Gentoo system there is one package with kernel sources:

Code:
sauron src # emerge -s gentoo-sources
Searching...
[ Results for search key : gentoo-sources ]
[ Applications found : 1 ]

*  sys-kernel/gentoo-sources
      Latest version available: 2.6.11-r11
      Latest version installed: 2.6.11-r11


and one package for kernel-headers

Code:
sauron src # emerge -s linux-headers
Searching...
[ Results for search key : linux-headers ]
[ Applications found : 1 ]

*  sys-kernel/linux-headers
      Latest version available: 2.6.8.1-r4
      Latest version installed: 2.6.8.1-r4


I find this really strange 8O. Shouldn't the kernel headers version exactly match the kernel sources version?

I did a diff and found plenty of differences:

Code:
sauron src # diff -u /usr/src/linux-2.6.11-gentoo-r11/include/linux /usr/include/linux | wc -c
933713


Can't I simply unmerge linux-headers and create the symlink manually? It appears that no other package depends on linux-headers:

Code:
sauron src # equery d linux-headers
[ Searching for packages depending on linux-headers... ]
sauron src #
Back to top
View user's profile Send private message
avendesora
Veteran
Veteran


Joined: 16 Aug 2002
Posts: 1739
Location: Betelgeuse vicinity

PostPosted: Tue Jul 05, 2005 1:24 pm    Post subject: Reply with quote

No! The linux headers in /usr/include do not need to match those of your current kernel,
but _need_ to be those that your glibc was compiled against (search forums/google for
explanations). Do _not_ symlink /usr/include/linux to /usr/src/linux.
Back to top
View user's profile Send private message
kallamej
Administrator
Administrator


Joined: 27 Jun 2003
Posts: 4923
Location: Gothenburg, Sweden

PostPosted: Tue Jul 05, 2005 1:30 pm    Post subject: Reply with quote

https://forums.gentoo.org/viewtopic-t-199224.html seems like one of the better threads on the subject.

Moved from Portage & Programming to Duplicate Threads.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Duplicate Threads All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum