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

Kernel Compile Error -- not finding 'linux/errno.h'



OK -- this should be trivial, but I'm getting lost somewhere trying to
track down the problem.  

A friend was trying to build a new kernel to include masquerading for VPN.
He had problems and asked me to help.  He had kernel 2.2.16-3 on RedHat 6.2.

He said he:
 Did the patches for the VPN (there were two of them)
 Made configuration file
 Did "make dep"
 Did "make clean"
 Did "make"

------------------------------
He got the following error message immediately from "make":
------------------------------
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o scripts/split-includ

scripts/split-include.c
In file included from /usr/include/errno.h:36,
                 from scripts/split-include.c:26:
/usr/include/bits/errno.h:25: linux/errno.h: No such file or directory
make: *** [scripts/split-include] Error 1
------------------------------

The line in /usr/include/bits/errno.h said "#include <linux/errno.h>"
and there exist the following:
----------
[root scrappy linux]# locate errno.h|grep linux
/usr/lib/bcc/include/linux/errno.h
/usr/lib/bcc/include/linuxmt/errno.h
/usr/src/linux-2.2.16/include/asm-i386/errno.h
/usr/src/linux-2.2.16/include/linux/errno.h
----------
also: /usr/src/linux is a symlink to /usr/src/linux-2.2.16

I would have expected the include-path  to include /usr/src/linux/include,
so it would have found /usr/src/linux-2.2.16/include/linux/errno.h

This has gotta be real simple -- It's been a year or so since I last
messed with any kernels, but I remember it being straightforward and
working fine.

What obvious point am I missing here?

OK -- I checked some more.  At the end of the Makefile was a special rule
for "scripts/split-include":
----
scripts/split-include: scripts/split-include.c
        $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include scripts/split-include.c
----
So this doesn't use the standard builtin .c.o rule so the include path
doesn't get "HPATH" included in the CC rule:
  HPATH           = $(TOPDIR)/include
  CC      =$(CROSS_COMPILE)gcc -D__KERNEL__ -I$(HPATH)

***************************************************************************
I checked a couple places where I had built some kernels in the dim dark
past, but those kernels didn't have a split-include in the scripts
directory, so that didn't help me figure out what we're missing.

I tried the process on another RH6.2 + Kernel 2.2.16-3 machine without doing
the  VPN Masquerade patches -- just using standard config.  I got the same
error my friend got, so the error wasn't related to problems with patching.

Obviously I'm blind to something obvious.   Any help out there?



        pete peterson
        GenRad, Inc.
        7 Technology Park Drive
        Westford, MA 01886-0033

        petersonp genrad com or rep genrad com
        +1-978-589-7478 (GenRad);  +1-978-256-5829 (Home: Chelmsford, MA)
        +1-978-589-2088 (Closest FAX); +1-978-589-7007 (Main GenRad FAX)
 





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