zoukankan      html  css  js  c++  java
  • sip测试工具sipsak交叉编译及使用

    这又是一个autoconf发布的包,有上次移植pjsip的经验,这次就轻松很多了。虽然还是小有点问题

    用下面一句进行configure,产生Makefile:

    CC=armv5l-linux-gcc ./configure --host=armv5l-linux --target=armv5l-linux --build=i386-redhat-linux

    OK!make。。。

    sipsak.o: In function `main':
    /home/voip_prj/sipsak/sipsak/sipsak.c:542: undefined reference to `rpl_malloc'
    collect2: ld returned 1 exit status
    make[1]: *** [sipsak] 错误1
    make[1]: Leaving directory `/home/voip_prj/sipsak/sipsak'
    make: *** [all] 错误 2

    额,放狗去找错误undefined reference to `rpl_malloc'。

    结果:1、configure的时候加上--with-gnu-ld这个参数 2、或者在config.h里加上#undef rpl_malloc

    在configure的时候假如参数--with-gnu-ld,没有成功;在config.h里加入#undef rpl_malloc也没成功。。。不过看到一句

    #define malloc rpl_malloc 为什么一定要把malloc给用rpl_malloc替换?so,立马注释掉!

    make,成功!file sipsak:

    sipsak: ELF 32-bit LSB executable, ARM, version 1 (ARM), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), for GNU/Linux 2.2.5, not stripped
    下载到板子运行正常。

     又搜了下,发现一哥们是这么解决的:

    当前目录查找了rpl_malloc,发现configure里有#define malloc rpl_malloc一行。分析configure 脚本相关的代码,原来是ac_cv_func_malloc_0_nonnull引起的,OK我们不让它检查了,产生一个cache文件arm-linux.cache,欺骗configure:

    [root@linux tslib]# echo "ac_cv_func_malloc_0_nonnull=yes" >$ ARCH -linux.cache

    [root@linux tslib]# ./configure --prefix=$(ROOTFS_DIR)/usr --host=$ ARCH -linux --cache-file=$ ARCH -linux.cache

    据说也可以,没有尝试。

    ——————
    无论在哪里做什么,只要坚持服务、创新、创造价值,其他的东西自然都会来的。
  • 相关阅读:
    calc属性
    transform,transtion属性
    cursor:属性
    html页面禁止用户右键粘贴复制保存的代码
    git 删除与撤回
    git 仓库原理
    git 创建本地仓库
    git提示错误关于错误:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.
    AttributeError: module 'socket' has no attribute 'SO_REUSEPORT'
    python paramiko模块sftp异常:paramiko.ssh_exception.SSHException: EOF during negotiation
  • 原文地址:https://www.cnblogs.com/pied/p/1675706.html
Copyright © 2011-2022 走看看