LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1121|回复: 4

求教编译2.6.31内核出现这样的错误如何解决

[复制链接]
发表于 2009-9-27 23:11:31 | 显示全部楼层 |阅读模式
make[1]: Leaving directory `/usr/src/linux-2.6.31'
/usr/bin/make    ARCH=i386 \
                             -C Documentation/lguest
make[1]: Entering directory `/usr/src/linux-2.6.31/Documentation/lguest'
cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE    lguest.c   -o lguest
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c: In function ‘create_thread’:
lguest.c:1021: warning: implicit declaration of function ‘eventfd’
make[1]: *** [lguest] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.31/Documentation/lguest'
make: *** [debian/stamp/build/kernel] Error 2
发表于 2009-9-28 20:02:32 | 显示全部楼层
请参照置顶贴子,按步骤来,应该不会错的吧
回复 支持 反对

使用道具 举报

发表于 2009-9-28 23:36:46 | 显示全部楼层
error: sys/eventfd.h: No such file or directory
看看这个文件存在吗?
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-29 22:45:55 | 显示全部楼层
谢谢二位,回头我再试试
回复 支持 反对

使用道具 举报

 楼主| 发表于 2009-9-29 22:48:58 | 显示全部楼层
我找到答案了,http://cakebox.homeunix.net/wordpress/?p=100

I just upgraded my Debian5 workstation to 2.6.31. While doing so I stumbled over this:

cc -m32 -Wall -Wmissing-declarations -Wmissing-prototypes -O3 -I../../include -I../../arch/x86/include -U_FORTIFY_SOURCE lguest.c -o lguest
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c: In function ‘create_thread’:
lguest.c:1021: warning: implicit declaration of function ‘eventfd’
make: *** [lguest] Error 1

This is apparenty due to the old libc-dev package that Lenny comes with. Since libc isn’t exactly a good candidate for a selective upgrade I helped myself with simply editing Documentation/lguest/Makefile and changing:

all: lguest

to

all:

So lguest wont be build anymore. After that make-kpkg binary-arch worked as usual.
I’m also happy to report that my rr232x-linux patch still works on 2.6.31.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表