• 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     }*/

     

     


  • 相关阅读:
    Linux测试端口是否连通的方法 -bash: telnet: 未找到命令
    Numpy全面学习资料
    python中调用java代码
    JDK的安装及环境变量配置
    python中logging模块的一些简单用法
    python得到代码所在文件的绝对路径
    Linux重定向(输入输出重定向)详解
    linux中grep命令的用法
    pyquery CSS选择器兄弟元素
    pyquery CSS选择器父级元素
  • 原文地址:https://www.cnblogs.com/doctorqbw/p/2376877.html
Copyright © 2020-2023  润新知