阅读:1539回复:2
内核编译问题,找不到头文件,请教
我用redhat8编译1.0的内核,/usr/src/linux下是代码,make mrproper正常,但是make dep时报错,不知道为什么,请高手指点,请回复到dongleijun4000@hotmail.com:
[root@localhost linux]# make dep touch tools/version.h for i in init/*.c;do echo -n "init/";gcc -D__KERNEL__ -E -M $i;done > .tmpdependIn file included from /usr/include/linux/bitops.h:69, from /usr/include/asm/system.h:7, from init/main.c:9: /usr/include/asm/bitops.h:333:2: warning: #warning This includefile is not available on all architectures. /usr/include/asm/bitops.h:334:2: warning: #warning Using kernel headers in userspace. In file included from /usr/include/linux/fs.h:23, from /usr/include/linux/capability.h:17, from /usr/include/linux/binfmts.h:5, from /usr/include/linux/sched.h:9, from init/main.c:15: /usr/include/linux/string.h:8:2: warning: #warning Using kernel header in userland! init/main.c:17:24: linux/head.h: No such file or directory In file included from init/main.c:23: /usr/include/linux/delay.h:13:23: asm/delay.h: No such file or directory init/main.c:96:8: warning: extra tokens at end of #endif directive init/main.c:206:8: warning: extra tokens at end of #endif directive make: *** [dep] Error 1 |
|
|
沙发#
发布于:2004-08-11 20:43
可能是你没有定义宏
#define __KERNEL__ 这样就可以了。 |
|
板凳#
发布于:2004-08-13 12:49
错了,其实是编译的内核版本太老而已
|
|
|