Re: toplevel Makefile bug and simple fix

paulsch@us.ibm.com
Fri, 5 Nov 1999 11:54:33 -0500


>[paulsch@us.ibm.com]
>> Here's a small fix which prevented a kernel from building in its own
>> contained directory in cases where there is no /usr/src/linux
>> directory.. Specifically it would die when building split-include.c
>> because it couldn't find the necessary includes...
>
>Strange. Which of
>
> #include <sys/stat.h>
> #include <sys/types.h>
>
> #include <ctype.h>
> #include <errno.h>
> #include <fcntl.h>
> #include <stdio.h>
> #include <stdlib.h>
> #include <string.h>
> #include <unistd.h>
>
>needed the "-I$(HPATH)"?

errno.h as you can see...

[root@espa041 linux-2.3.25]# 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

>I suspect what you had was a dangling symlink "/usr/include/linux". If
>so, this is a bug in your /usr/include hierarchy, not in the kernel
>source. This is one good reason Linus and the glibc2 maintainers
>believe in losing those symlinks.
Every distro I've ever played with has symlinks for /usr/include/linux and
/usr/include/asm into their respective directories in
/usr/src/linux/include.. So I've just assumed that that's the right way to
do it...

Regardless as to whether those links are there or not, I fail to see how
else bits/errno.h is going to find {kernel-src-dir}/include/linux without
the -I$(HPATH)... It can't know where linux/errno.h is otherwise...

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