zoukankan      html  css  js  c++  java
  • busybox mount.c:(.text+0x42c): undefined reference to `del_loop'

    在编译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     }*/

     

     


  • 相关阅读:
    英语阅读重点单词总结
    Redis 应用
    Python 列表[::-1]翻转
    golang数据类型
    golang变量
    k8s 容器控制台日志收集
    css显示模式
    css选择器
    css样式引入
    GIL锁
  • 原文地址:https://www.cnblogs.com/doctorqbw/p/2376877.html
Copyright © 2011-2022 走看看