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

From: Romain Vignes (rvignes@eprocess.fr)
Date: Thu Apr 20 2000 - 05:46:18 EST


1. One line summary of the problem:
kernel 2.3.99-pre5 does not compile without system-wide kernel headers

2. Full description of the problem/report:
I have removed the kernel headers (/usr/include/linux and
/usr/include/asm symlinks) from my Linux system. The goal is to compile
multiple kernel versions without having to update the symlinks each
time.

When I try to compile (make bzImage) the 2.3.99-pre5 kernel in this
environment, it fails with the following error message :

[root@xroms linux]# make bzImage
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -o
scripts/split-include 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
[root@xroms linux]#

In fact the split-include.c program needs to access one of the linux
headers and does not find it in my case.

3. Workaround
I have added the '-Iinclude' directive in the 'split-include.c' compile
rule (end of the root Makefile). See patch below.

NOTE : This fix does not alter the whole kernel.

--- Makefile.orig Thu Apr 20 12:42:36 2000
+++ Makefile Thu Apr 20 12:44:32 2000
@@ -476,5 +476,7 @@
 scripts/mkdep: scripts/mkdep.c
        $(HOSTCC) $(HOSTCFLAGS) -o scripts/mkdep scripts/mkdep.c
 
+# 20000420 Roms <rvignes@eprocess.fr>
+# Added -Iinclude for building without system-wide kernel headers
 scripts/split-include: scripts/split-include.c
- $(HOSTCC) $(HOSTCFLAGS) -o scripts/split-include
scripts/split-include.c+ $(HOSTCC) -Iinclude $(HOSTCFLAGS) -o
scripts/split-include
scripts/split-include.c


-
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 : Sun Apr 23 2000 - 21:00:16 EST