BusyBox1.1.0编译错误

BusyBox1.1.0编译错误
为了和linux2.6.14对应起来,选用了BusyBox1.1.0,交叉编译器为arm-linux-gcc3.4.1。编译BusyBox时出现如下错误:
root@czu:~/桌面/socket/busybox-1.1.0# make
make -C /root/桌面/socket/busybox-1.1.0 \
        top_srcdir=/root/桌面/socket/busybox-1.1.0 \
        top_builddir=/root/桌面/socket/busybox-1.1.0 \
        KBUILD_SRC=/root/桌面/socket/busybox-1.1.0 \
        -f /root/桌面/socket/busybox-1.1.0/Makefile _all
make[1]: 正在进入目录 `/root/桌面/socket/busybox-1.1.0'
scripts/bb_mkdep -c include/config.h -c include/bb_config.h \
                        -I /root/桌面/socket/busybox-1.1.0/include /root/桌面/socket/busybox-1.1.0 > .depend.tmp
mv .depend.tmp .depend
arm-linux-gcc -I/root/桌面/socket/busybox-1.1.0/include -I/root/桌面/socket/busybox-1.1.0/include -I/root/桌面/socket/busybox-1.1.0/libbb -funsigned-char -Wall -Wstrict-prototypes -Wshadow -Os -fstrict-aliasing -fomit-frame-pointer -D_GNU_SOURCE -DNDEBUG     -c -o /root/桌面/socket/busybox-1.1.0/applets/applets.o /root/桌面/socket/busybox-1.1.0/applets/applets.c
In file included from /root/桌面/socket/busybox-1.1.0/include/busybox.h:27,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:1: error: parse error before '-' token
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:1: error: syntax error at '#' token
In file included from /root/桌面/socket/busybox-1.1.0/include/busybox.h:27,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:759:2: #endif without #if
In file included from /usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:105,
                 from /root/桌面/socket/busybox-1.1.0/include/busybox.h:33,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/bits/stat.h:90: error: parse error before '}' token
In file included from /root/桌面/socket/busybox-1.1.0/include/busybox.h:33,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:358: error: conflicting types for 'stat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:208: error: previous declaration of 'stat' was here
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:358: error: conflicting types for 'stat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:208: error: previous declaration of 'stat' was here
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:365: error: conflicting types for 'lstat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:236: error: previous declaration of 'lstat' was here
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:365: error: conflicting types for 'lstat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:236: error: previous declaration of 'lstat' was here
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:371: error: conflicting types for 'fstat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:212: error: previous declaration of 'fstat' was here
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:371: error: conflicting types for 'fstat'
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/sys/stat.h:212: error: previous declaration of 'fstat' was here
In file included from /root/桌面/socket/busybox-1.1.0/include/libbb.h:39,
                 from /root/桌面/socket/busybox-1.1.0/include/busybox.h:50,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:1: error: parse error before '-' token
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:1: error: syntax error at '#' token
In file included from /root/桌面/socket/busybox-1.1.0/include/libbb.h:39,
                 from /root/桌面/socket/busybox-1.1.0/include/busybox.h:50,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/root/桌面/socket/busybox-1.1.0/include/bb_config.h:759:2: #endif without #if
In file included from /root/桌面/socket/busybox-1.1.0/include/pwd_.h:24,
                 from /root/桌面/socket/busybox-1.1.0/include/libbb.h:44,
                 from /root/桌面/socket/busybox-1.1.0/include/busybox.h:50,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/usr/local/arm/3.4.1/bin/../lib/gcc/arm-linux/3.4.1/../../../../arm-linux/sys-include/pwd.h:59: error: parse error before '}' token
In file included from /root/桌面/socket/busybox-1.1.0/include/busybox.h:50,
                 from /root/桌面/socket/busybox-1.1.0/applets/applets.c:33:
/root/桌面/socket/busybox-1.1.0/include/libbb.h:108: warning: "struct stat" declared inside parameter list
/root/桌面/socket/busybox-1.1.0/include/libbb.h:118: warning: "struct stat" declared inside parameter list
/root/桌面/socket/busybox-1.1.0/include/libbb.h:119: warning: "struct stat" declared inside parameter list
/root/桌面/socket/busybox-1.1.0/include/libbb.h:411: warning: "struct stat" declared inside parameter list
/root/桌面/socket/busybox-1.1.0/include/libbb.h:412: warning: "struct stat" declared inside parameter list
make[1]: *** [/root/桌面/socket/busybox-1.1.0/applets/applets.o] 错误 1
make[1]:正在离开目录 `/root/桌面/socket/busybox-1.1.0'
make: *** [_all] 错误 2
处理方法:修改 include/bb_config.h
看到此文件的第一行多了两个字母 -e,删除掉,退出文件再次执行make则可编译通过
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值