Re: The '/usr/src/linux' link.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 2003-07-21 at 05:57, Diego Calleja García wrote:
> El Sat, 19 Jul 2003 22:04:35 +0200 "Jose Luis Alarcon" <jlalarcon@zonalinux.zzn.com> escribió:
> He's right.
> 
> In the past, /usr/include/linux was a symbolic link to /usr/src/linux/include.
> (there're software which needs the kernel headers to compile things).
> 
> The linux kernel is know to be very active, and there're changes between
> versions that can break the software which use the kernel headers.
> 
> So, a clever guy decided to get the headers of some know-to-work kernel version
> and copy them to /usr/include/linux; this was things don't break, they are
> updated periodically; and you don't need to put your kernel in /usr/src/linux.

This, essentially is the idea. When you build glibc, you need a
generically configured set of kernel headers so that glibc can build up
the set of system calls that the kernel provides, and allow userspace an
easy way of using them. The problem is, if you start making esoteric
changes to the headers, and then go to recompile glibc, you could run
into problems. Most applications won't strictly use /usr/include/linux
directly, so this problem isn't as dire as people make out, it's just
good practice.

Often, people stick to a well known set of kernel headers, which live in
/usr/include/linux and /usr/include/asm, and this is now the recommended
practice for distributors.

Also, it's not strictly necessary to not have a kernel in
/usr/src/linux. I tend to use that particular link as a symlink to my
current kernel. Occasionally, some older or less well maintained
external kernel module does something silly, and assumes that the kernel
is always in /usr/src/linux, instead of taking the path
'/lib/modu;es/`uname -r`/build/include' instead.

External kernel modules doing this are pretty rare nowadays however.

Andrew Pilley

> 
> 
> (Please correct me if i'm wrong, i don't remember the full history; it should
> be documented somewhere though ;)
> 
> 
> 
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive:       http://mail.nl.linux.org/kernelnewbies/
> FAQ:           http://kernelnewbies.org/faq/
-- 
Andrew Pilley <ashridah@netspace.net.au>

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux