Marius Mauch
Wed, 30 Mar 2005 15:25:14 -0800
[EMAIL PROTECTED] wrote:
In a LKML post [1] about the symlinking of /usr/include/linux to /usr/src/linux/include/ which has been done for quite some time in older Linux distributions, Linus calls doing this "instanity" and states that the kernel headers used to compile glibc and friends should always be taken from the glibc distribution (which includes a patched set of kernel headers) and one should not use the headers from the kernel.org tarball.
You misread what he said (see below).
But this is exactly what Gentoos linux-headers package does: get the kernel tarball and install the required files. The result is in effect not really different from the old symlinking method.
It is.
Now am I misreading Linus' recommendation? When he sais:
Basically, that symlink should not be a symlink. It's a symlink for historical reasons, none of them very good any more (and haven't been for a long time), and it's a disaster unless you want to be a C library developer. Which not very many people want to be.
The fact is, that the header files should match the library you link against, not the kernel you run on.
That's the important sentence.
and later:
[...] you should not use the kernel headers: You should use the headers that glibc came with. It is probably a Red Hat bug that those headers were a symbolic link.
Does that mean:
a) glibc comes with patched kernel headers that should always be used when compiling other applications/libs
or
b) it doesn't matter what kernel headers you use to build your glibc with as long as any apps that use glibc use the very same headers at compile time.
Marius -- gentoo-server@gentoo.org mailing list