error while building pjsip in linux

China☆狼群 提交于 2019-12-08 09:01:40

问题


I am getting following error while building pjsip as mentioned in this link.

When I run the make command:

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
                               ^  

Edit:

  1. OS Name: Ubuntu 16.04 LTS && 64 bit
  2. Build Command:

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

And downloaded the source code from this link


回答1:


Ubuntu 16.04 - amd64

git clone https://github.com/svn2github/pjsip.git ... or pjproject-2.7.2.tar.bz2 : Both will build OK here, with gcc version 4.8 → sudo apt install g++-4.8

Build example, ref. 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

Interesting is that pjsip can be built with gcc, g++ v. 7.3 on an rpm based OS. But then again, the Ubuntu gcc´s have a very different patching.



来源:https://stackoverflow.com/questions/49532021/error-while-building-pjsip-in-linux

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!