From: torvalds@klaava.Helsinki.FI (Linus Benedict Torvalds) Subject: Re: Linux 0.97 kernel compile problems Date: 3 Aug 1992 16:27:47 GMT
In article <1992Aug3.062434.1600@uhura1.uucp> bryan%uhura1@uunet.uu.net writes:
>>
>>There is also a kernel-compilation README (written by Lars Wirzenius),
>>as well as a COPYING (which is just a pointer to the GNU copyleft).
>
>Where are these files? They don't seem to be included in my copy
>of linux-0.97.tar.Z. If there's a kernel-compilation README, I need
>to read it, since I'm having kernel-compilation problems.
Lasu already sent out a copy of the README he wrote - and the COPYING
file was indeed only a pointer to the GNU copyleft, so you should get
that if you are interested in the copyright conditions.
[ My comment in the README that the symlink from /usr/include/linux to
/usr/src/linux/include/linux possibly wasn't needed was incorrect - you
do need the symlink ]
>>Changes in 0.97:
>>
>> - include-files have been moved around some more: there are still some
>> names that clash with the standard headers, but not many.
>
>There are only three files left under include/sys: kd.h, mman.h, and
>vt.h. Everything else that used to be under include/sys is now under
>include/linux. This means that all of the source you pull off of the
>net that includes files like <sys/types.h> and <sys/dirent.h> will
>require additional tweaking before compiling under Linux. What was
>wrong with leaving things under include/sys?
The problem with include/sys was that the kernel-specific things clashed
with the library things and vice versa. What 0.97 does is to move all
(or at least 99%) the kernel definitions into include/linux - while this
may result in problems for a while, the ides is that eventually (1.0 or
so), the user-level include-files use the kernel include-files for
kernel-specific things, and just add the library stuff.
So when there before was a <termios.h> in both /usr/include and
/usr/src/linux/include, I moved the kernel-specific things into
<linux/termios.h> - this contains the #defines and the data structures
the kernel uses (and thus the library functions need in some cases).
This allows me to add new #defines as new features are added, and if the
/usr/include/termios.h does a #include <linux/termios.h>, they are
automatically updated. In the above you can put files like errno.h,
signal.h etc instead of termios.h.
Note that the above isn't true yet: the kernel headers probably still
contain some things the user-level headers don't want and the user-level
headers don't include them yet, but I hope it will be true in a release
or two.
>(Side note: Not all of the Makefiles use "-I/usr/src/linux/include",
>if I recall correctly it was the SCSI code that tried to compile using
>my 0.96c header files under /usr/include.)
>
>Also, struct stat is now undefined. Not unnaturally, this means the
>kernel (with everything installed) won't compile. The file
>include/linux/stat.h defines struct old_stat and struct new_stat,
>but doesn't define either of them to be struct stat.
The kernel will compile without changes, so if you have problems, it's
due to the setup: make sure you have the /usr/include/linux symlink, and
a reasonably new 'make' that correctly inherits the CFLAGS etc. I'll
make the readme a bit more prominent next time (inside the actual
tar-file), so maybe kompiling will be easy by 0.98. Or maybe not.
Linus