View previous topic :: View next topic |
Author |
Message |
pappy_mcfae Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/2063135933479eedb93987b.jpg)
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Mon Jan 14, 2008 9:38 am Post subject: headers_install: good thing or ! ? |
|
|
I was wondering what the general consensus is about installing headers when you compile a new kernel. According the folks at the Slackware forum, entering the command "make headers_install" is a bad thing...and will reduce one's computer to smoldering ashes. Ok, perhaps it's not that bad, but I was warned of all manner of evil that was sure to befall my system just by thinking the command near it.
Curiously, I was never given a time schedule when the destruction of my system was supposed to happen. That particular Slackware install ran from the time that Slack-12 was released (June, 2007) until I decided to kick Slackware to the curb in favor of Gentoo. That was about a week ago. One of the first things I did was compile a new, compact kernel...and install the headers from it.
In the lifetime of that install, I never had one single problem. Not one executable failed. Not the pre-compiled ones that come on the disk, and not the additional stuff I wound up having to compile because Slackware didn't have a dedicated package. I never had one problem with the system, other than the attendant miseries that come with Slackware 12.
I was told issuing that command would lead to all manner of problems, and that I could do it if I recompiled glibc. Well, I couldn't help but notice that when I did the emerge --emptytree system on the machines on which I have installed Gentoo that glibc gets recompiled. It sure didn't seem as frightening as it was painted. If this happens, am I wrong in thinking that make headers_install isn't the bogeyman I've been lead to believe that it is?
I really would like to know from a group of people who would be in a position to really know, one way or the other.
Thanks for your time and consideration.
Blessed be!
Pappy |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Sadako Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/2074682074aea79062b33b.jpg)
Joined: 05 Aug 2004 Posts: 3792 Location: sleeping in the bathtub
|
Posted: Mon Jan 14, 2008 4:14 pm Post subject: |
|
|
It's not a good idea.
The headers in gentoo are installed by the sys-kernel/linux-headers package, and these are the include files everything else is built against, so they should not be changed/updated at random.
From the linux-headers ebuild;
Quote: | Kernel headers are usually only used when recompiling your system libc, as
such, following the installation of newer headers, it is advised that you
re-merge your system libc.
Failure to do so will cause your system libc to not make use of newer
features present in the updated kernel headers. |
There have been quite a few threads about this, so search for some more detailed discussion. _________________ "You have to invite me in" |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
Dominique_71 Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/8878940535065700927c31.jpg)
Joined: 17 Aug 2005 Posts: 1923 Location: Switzerland (Romandie)
|
Posted: Thu Jan 17, 2008 9:01 pm Post subject: |
|
|
I was not aware of the "make headers_install". I done a search but found almost nothing in the forum about linux-headers against "make headers_install". And I find that this is a very interesting issue.
With google, I find that the LSF is using "make headers_install". Gentoo is using a different way (linux-headers), but it must be possible to switch. The LSF is installing the kernel headers with the toolchain creation: Installation of Linux-Headers:
Code: | make mrproper
make headers_check
make INSTALL_HDR_PATH=/usr headers_install |
Look at the link for complete instructions. (And for LSF summary for the whole things. They are installing all 2 times like in a stage 1 install.
Later, after the final toolchain installation, they are installing the kernel. Is is a big warning at that step: Quote: | Also, the headers in the system's include directory should always be the ones against which Glibc was compiled, that is, the sanitised headers from the Linux kernel tarball, and therefore, should never be replaced by the raw kernel headers. |
So, if I understand well, the "sanitised headers from the Linux kernel tarbal" are the one installed just after mrproper, when the "raw kernel headers" will implies to just copy them or something like that.
The fact is that those headers (from linux-headers or from the kernel) are used in both cases to build the toolchain that will build the toolchain. In both cases, you must get a stable and consistent toolchain and system.
So now the big question: in order to switch to the kernel headers on an already installed system, is it enough to install the sanitised headers from the Linux kernel tarball, re-merge the libc, and issue an "emerge -ea world", or is it necessary to do a more involved process, and if yes, which process? _________________ "Confirm You are a robot." - the singularity |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pappy_mcfae Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/2063135933479eedb93987b.jpg)
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Wed Feb 06, 2008 7:08 am Post subject: |
|
|
OK, well, I did an emerge --sync followed by a emerge --newuse --update world, and that installed new kernel headers on the machine in question, which is currently running vanilla-sources-2.6.23.14. I believe it was originally built upon gentoo-sources-2.6.19.r-something... (I dumped that kernel right after I finished the emerge --emptytree --system after the initial install).
Since the new headers were installed, and glibc wasn't on the list of packages to be updated, would it be a wise idea to reemerge glibc, then follow that with a complete reinstall of everything? Somehow, I get the feeling that's an option I might want to consider. Is this the case?
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
schachti Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/17240378884464519a52d60.jpg)
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
Posted: Wed Feb 06, 2008 7:23 am Post subject: |
|
|
pappy_mcfae wrote: | Since the new headers were installed, and glibc wasn't on the list of packages to be updated, would it be a wise idea to reemerge glibc |
Yes, you should re-emerge glibc afterwards - IIRC, this is also what the emerge output says.
pappy_mcfae wrote: |
then follow that with a complete reinstall of everything?
|
No - AFAIK, glibc is the only package that uses the headers. _________________ Never argue with an idiot. He brings you down to his level, then beats you with experience.
How-To: Daten verschlüsselt auf DVD speichern. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pappy_mcfae Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/2063135933479eedb93987b.jpg)
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Wed Feb 06, 2008 7:50 am Post subject: |
|
|
Thanks so much. I am emerging glibc even as I type this.
Blessed be!
Pappy _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
schachti Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
![](images/avatars/17240378884464519a52d60.jpg)
Joined: 28 Jul 2003 Posts: 3765 Location: Gifhorn, Germany
|
Posted: Wed Feb 06, 2008 8:00 am Post subject: |
|
|
If you do that, keep in mind to also use a recent kernel (the safest way is to keep the kernel version and the version of linux-headers used to compile glibc in sync). According to what I have read in the forums, it's ok to use a recent kernel together with a glibc that is compiled using older header files - however, some newer kernel features might not work then (but the system will work flawlessly). If, on the other hand, the kernel is older than the linux-headers package used for compiling glibc, you might run into trouble.
In one other thread, someone wrote that after recompiling glibc, he got strange errors - the problem was solved by recompiling the kernel (after re-emerging glibc and rebooting). So if you system behaves strange after re-emerging glibc and rebooting, try to recompile your kernel.
So as a conclusion from some threads in the forum, I always do it this way:
* keep the kernel and the linux-headers in sync (if the kernel is 2.6.23-rX, also use linux-headers 2.6.23)
* after updating linux-headers, re-emerge glibc, reboot, and rebuild the new (matching) kernel
This might not be necessary, however, it should be safe. ![Wink :wink:](images/smiles/icon_wink.gif) _________________ Never argue with an idiot. He brings you down to his level, then beats you with experience.
How-To: Daten verschlüsselt auf DVD speichern. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pappy_mcfae Watchman
![Watchman Watchman](/images/ranks/rank-G-2-watchman.gif)
![](images/avatars/2063135933479eedb93987b.jpg)
Joined: 27 Dec 2007 Posts: 5999 Location: Pomona, California.
|
Posted: Wed Feb 06, 2008 9:14 am Post subject: |
|
|
schachti wrote: | If you do that, keep in mind to also use a recent kernel (the safest way is to keep the kernel version and the version of linux-headers used to compile glibc in sync). According to what I have read in the forums, it's ok to use a recent kernel together with a glibc that is compiled using older header files - however, some newer kernel features might not work then (but the system will work flawlessly). If, on the other hand, the kernel is older than the linux-headers package used for compiling glibc, you might run into trouble.
In one other thread, someone wrote that after recompiling glibc, he got strange errors - the problem was solved by recompiling the kernel (after re-emerging glibc and rebooting). So if you system behaves strange after re-emerging glibc and rebooting, try to recompile your kernel.
So as a conclusion from some threads in the forum, I always do it this way:
* keep the kernel and the linux-headers in sync (if the kernel is 2.6.23-rX, also use linux-headers 2.6.23)
* after updating linux-headers, re-emerge glibc, reboot, and rebuild the new (matching) kernel
This might not be necessary, however, it should be safe. ![Wink :wink:](images/smiles/icon_wink.gif) |
Which is an acceptable option on my desktop system, since it is running on the 2.6.23.14 kernel. It doesn't have wireless networking on it, which is why I run that kernel.
However, on my laptops, ndiswrapper doesn't work with 2.6.23.x version kernels (or should I say, if it does, I can't get it to work). That means there's no way on this planet or any other that I will consider using 2.6.23.x version kernels on either machine. Also, as anyone who has cruised the forum knows, 2.6.24 and Broadcom (and a few other) wireless adapters aren't playing well with each other. It's either that or wpa_supplicant...and as of yet, the question remains unanswered...bummer!
That leaves my only option keeping the vanilla 2.6.22.16 and 2.6.22-gentoo-r9 kernels. Since the 2.6.23 and 2.6.22 lines were being simultaneously developed, I think I should be safe for a few months, anyway.
I'm keeping my fingers crossed on the 2.6.24 situation. It looks like there's some cool stuff in that package. However, if it can't support my wireless, it's useless to me.
Oh, by the way, thanks for being so prompt in your replies. I appreciate that.
Blessed be!
Pappy
EDIT: In a strange twist of irony, the newest addition to the kernel dot org site is kernel version 2.6.22.17. It is now, technically the newest kernel. |Doing happy dance|...now perhaps I can update my kernel, and keep ndiswrapper/wpa_supplicant wireless functionality. I sure hope that new kernel version makes it to portage, soon. _________________ This space left intentionally blank, except for these ASCII symbols. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|