Re: Linux v2.2.x README missing information

Trevor Johnson (trevor@jpj.net)
Tue, 30 Mar 1999 16:30:29 -0500 (EST)


> I wouldn't be able to compile anything that uses <sys/socket.h>, if I
> didn't have a <linux/socket.h>. I wouldn't be able to compile lilo
> without <asm/boot.h>.
>
> Of course, but you already had <linux/socket.h> and <asm/boot.h>.
>
> If you get into the habit of replacing header files each time a
> new kernel is released, and moreover you do some C program development,
> you'll find that your programs, that compiled flawlessly yesterday,
> do not compile anymore today, or, worse, if they still compile
> they now have subtle run-time bugs.
>
> If you need kernel features that were introduced yesterday evening,
> you are on your own, but the usual case is that one has utilities
> that after compilation should function under lots of different kernels.
> Clearly, there is no reason to use yesterdays kernel header files.
> If you are interested in a stable software development environment
> you'll update headers only a few times a year.
>
> Probably your RedHat / SuSE / Debian / whatever system came with known
> good headers. Do not replace them without a good reason.

The README file says one of its goals is to "explain how to install the
kernel". The header files are part of the kernel (maybe it should be
called a "header/kernel system" ;) ). To quote the Documentation/Changes
file, "some software still works, but needs to be compiled against 2.2
headers for complete functionality".

I agree that nearly everyone uses distributions, and that if a stable
environment is important one only should update anything with a good
reason, but someone who is reading the README file has probably already
found such a reason. A bit of documentation like this seems like a good
thing:

--- linux-2.2.5/README.orig Thu Jan 7 08:41:55 1999
+++ linux-2.2.5/README Tue Mar 30 13:24:33 1999
@@ -87,6 +87,16 @@
cd /usr/src/linux
make mrproper

+- Some userland programs are compiled against the headers that come with the
+ kernel. Customarily, the headers are installed in /usr/src/linux/include/
+ with links in /usr/include/:
+
+ ln -s /usr/src/linux/include/asm/ /usr/include/asm
+ ln -s /usr/src/linux/include/linux/ /usr/include/linux
+
+ You'll want to do the same thing for net/ and scsi/ if your C library does
+ not provide them.
+
You should now have the sources correctly installed.

SOFTWARE REQUIREMENTS

The FAQ file that comes with glibc 2.1 has this to say:

2.17. I have /usr/include/net and /usr/include/scsi as symlinks
into my Linux source tree. Is that wrong?

{PB} This was necessary for libc5, but is not correct when using glibc.
Including the kernel header files directly in user programs usually does
not work (see question 3.5). glibc provides its own <net/*> and <scsi/*>
header files to replace them, and you may have to remove any symlink that
you have in place before you install glibc. However, /usr/include/asm and
/usr/include/linux should remain as they were.
__
Trevor Johnson

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/