Re: PROBLEM: kernel 2.3.99-pre5 does not compile without system-wide kernel headers

From: Guest section DW (dwguest@win.tue.nl)
Date: Thu Apr 20 2000 - 15:57:14 EDT

  • Next message: Krisztian Flautner: "Keeping track of entering and leaving the kernel"

    On Thu, Apr 20, 2000 at 03:24:15PM -0400, Theodore Y. Ts'o wrote:

    > From: Jeff Garzik <jgarzik@mandrakesoft.com>
    >
    > 1) You need headers in /usr/include/linux. For 2.3.x/2.4.x kernels it
    > is generally assumed that the systemwide /usr/include/linux should be
    > upgraded independently of the kernel includes.
    >
    > .... except if you want to build stand-alone kernel modules that work
    > against the kernel that you are currently booting.
    >
    ...
    > My personal nomination of the standard way to do things is to assume
    > that /usr/src/linux is a symlink to kernel sources corresponding to the
    > default kernel being booted on that machine, and that stand-alone device
    > drivers that need to compile against a kernel should default to
    > /usr/src/linux, but there should be an easy way for users to override
    > that and specify some other kernel source tree if necessary. Any
    > objections to such an approach?

    Yes. "the default kernel being booted" is not a well-defined entity.
    Anyone who compiles a kernel will have at least two - the previous one
    and this one.

    The includes used to compile user-space utilities are entirely independent
    of the includes used to compile the kernel, or kernel modules. They should
    be selected only so as to work well together with the libc one uses.

    If kernel modules live in a kernel source tree then there is no problem
    finding the corresponding includes. If not, then the user has to explicitly
    indicate where the corresponding kernel includes live.
    It is a bad assumption that /usr/src/linux will do. That leads to insidious bugs.

    Andries

    -
    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/



    This archive was generated by hypermail 2b29 : Thu Apr 20 2000 - 16:03:42 EDT