ubuntu11.04下编译busybox
来源:互联网 发布:数据库主键外键约束 编辑:程序博客网 时间:2024/06/07 07:48
执行make menuconfig时出现如下错误
@ubuntu:/home/dev/busybox-1.19.3# make menuconfig
HOSTCC scripts/kconfig/lxdialog/checklist.o
In file included from scripts/kconfig/lxdialog/checklist.c:24:0:
scripts/kconfig/lxdialog/dialog.h:31:20: fatal error: curses.h: 没有那个文件或目录
compilation terminated.
make[2]: *** [scripts/kconfig/lxdialog/checklist.o] 错误 1
make[1]: *** [menuconfig] 错误 2
make: *** [menuconfig] 错误 2
这时因为ubuntu系统中缺少一个套件 ncurses devel ,把此套件安装下即可
apt-get install libncurses5-dev
@ubuntu:/home/dev/busybox-1.19.3# apt-get install libncurses5-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
linux-headers-2.6.38-8 linux-headers-2.6.38-8-generic
使用'apt-get autoremove'来卸载它们
建议安装的软件包:
ncurses-doc
下列【新】软件包将被安装:
libncurses5-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 113 个软件包未被升级。
需要下载 290 kB 的软件包。
解压缩后会消耗掉 1,294 kB 的额外空间。
获取:1 http://mirrors.ustc.edu.cn/ubuntu/ natty/main libncurses5-dev i386 5.7+20101128-1 [290 kB]
下载 290 kB,耗时 6秒 (45.7 kB/s)
选中了曾被取消选择的软件包 libncurses5-dev。
(正在读取数据库 ... 系统当前共安装有 203021 个文件和目录。)
正在解压缩 libncurses5-dev (从 .../libncurses5-dev_5.7+20101128-1_i386.deb) ...
正在设置 libncurses5-dev (5.7+20101128-1) ...
@ubuntu:/home/dev/busybox-1.19.3# make menuconfig
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/lxdialog.o
scripts/kconfig/lxdialog/lxdialog.c: In function ‘j_inputbox’:
scripts/kconfig/lxdialog/lxdialog.c:192:3: warning: format not a string literal and no format arguments
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/msgbox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTLD scripts/kconfig/lxdialog/lxdialog
scripts/kconfig/mconf Config.in
#
# using defaults found in .config
#
问题解决
编译busybox的时候出现error: field 'in' has incomplete type
编译错误1:
applets/applets.c:15:2: warning: #warning Static linking against glibc
produces buggy executables
applets/applets.c:16:2: warning: #warning (glibc
does not cope well with ld –gc-sections).
applets/applets.c:17:2: warning:
#warning See sources.redhat.com/bugzilla/show_bug.cgi?id=3400
applets/applets.c:18:2: warning: #warning Note that glibc is unsuitable for
static linking anyway.
applets/applets.c:19:2: warning: #warning If you
still want to do it, remove -Wl,–gc-sections
applets/applets.c:20:2:
warning: #warning from scripts/trylink and remove this warning.
applets/applets.c:21:2: error: #error Aborting compilation.
make[1]: ***
[applets/applets.o] Error 1
解决办法:
修改文件 applets/applets.c 第 21 行, 将
#error Aborting compilation.
注释掉:
/*#error Aborting compilation.*/
编译错误2:
warn_unused_result
CC init/mesg.o
AR init/lib.a
LD
ipsvd/built-in.o
CC ipsvd/ipsvd_perhost.o
CC
ipsvd/tcpudp.o
In file included from
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter_ipv4.h:8,
from
ipsvd/tcpudp.c:33:
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:55:
error: field ‘in’ has incomplete
type
/opt/arm-linux/bin/../arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h:56:
error: field ‘in6′ has incomplete type
ipsvd/tcpudp.c: In function
‘tcpudpsvd_main’:
ipsvd/tcpudp.c:314: warning: ignoring return value of
‘write’, declared with attribute warn_unused_result
make[1]: ***
[ipsvd/tcpudp.o] 错误 1
make: *** [ipsvd] 错误 2
解决办法:
arm-linux 交叉编译工具链
在 usr/local/arm/4.3.2/arm-none-linux-gnueabi/libc/usr/include/linux/netfilter.h 头文件的开头
添加缺少的头文件:
#include <netinet/in.h>
- ubuntu11.04下编译busybox
- Ubuntu11.04下交叉编译环境构建
- Ubuntu11.04下编译Android源码
- Ubuntu11.04 codeblocks 下编译opencv文件
- ubuntu11.04下编译安装Qt4.8.2
- ubuntu11.04下编译安装Qt4.8.2
- ubuntu11.04下编译安装Qt4.8.2
- Ubuntu14.04下编译busybox for android
- Ubuntu11.04下安装Android编译环境并编译源码
- Ubuntu11.10下编译 OpenJDK7
- ubuntu11.0.4下编译Android
- Linux 下 Busybox 交叉编译
- mips64位下busybox编译
- 编译mips下的busybox
- CentOS下编译安装Busybox
- Ubuntu11.04下编译最新Linux-3.0-rc7内核
- Ubuntu11.04 - 64 bits下编译Android2.2内核
- Ubuntu11.04下编译ffmpeg,利用SDL1.2播放视频
- C宏的使用尝试
- localtime 和 localtime_r
- 脚本学习初体验-让Xcode飞起来
- codechef And Operation
- curl_multi_init()多线程
- ubuntu11.04下编译busybox
- Maven私服(二) - Nexus的安装
- Firefox源码下载地址
- OpenCV入门(十)-- 尺寸调整
- 早期的例子
- Problem E 圆环的转动问题 (14年内蒙古省赛题)
- 无法保存对hosts权限所作的更改 拒绝访问(权限,防止Windows主机文件、进程、注册表项进行操作和更改)
- 推荐打印打印控件Lodop,支持IE,firefox,chrome等位内核的浏览器
- [Java]有关比较器(Comparator接口)的用法及对象数组排序问题