【问题标题】:error while building pjsip in linux在linux中构建pjsip时出错
【发布时间】:2018-03-29 22:04:53
【问题描述】:

如this link 中所述,我在构建pjsip 时遇到以下错误。

当我运行make 命令时:

In file included from /usr/lib/gcc/x86_64-linux-gnu/5/include/errno.h:28:0,      
                 from ../include/pj/compat/socket.h:131,  
                 from ../src/pj/ioqueue_select.c:38:    
../src/pj/ioqueue_common_abs.c: In function ‘pj_ioqueue_recv’:  
../include/pj/compat/os_auto.h:149:31: error: ‘EAGAIN’ undeclared (first use in this function)   
 #define PJ_BLOCKING_ERROR_VAL EAGAIN
                               ^  

编辑:

  1. 操作系统名称:Ubuntu 16.04 LTS && 64 位
  2. 构建命令:

    cd pjproject-2.7.2/
    chmod 777 configure
    chmod 777 aconfigure
    ./configure  
    make dep  
    make  
    

并从this link下载源代码

【问题讨论】:

  • Assume $ svn co https://svn.pjsip.org/repos/pjproject/trunk ... 请编辑您的问题以包含 1. 操作系统名称和版本。 2. 使用的构建命令,如cd trunk/ && ./configure --option --option1 --option2 && make dep && make
  • @KnudLarsen,感谢您的评论。我已经编辑了问题。
  • 我也尝试按照您的建议从 svn 构建,但结果相同。
  • 您要为哪个设备构建?

标签: linux sip voip pjsip


【解决方案1】:

Ubuntu 16.04 - amd64

git clone https://github.com/svn2github/pjsip.git ... 或 pjproject-2.7.2.tar.bz2 :两者都可以在这里构建,gcc 版本 4.8 → sudo apt install g++-4.8

构建示例,参考。 https://trac.pjsip.org/repos/wiki/Getting-Started/Autoconf

export CC=gcc-4.8 CXX=g++-4.8 && ./configure --enable-shared --disable-static --enable-memalign-hack
make dep && make

有趣的是 pjsip 可以在基于 rpm 的操作系统上使用 gcc、g++ v. 7.3 构建。但话又说回来,Ubuntu gcc 有一个非常不同的补丁。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-01-19
    • 1970-01-01
    • 2019-03-17
    • 1970-01-01
    • 2019-10-15
    • 2017-03-09
    • 2014-07-15
    相关资源
    最近更新 更多