/usr/src/linux & /usr/src/linux-2.4.20 directories

Tushar Teredesai tushar at linuxfromscratch.org
Tue Jan 28 09:14:58 PST 2003

Dagmar d'Surreal wrote:

>On Tue, 2003-01-28 at 04:03, Tushar Teredesai wrote:
>>Nope. Its not. The important thing is that the headers that are 
>>accessible via /usr/include/linux and /usr/include/asm should *always* 
>>be the ones that glibc is compiled against. It doesn't matter whether 
>>/usr/include/linux is a directory or a symlink to somewhere else (say 
>>/usr/src/linux or /opt/kernel-sources).
>Symlinks from /usr/include/linux make the Baby Torvalds(*) cry.  Didn't
>you see the email that's cited in the book?  Linus has said that
>/usr/include/{linux|asm} should not be symlinks.
Yep, I did read that. It clearly states that in Linus' system (at least 
at the time the mail was written) the kernel headers that glibc was 
compiled against are in /usr/src/linux with symlinks from /usr/include. 
And he says that the new kernel sources should not go in /usr/src/linux: 
<quote>and people still remember that the linux sources should go into 
"/usr/src/linux" even though that hasn't been true in a _long_ 
time.</quote> That indicates that he recommends building the kernel in a 
different location and that there is no guarantee that /usr/src/linux 
would be the place to get the kernel sources for the currently running 

>>The package is definitely broken. Given the fact that the kernel 
>>developers have given a nearly failsafe mechanism for finding the 
>>relevant kernel source, why should a package pick a location that _may_ 
>>not be correct. It is ok to use /usr/src/linux as a fallback mechanism 
>>(in case the build symlink is invalid) but not as the default.
>Umm... that's not why that directory is version-granular.   It's
>versioned so that new kernels won't be dropping incompatible modules
>into the same directory as the old kernels' modules, which would break
>the ability to reinstall an old kernel quickly if something in a new one
>turnes out to be fubar.
I give up trying to explain this for the fear of repeating myself.

Tushar Teredesai

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list