Slackware This Forum is for the discussion of Slackware Linux.
|
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-01-2014, 10:26 AM
|
#1
|
LQ Newbie
Registered: Oct 2014
Posts: 9
Rep:
|
Slackware, which kernel headers should be where?
I've never understood kernel headers well, and the few web explanations weren't great, so I need a few clarifications.
I understand that a compiled kernel provides headers to provide userspace access to kernel functions. Userspace libs (including glibc) and programs compiled against theses headers.
Now I believe that the kernel headers that the userspace is compiled against should never change, and that if they are changed, this would necessitate recompiling every lib and binary on the system to be technically correct and safe. Correct?
So in the case that I upgrade a distro by a version number (for example, slackware 14.0 to 14.1 via slackpkg), the kernel headers must be updated as well, because all of the prebuilt binaries will have been built against that new distro version kernel header package. Correct?
If the above is true, this should mean that any custom software such as slackbuilds packages need to be recompiled. Correct?
Also, if I understand correctly, if one builds a new kernel from source, the original older kernel headers should not change, correct? Out of curiosity, how does the linker know how to link system calls to a new and different installed kernel?
I'm asking in part because I like to know how things work. More practically, I am upgrading my slackware 14.0 box to 14.1 using slackpkg. I want to make sure I treat the headers appropriately. I always run a custom kernel and like to know that I'm doing things correctly.
Last edited by onebuck; 10-03-2014 at 12:08 PM.
Reason: correct subject title to be specific
|
|
|
10-02-2014, 11:43 AM
|
#2
|
Member
Registered: Jun 2012
Distribution: Slackware
Posts: 441
|
Hello. This document by Eric Hameleers (member of the Slackware team) explains very well how the kernel headers are related to glibc, to the kernel itself and to the software included in a given release of the distribution.
Building a Linux Kernel from source: Slackware kernel-headers package
If you are going from 14.0 to 14.1, the upgrade will include a new version of glibc which was compiled using newer kernel headers. For this reason you should upgrade the headers package as well.
Last edited by Philip Lacroix; 10-02-2014 at 11:56 AM.
Reason: typo
|
|
1 members found this post helpful.
|
10-03-2014, 12:09 PM
|
#3
|
Moderator
Registered: Jan 2005
Location: Central Florida 20 minutes from Disney World
Distribution: SlackwareŽ
Posts: 13,948
|
Moderator Response
Moved: This thread is more suitable in <Slackware> and has been moved accordingly to help your thread/question get the exposure it deserves.
|
|
|
10-05-2014, 06:48 PM
|
#4
|
Senior Member
Registered: Sep 2004
Distribution: slackware
Posts: 4,644
|
Quote:
Originally Posted by systemloc
Now I believe that the kernel headers that the userspace is compiled against should never change, and that if they are changed, this would necessitate recompiling every lib and binary on the system to be technically correct and safe. Correct?
|
No. Have a look at how old some of Slackware's binary packages are. There are very few packages which must be recompiled as a result of an upgrade.
Quote:
Originally Posted by systemloc
So in the case that I upgrade a distro by a version number (for example, slackware 14.0 to 14.1 via slackpkg), the kernel headers must be updated as well
|
Yes.
Quote:
Originally Posted by systemloc
because all of the prebuilt binaries will have been built against that new distro version kernel header package. Correct?
|
No, they haven't.
Quote:
Originally Posted by systemloc
If the above is true, this should mean that any custom software such as slackbuilds packages need to be recompiled. Correct?
|
No, not necessarily.
Quote:
Originally Posted by systemloc
Also, if I understand correctly, if one builds a new kernel from source, the original older kernel headers should not change, correct?
|
Yes, your understanding is correct. The existing kernel-headers package should stay in place, even if the running kernel is a newer version.
Quote:
Originally Posted by systemloc
I'm asking in part because I like to know how things work. More practically, I am upgrading my slackware 14.0 box to 14.1 using slackpkg. I want to make sure I treat the headers appropriately. I always run a custom kernel and like to know that I'm doing things correctly.
|
You really only need to worry about any of this if you're writing (or compiling) your own drivers or other low level software.
|
|
|
10-05-2014, 08:39 PM
|
#5
|
Senior Member
Registered: Oct 2005
Location: New Mexico
Distribution: Slackware
Posts: 1,639
Rep:
|
Quote:
Originally Posted by systemloc
If the above is true, this should mean that any custom software such as slackbuilds packages need to be recompiled. Correct?
|
You will need to recompile some of these packages, but not because of the kernel headers, rather because some of the libraries linked to will have changed versions enough to need a recompile.
Brian
|
|
|
All times are GMT -5. The time now is 02:01 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|