includes
Kurt Wall
kwall
Thu Feb 16 13:02:25 PST 2006
On Mon, Feb 13, 2006 at 08:05:51AM -0500, David Bandel took 45 lines to write:
> On 2/12/06, Shawn Tayler <stayler at xmtservices.net> wrote:
> > Hi Guys,
> >
> > I know this may sound like a dumb question of the week candidate but here
> > it goes.
> >
> > Distro is Slackware 10.2-current.
> >
> > I have been wondering about the includes that come with each kernel
> > tarball. I have been avoiding doing any kernel related upgrades to my
> > Slack installs with the exception of using the sources from kernel.org.
> > The reason has been strangeness with the sources provided as packages for
> > Slack. I've just had much better luck with the generic code.
> >
> > How does one go about using the includes that come with the kernel
> > tarball? I would think they would be a better choice given that I would
> > be using that version kernel.
> >
> > Shawn
>
> This topic was covered some years ago and instructions are on the web.
> But this is not really as easy as just "installing the headers in
> /usr/include". Your primary library, glibc, is linked against the
> libs in /usr/include. If you go fiddling with the /usr/include
s/libs/headers/
> libraries used to build glibc (and that would be the kernel headers),
s/libraries/headers/
There are no libraries in /usr/include, just header files. But, as you
note, glibc is built against the kernel headers in /usr/include/linux.
> you should rebuild glibc then all your other libraries against that.
The other part of this that you haven't mentioned is that userland apps
should not use kernel headers.
> That said, it is often safe to install new libraries say for 2.6.15 if
> you know for a fact glibc was built against a fairly recent 2.6.x
> kernel. Not sure I would though without checking the changes.
> Segfaults are nasty things.
It's a rare userland app or library that needs to worry about this.
Certain system utilities are sensitive to kernel versions, but
vis-a-vis system headers, The Right Thing almost always happens
regardless of the kernel version you're running.
Kurt
--
Seminars, n.:
From "semi" and "arse", hence, any half-assed discussion.
More information about the Linux-users
mailing list