dongleijun2002
驱动牛犊
驱动牛犊
  • 注册日期2003-12-02
  • 最后登录2009-03-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望10点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
阅读:1506回复:2

内核编译问题,找不到头文件,请教

楼主#
更多 发布于:2004-07-29 08:39
我用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
dongleijun4000@hotmail.com
netexpress
驱动牛犊
驱动牛犊
  • 注册日期2004-08-11
  • 最后登录2004-08-19
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望0点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2004-08-11 20:43
可能是你没有定义宏
#define __KERNEL__
这样就可以了。
dongleijun2002
驱动牛犊
驱动牛犊
  • 注册日期2003-12-02
  • 最后登录2009-03-29
  • 粉丝0
  • 关注0
  • 积分1分
  • 威望10点
  • 贡献值0点
  • 好评度0点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2004-08-13 12:49
错了,其实是编译的内核版本太老而已
dongleijun4000@hotmail.com
游客

返回顶部