View previous topic :: View next topic |
Author |
Message |
jongeek Tux's lil' helper
Joined: 13 Jul 2007 Posts: 135 Location: The Humid, Festering Swamps of Florida
|
Posted: Fri Jul 13, 2007 11:22 pm Post subject: linux-headers > gentoo-sources ? |
|
|
My weekly "emerge --sync" cron job went off this morning, and I see that there is a new linux-headers version available. But the linux-headers version is greater than the stable gentoo-sources version. So is it safe to install linux-headers-2.6.21 when my current kernel is 2.6.20-r8 ?
I know it is safe to have a newer kernel than the version of kernel headers installed, but is it safe to have newer headers than the kernel itself ? I usually recompile glibc when new linux-headers are available, but I am concerned about running software compiled against headers for 2.6.21 when the latest stable kernel is 2.6.20.
For now, I'm holding off. What say ye ? |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10590 Location: Somewhere over Atlanta, Georgia
|
Posted: Fri Jul 13, 2007 11:30 pm Post subject: |
|
|
The short answer is, "Yes." The Gentoo devs won't let it go stable until it's okay. Furthermore linux-headers are mostly used while compiling glibc.
- John |
|
Back to top |
|
|
jongeek Tux's lil' helper
Joined: 13 Jul 2007 Posts: 135 Location: The Humid, Festering Swamps of Florida
|
Posted: Sat Jul 14, 2007 1:58 am Post subject: |
|
|
john_r_graham wrote: | The short answer is, "Yes." The Gentoo devs won't let it go stable until it's okay. Furthermore linux-headers are mostly used while compiling glibc.
- John |
Thanks. Anyone care to provide the long answer ? I'm curious, and not that I don't trust the devs, but I like to know things. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10590 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Jul 14, 2007 3:10 am Post subject: |
|
|
Okay, you understand that a package has to include something from linux-headers to be affected by it, right? Well, very few packages do. Try running Code: | equery depends linux-headers | on your machine. The packages that show a dependency instead on virtual/os-headers are known to work with any version of linux-headers in the tree.
You'll see sys-libs/glibc on the list. There's an einfo message in the linux-headers ebuild that tells you that you probably should re-emerge glibc after a new version of linux-headers.
Better?
- John |
|
Back to top |
|
|
jongeek Tux's lil' helper
Joined: 13 Jul 2007 Posts: 135 Location: The Humid, Festering Swamps of Florida
|
Posted: Sat Jul 14, 2007 1:23 pm Post subject: |
|
|
john_r_graham wrote: | Okay, you understand that a package has to include something from linux-headers to be affected by it, right? Well, very few packages do. Try running Code: | equery depends linux-headers | on your machine. The packages that show a dependency instead on virtual/os-headers are known to work with any version of linux-headers in the tree.
You'll see sys-libs/glibc on the list. There's an einfo message in the linux-headers ebuild that tells you that you probably should re-emerge glibc after a new version of linux-headers.
- John |
Thanks for helping me try to understand this. It's not the dependencies - I know that linux-headers doesn't affect a lot of packages. Let me be more explicit. After I emerge linux-headers-2.6.21 I _will_ re-emerge glibc. So, some parts of the kernel interface have changed between 2.6.20 and 2.6.21. Let's say some kernel struct has changed size, or had some other interface change. And I am still running 2.6.20, so glibc is now sending struct xyz with size n, whereas my kernel is still expecting struct xyz with size m. Cause for trouble, no ? Simple example, but I think it illustrates the point.
The fact that the devs have marked 2.6.21 headers as stable means they have probably checked for these problems already, and decided it is okay. But it doesn't seem, well, good practice, to run newer headers than the kernel you have. So I feel like there is something I don't understand that makes this okay. I checked the linux-headers changelog, which led me to bug #184691, and this comment by one the devs:
SpanKY wrote: |
------- Comment #5 From SpanKY 2007-07-13 20:00:30 0000 [reply] -------
which is irrelevant ... you can have newer kernel headers than kernel |
That's the part I don't quite get. You wouldn't re-compile mplayer against the headers for a newer version of libavformat and libavcodec, and then not install the new shared libraries. I mean this is just standard C coding practice. You compile against the headers for the version you actually have installed. |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10590 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Jul 14, 2007 3:14 pm Post subject: |
|
|
I think you're over thinking this. One of the major goals of the kernel developers is backwards compatibility at the source and binary level. New data types, constants, and so forth in the headers will not be used by older programs, whether they are recompiled or not. Old data types, constants, and so forth are either left alone (most commonly) or modified very carefully with backwards compatibility as the paramount concern.
- John |
|
Back to top |
|
|
jongeek Tux's lil' helper
Joined: 13 Jul 2007 Posts: 135 Location: The Humid, Festering Swamps of Florida
|
Posted: Sat Jul 14, 2007 5:09 pm Post subject: |
|
|
john_r_graham wrote: | I think you're over thinking this. One of the major goals of the kernel developers is backwards compatibility at the source and binary level. New data types, constants, and so forth in the headers will not be used by older programs, whether they are recompiled or not. Old data types, constants, and so forth are either left alone (most commonly) or modified very carefully with backwards compatibility as the paramount concern.
- John |
OK, I think I have to agree with you about overthinking this.
Thanks a lot for your help, and patience. I've been reading these forums for a couple of years, but this is the first time I've posted, and I appreciate the explanations. Time to emerge ! |
|
Back to top |
|
|
John R. Graham Administrator
Joined: 08 Mar 2005 Posts: 10590 Location: Somewhere over Atlanta, Georgia
|
Posted: Sat Jul 14, 2007 5:25 pm Post subject: |
|
|
Heh. This is Gentoo. It's always time to emerge.
You're welcome, though.
- John |
|
Back to top |
|
|
|
|
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
|
|