FreeSwitch 1.10.9 在CentOS7.9编译spandsp,V18_MODE_5BIT_4545错误

        最近FreeSwitch 1.10.9 在CentOS7.9编译mod_spandsp出问题,

making all mod_spandsp
make[4]: Entering directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandsp'
  CC       mod_spandsp_la-mod_spandsp.lo
  CC       mod_spandsp_la-udptl.lo
  CC       mod_spandsp_la-mod_spandsp_fax.lo
  CC       mod_spandsp_la-mod_spandsp_dsp.lo
mod_spandsp_dsp.c: In function ‘get_v18_mode’:
mod_spandsp_dsp.c:159:10: error: ‘V18_MODE_5BIT_4545’ undeclared (first use in this function)
  int r = V18_MODE_5BIT_4545;
          ^
mod_spandsp_dsp.c:159:10: note: each undeclared identifier is reported only once for each function it appears in
mod_spandsp_dsp.c:165:8: error: ‘V18_MODE_5BIT_50’ undeclared (first use in this function)
    r = V18_MODE_5BIT_50;
        ^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_send_session’:
mod_spandsp_dsp.c:216:2: error: too few arguments to function ‘v18_init’
  tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
  ^
In file included from /usr/local/include/spandsp.h:111:0,
                 from mod_spandsp.h:50,
                 from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared here
 SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
                             ^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_encode_session’:
mod_spandsp_dsp.c:263:2: error: too few arguments to function ‘v18_init’
  pvt->tdd_state = v18_init(NULL, TRUE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, NULL);
  ^
In file included from /usr/local/include/spandsp.h:111:0,
                 from mod_spandsp.h:50,
                 from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared here
 SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
                             ^
mod_spandsp_dsp.c: In function ‘spandsp_tdd_decode_session’:
mod_spandsp_dsp.c:341:2: error: too few arguments to function ‘v18_init’
  pvt->tdd_state = v18_init(NULL, FALSE, get_v18_mode(session), V18_AUTOMODING_GLOBAL, put_text_msg, pvt);
  ^
In file included from /usr/local/include/spandsp.h:111:0,
                 from mod_spandsp.h:50,
                 from mod_spandsp_dsp.c:36:
/usr/local/include/spandsp/v18.h:138:29: note: declared here
 SPAN_DECLARE(v18_state_t *) v18_init(v18_state_t *s,
                             ^
make[4]: *** [mod_spandsp_la-mod_spandsp_dsp.lo] Error 1
make[4]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod/applications/mod_spandsp'
make[3]: *** [mod_spandsp-all] Error 1
make[3]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src/mod'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/freeswitch-1.10.9.-release'
make: *** [all] Error 2

原因:

        由于FreeSwitch依赖spandsp,而spandsp库在不断更新和提交,所以出现版本不兼容的问题。

解决方式:

        回退到匹配版本。

        


git clone https://github.com/freeswitch/spandsp.git
cd spandsp
git checkout -b finecode20230705 0d2e6ac65e0e8f53d652665a743015a88bf048d4

./bootstrap.sh -j
./configure
make
make install

解决问题。
 

  • 8
    点赞
  • 12
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值