用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