gpt4 book ai didi

linux - 如何让busybox1.23.2编译成功?

转载 作者:太空宇宙 更新时间:2023-11-04 12:33:12 24 4
gpt4 key购买 nike

包:busybox 版本:1.23.2 当我制作 busybox 时,它会产生意想不到的结果。 我用的crosschaintool是ARM/uClinux Toolchain arm-2010q1-189-arm-uclinuxeabi-i686-pc-linux-gnu,但是我做不了busybox,像这样:

root@ubuntu:/busybox/busybox-1.23.2# make
SPLIT include/autoconf.h -> include/config/*
GEN include/bbconfigopts.h
HOSTCC applets/usage
applets/usage.c: In function ‘main’:
applets/usage.c:52:3: warning: ignoring return value of ‘write’, declared with attribute warn_unused_result [-Wunused-result]
write(STDOUT_FILENO, usage_array[i].usage, strlen(usage_array[i].usage) + 1);
^
GEN include/usage_compressed.h
HOSTCC applets/applet_tables
applets/applet_tables.c: In function ‘main’:
applets/applet_tables.c:161:4: warning: ignoring return value of ‘fgets’, declared with attribute warn_unused_result [-Wunused-result]
fgets(line_old, sizeof(line_old), fp);
^
GEN include/applet_tables.h
CC applets/applets.o
LD applets/built-in.o
HOSTCC applets/usage_pod
applets/usage_pod.c: In function ‘main’:
applets/usage_pod.c:74:3: warning: format not a string literal and no format arguments [-Wformat-security]
printf(usage_array[i].aname);
^
CC libbb/appletlib.o
CC libbb/vfork_daemon_rexec.o
AR libbb/lib.a
CC shell/hush.o
shell/hush.c: In function 'builtin_source':
shell/hush.c:8901: warning: 'sv.sv_g_malloced' may be used uninitialized in this function
shell/hush.c:8901: warning: 'sv.sv_g_argc' may be used uninitialized in this function
shell/hush.c:8901: warning: 'sv.sv_g_argv' may be used uninitialized in this function
shell/hush.c:8901: warning: 'sv.sv_argv0' may be used uninitialized in this function
AR shell/lib.a
LINK busybox_unstripped
Trying libraries: crypt m
Library crypt is not needed, excluding it
Library m is not needed, excluding it
Final link with: <none>
arm-uclinuxeabi-strip:busybox_unstripped: File format not recognized
Makefile:723: recipe for target 'busybox' failed
make: *** [busybox] Error 1

我该怎么办? busybox 不能使用 ARM/uClinux 工具链吗?我该怎么办?如果您能给我们一些建议和指导,我们将不胜感激,谢谢!

最佳答案

LINK busybox_unstripped Trying libraries: crypt m Library crypt is not needed, excluding it Library m is not needed, excluding it Final link with: arm-uclinuxeabi-strip:busybox_unstripped: File format not recognized Makefile:723: recipe for target 'busybox' failed make: *** [busybox] Error 1

由于整个编译日志只有一段,建议如下:

1) 请从头检查编译日志是否有其他重要的警告或错误。

2) busybox_unstripped 文件是否生成?查看makefile dependencies,查看是否所有的依赖文件都生成成功。从日志中,一些库被排除在外,因此您可能需要检查 busybox 配置文件。

3) 如果生成了busybox_unstripped文件,检查makefile中“Final link with:”的链接语法。为使跨工具链链接成功,请确保链接命令正确。

祝你好运!

关于linux - 如何让busybox1.23.2编译成功?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42711603/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com