我在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
^
命令时:
cd pjproject-2.7.2/
chmod 777 configure
chmod 777 aconfigure
./configure
make dep
make
修改:
构建命令:
{{1}}
答案 0 :(得分: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的修补方式却截然不同。