freeswitch1.10.9-dev linux编译历程

#下载freeswitch及其模块依赖的库 这边用了镜像站速度比较快

git clone https://hub.yzuu.cf/signalwire/freeswitch.git

git clone https://hub.yzuu.cf/freeswitch/sofia-sip.git

git clone https://hub.yzuu.cf/signalwire/libks.git

git clone https://hub.yzuu.cf/signalwire/signalwire-c.git

git clone https://hub.yzuu.cf/libav/libav

#进入和编译每个模块 

cd sofia-sip

./bootstrap.sh -j

./configure

make

sudo make install

sudo ldconfig

cd ../libks

cmake .

make

sudo make install

sudo ldconfig

cd ../signalwire-c

cmake .

make

sudo make install

sudo ldconfig

cd ../libav

./configure --enable-shared

make

sudo make install

sudo ldconfig

#编译freeswitch, export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig这条命令告诉fs去哪里找sofia-sip和spandsp

export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig

cd  ../freeswitch

./bootstrap.sh -j

./configure CFLAGS=-Wno-error

报错

./include/fspr_general.h:33:14: error: ‘__DARWIN_NSIG’ undeclared here (not in a function)

  33 | #define NSIG __DARWIN_NSIG

将libs\apr\include\fspr_general.h 里第33行改为

#if !defined(NSIG) && !defined(_ANSI_SOURCE) && defined(_DARWIN_C_SOURCE)

继续编译

报错avformat.c: In function ‘mod_avformat_alloc_output_context2’:

avformat.c:405:18: error: ‘AVFormatContext’ has no member named ‘url’

  405 |                s->url = av_strdup(filename);

查看为版本号判断错误 将src\mod\applications\mod_av\avformat.c里402行改为

#if 1//(LIBAVCODEC_VERSION_INT < AV_VERSION_INT(58,7,100))

重新编译

编译通过

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容