包装:busybox
版本:1.23.2
当我制作busybox时,它会产生意想不到的结果。
我使用的crosschaintool是ARM/uClinux工具链ARM-2010q1-189-ARM-uclinuxeabi-i686-pc-linux-gnu,但我无法制作总线箱,如下所示:
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工具链吗?我该怎么办?如果你能给我们一些建议和指导,我们会非常感激的,谢谢
最佳答案
链接busybox_unlipped Trying libraries:crypt m Library crypt
不需要,排除它不需要库m,排除它
最终链接:arm uclinuxeabi strip:busybox_unlipped:File
格式无法识别生成文件:723:目标“busybox”的配方失败
make:**[busybox]错误1
由于整个编译日志只有一部分,建议如下:
1)请从头检查编译日志是否有其他重要警告或错误。
2)是否生成busybox_unlipped文件?检查makefile依赖项以确定是否成功生成了所有依赖项文件。从日志中排除了一些库,因此您可能需要检查busybox配置文件。
3)如果生成busybox_unlipped文件,请检查makefile中“Final link with:”的链接语法。要使交叉刀具链成功链接,请确保链接命令正确。
祝你好运!
关于linux - 如何使busybox1.23.2编译成功?,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/42711603/