LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Updating kernel headers /usr/include/linux (https://www.linuxquestions.org/questions/slackware-14/updating-kernel-headers-usr-include-linux-505609/)

mhansen 11-28-2006 12:26 PM

Updating kernel headers /usr/include/linux
 
Hi.

Is it necessary to upgrade the kernel headers (/usr/include/linux) when going from the 2.4 kernel to the 2.6? Silly me tried to remove the kernel-header-2.4 package (figured it was safe since I'm using 2.6.17.13), and, you guessed it, I couldn't compile the kernel/modules anymore.

I reinstalled the package and everything is fine, but I just can't remember ever having to manually upgrade the headers from my past experience (ok, I've been away a couple years -- maybe things changed, or I just forgot).

If I have to upgrade what is the best way to go about it?


Thanks,
Mike

Hendronicus 11-28-2006 12:40 PM

No, you don't have to replace the headers when upgrading your kernel from 2.4 to 2.6.
In fact, this is a bad idea since all your system libs and programs are originally built with those headers. Changing headers won't make most of that stuff stop working but it will make compiling new programs fail in some very interesting ways. I've done this before I knew better. It sounds like you re-installed the headers just fine. I say leave them be.

kodon 11-28-2006 12:42 PM

it is recommended to keep the kernel headers
of the kernel glibc was compiled against...
which would be 2.4.33.3 if you are up to date

mhansen 11-28-2006 12:44 PM

Thank you very much, both of you. I'll leave 'em alone. :)


Thanks,
Mike

gegechris99 11-30-2006 06:31 AM

On the 2nd install CD, you'll find this file: extra/linux-2.6.17.13/kernel-headers.WARNING

Quote:

This package of 2.6.x based /usr/include/linux and /usr/include/asm headers
is being provided by request for some people who need it in order to compile
ASDL modem drivers for 2.6.x. As a general rule, installing kernel headers
that are newer than the kernel glibc was compiled with *may* cause problems,
so unless you need these for a particular reason it's best to stick with the
2.4.x kernel-headers package for now.

Note -- if you compile with NPTL then you might want to use these headers,
and glibc's NPTL was compiled using 2.6 headers, so all should be well.
In that case, specify using NPTL libs and headers with these compile
options:

-I/usr/include/nptl -L/usr/lib/nptl

Good luck!

-P.
It says it all


All times are GMT -5. The time now is 06:10 AM.