编译内核出错

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
mikonos
帖子: 23
注册时间: 2008-02-01 2:44

编译内核出错

#1

帖子 mikonos » 2008-03-30 16:07

编译2.4.x的内核,出错信息如下..
请各位同志帮忙拉..

代码: 全选

gcc -D__KERNEL__ -I/home/nancheng/Downloads/SRC/linux-2.4.30/include -Wall -Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer -pipe -mpreferred-stack-boundary=2 -march=i686 -fno-unit-at-a-time   -DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/kernel.h:15,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/wait.h:13,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/fs.h:12,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/capability.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/binfmts.h:5,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:9,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/byteorder.h:14: 警告: 忽略函数返回类型的类型限定
/home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/byteorder.h:30: 警告: 忽略函数返回类型的类型限定
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/byteorder/little_endian.h:11,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/byteorder.h:65,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/kernel.h:15,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/wait.h:13,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/fs.h:12,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/capability.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/binfmts.h:5,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:9,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/byteorder/swab.h:160: 警告: 忽略函数返回类型的类型限定
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/byteorder/swab.h:173: 警告: 忽略函数返回类型的类型限定
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/byteorder/swab.h:186: 警告: 忽略函数返回类型的类型限定
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/byteorder/swab.h:200: 警告: 忽略函数返回类型的类型限定
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/prefetch.h:13,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/list.h:6,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/wait.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/fs.h:12,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/capability.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/binfmts.h:5,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:9,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/processor.h:75: 错误: 数组元素的类型不完全
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/fs.h:322,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/capability.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/binfmts.h:5,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:9,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp_fs_i.h:26: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp_fs_i.h:27: 警告: ‘packed’ 属性为类型为 ‘__u8[6]’ 的字段所忽略
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp_mount.h:12,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp_fs_sb.h:12,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/fs.h:733,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/capability.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/binfmts.h:5,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:9,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:24: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:25: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:26: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:27: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:28: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:29: 警告: ‘packed’ 属性为类型为 ‘__u8[]’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:37: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:38: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:39: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:40: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:41: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:42: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:43: 警告: ‘packed’ 属性为类型为 ‘__u8[]’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:137: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:138: 警告: ‘packed’ 属性为类型为 ‘__u8[256]’ 的字段所忽略
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/ncp.h:174: 警告: ‘packed’ 属性为类型为 ‘__u8’ 的字段所忽略
In file included from /home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/smp.h:17,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/smp.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/sched.h:23,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/mm.h:4,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/slab.h:14,
                 from /home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/proc_fs.h:5,
                 from init/main.c:15:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/asm/mpspec.h:87: 警告: ‘packed’ 属性为类型为 ‘unsigned char[6]’ 的字段所忽略
In file included from init/main.c:20:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/delay.h: 在函数 ‘msleep’ 中:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/delay.h:59: 警告: 计算出的值未被使用
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/delay.h: 在函数 ‘ssleep’ 中:
/home/nancheng/Downloads/SRC/linux-2.4.30/include/linux/delay.h:65: 警告: 计算出的值未被使用
make: *** [init/main.o] 错误 1
回复