解决busybox编译问题

用arm-linux-gcc4.4.3编译busybox1.31的时候出现了很多问题,困扰了我许久,现在列出这些问题和解决方法

coreutils/lib.a(mktemp.o): In function `mktemp_main':
mktemp.c:(.text.mktemp_main+0x8c): warning: the use of `mktemp' is dangerous, better use `mkstemp'
coreutils/lib.a(sync.o): In function `sync_common':
sync.c:(.text.sync_common+0x34): undefined reference to `syncfs'
collect2: ld returned 1 exit status
Note: if build needs additional libraries, put them in CONFIG_EXTRA_LDLIBS.
Example: CONFIG_EXTRA_LDLIBS="pthread dl tirpc audit pam"
Makefile:718: recipe for target 'busybox_unstripped' failed
make: *** [busybox_unstripped] Error 1

make menuconfig-->Coreutils—>sync选项去掉,重新make编译通过

util-linux/lib.a(nsenter.o): In function `nsenter_main':
nsenter.c:(.text.nsenter_main+0x1a8): undefined reference to `setns'
coreutils/lib.a(sync.o): In function `sync_common':
sync.c:(.text.sync_common+0x34): undefined reference to `syncfs'
collect2: ld returned 1 exit status

make menuconfig-->Linux System Utilities—>nsenter,去掉该选项,重新编译make
  • 2
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
编译错误"undefined reference to `stime'"表示在编译busybox时,存在对`stime`函数的引用错误。根据引用的描述,问题的原因是rdata.c调用的stime函数没有定义。为了解决这个问题,可以参考引用提供的补丁,该补丁可能修复了对`stime`函数的引用问题。另外,通过在busybox的提交记录中搜索`stime`的提交,可以找到移除`stime`相关信息的提交记录,如引用所提供的链接。这可能意味着在最新版本的busybox中,`stime`函数已经被移除或者改变了使用方式。因此,解决这个问题的方法可能是使用补丁或者更新到最新版本的busybox。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [busybox-1.29.0编译问题记录](https://blog.csdn.net/qq_41787453/article/details/126682705)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* [busybox编译报错undefined reference to `stime‘ make: *** [Makefile:716: busybox_unstripped] Error 1](https://blog.csdn.net/o_alpha/article/details/113487031)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值