error while building pjsip in linux

2019-06-12 15:56发布

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条回答
地球回转人心会变
2楼-- · 2019-06-12 16:34

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.

查看更多
登录 后发表回答