在编译busybox-1.1.3时,选中Build BusyBox as a static binary(no shared libs)时, 会出现如下问题:
/home/wang/bak/source/arm-linux-2.6/target/busybox-1.1.3/util-linux/util-linux.a(mount.o): In function `singlemount':
mount.c:(.text+0x42c): undefined reference to `del_loop'
collect2: ld returned 1 exit status
make[1]: *** [busybox_unstripped] 错误 1
make: *** [_all] 错误 2
********************************************修改*************************************************
Index: util-linux/mount.c
===================================================================
--- util-linux/mount.c (revision 14831)
+++ util-linux/mount.c (working copy)
@@ -351,7 +351,7 @@
// If mount failed, clean up loop file (if any).
- if (rc && loopFile) {
+ if (ENABLE_FEATURE_MOUNT_LOOP && rc && loopFile) {
del_loop(mp->mnt_fsname);
if (ENABLE_FEATURE_CLEAN_UP) {
free(loopFile);
故去掉busybox-1.1.3/util-linux/mount.c下面的这么一段, 就编译成功了.
352 // If mount failed, clean up loop file (if any).
353
354 /*if (rc && loopFile) {
355 del_loop(mp->mnt_fsname);
356 if (ENABLE_FEATURE_CLEAN_UP) {
357 free(loopFile);
358 free(mp->mnt_fsname);
359 }
360 }*/