asterisk - 如何修复星号 1.8.18+ 编译错误?
问题描述
我正在编译 Asterisk 1.8.32.3(错误从 1.8.18 持续存在),最后我得到了这个错误:
root@ubuntu:/usr/src/asterisk-1.8.32.3# make
CC="cc" CXX="" LD="" AR="" RANLIB="" CFLAGS="" make -C menuselect CONFIGURE_SILENT="--silent" makeopts
make[1]: Entering directory '/usr/src/asterisk-1.8.32.3/menuselect'
make[1]: 'makeopts' is up to date.
make[1]: Leaving directory '/usr/src/asterisk-1.8.32.3/menuselect'
[CC] tcptls.c -> tcptls.o
*tcptls.c: In function ‘tcptls_stream_close’:
tcptls.c:401:20: error: dereferencing pointer to incomplete type
if (!stream->ssl->server) {*
^
tcptls.c:403:5: warning: ‘ERR_remove_state’ is deprecated (declared at /usr/include/openssl/err.h:261) [-Wdeprecated-declarations]
ERR_remove_state(0);
^
tcptls.c: In function ‘__ssl_setup’:
tcptls.c:768:4: warning: implicit declaration of function ‘SSLv2_client_method’ [-Wimplicit-function-declaration]
cfg->ssl_ctx = SSL_CTX_new(SSLv2_client_method());
^
tcptls.c:768:4: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/src/asterisk-1.8.32.3/include/asterisk/tcptls.h:59:0,
from tcptls.c:44:
/usr/include/openssl/ssl.h:1503:17: note: expected ‘const struct SSL_METHOD *’ but argument is of type ‘int’
__owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
^
tcptls.c:773:4: warning: implicit declaration of function ‘SSLv3_client_method’ [-Wimplicit-function-declaration]
cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method());
^
tcptls.c:773:4: warning: passing argument 1 of ‘SSL_CTX_new’ makes pointer from integer without a cast [enabled by default]
In file included from /usr/src/asterisk-1.8.32.3/include/asterisk/tcptls.h:59:0,
from tcptls.c:44:
/usr/include/openssl/ssl.h:1503:17: note: expected ‘const struct SSL_METHOD *’ but argument is of type ‘int’
__owur SSL_CTX *SSL_CTX_new(const SSL_METHOD *meth);
^
tcptls.c:775:4: warning: ‘TLSv1_client_method’ is deprecated (declared at /usr/include/openssl/ssl.h:1879) [-Wdeprecated-declarations]
cfg->ssl_ctx = SSL_CTX_new(TLSv1_client_method());
^
/usr/src/asterisk-1.8.32.3/Makefile.rules:109: recipe for target 'tcptls.o' failed
make[1]: *** [tcptls.o] Error 1
Makefile:351: recipe for target 'main' failed
make: *** [main] Error 2
最重要的是行:
tcptls.c: In function ‘tcptls_stream_close’:
tcptls.c:401:20: error: dereferencing pointer to incomplete type
if (!stream->ssl->server) {
^
我正在使用 dahdi 2.11.2 和 g++/gcc 4.8;在 Ubuntu 16.04 上编译
有人知道如何解决这个问题吗?
PS 我只需要在 Ubuntu 16.04 上编译星号 1.8.18+。
解决方案
您应该使用较旧的 SSL 版本(通常也意味着其他操作系统)或较新的星号版本。
不再支持 1.8.x。
推荐阅读
- python - 为什么在 python 中运行多个线程时打印会混乱?
- azure - 在 Active Directory 应用程序中使用的 Azure Graph API 的活动/审核日志
- python - 初学者 Django:Python ImportError 和 ModuleNotFoundError
- laravel - Laravel:返回带有引用列的查询
- python - 使用亮度通道的平均值调整图像亮度和对比度
- flutter - Flutter 从 Stepper TextFields 获取数据
- python-3.x - gpiozero -> 运动传感器和 LED
- c - VXWorks 向头文件添加函数
- ios - SwiftUI VStack 右对齐单个元素
- python - 使用 Python 将嵌套的 JSON 转换为 CSV