我需要帮助。我尝试使用SRTP 2.1.0和OpenSSL 1.1.0构建JRTPLIB 3.1.1,但在尝试生成JRTPLIB时出现链接器错误。
依赖关系:
Debian 9(也在Ubuntu 16.04 LTS上试过) JRTPLIB v.3_1_11(来自git +更改) JTHREAD v.1_3_3(来自git) LIBSRTP v.2_1_0(按标签) LIBSSL v.1_1_0稳定(按分支)
来源变化: JRTPLIB v.3_1_11(来自git):将srtp更改为srtp2;链接到lib源档案:https://drive.google.com/drive/folders/0B_Q0HXvHrCzabVpsSUp0TXNka1U?usp=sharing
Cmake设置(图片cmake_JRTPLIB.JPG):https://drive.google.com/drive/folders/0B_Q0HXvHrCzabVpsSUp0TXNka1U?usp=sharing
构建
1)的OpenSSL: 从源代码构建并尝试在虚拟机上通过sudo apt-get install libssl1.1 libssl-dev安装libssl1.1和libssl-dev 2)libSRTP: $。/ configure --enable-debug-logging --enable-log-stdout --enable-openssl
3)JTHREAD:使用cmake构建
4)JRTPLIB:Cmake配置 - 请参阅图像cmake_JRTPLIB.JPG $化妆
错误日志:
Scanning dependencies of target jrtplib-static
[ 1%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpapppacket.cpp.o
[ 2%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpbyepacket.cpp.o
[ 3%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpcompoundpacket.cpp.o
[ 4%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpcompoundpacketbuilder.cpp.o
[ 4%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcppacket.cpp.o
[ 5%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcppacketbuilder.cpp.o
[ 6%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcprrpacket.cpp.o
[ 7%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpscheduler.cpp.o
[ 8%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsdesinfo.cpp.o
[ 8%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsdespacket.cpp.o
[ 9%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtcpsrpacket.cpp.o
[ 10%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpcollisionlist.cpp.o
[ 11%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpdebug.cpp.o
[ 12%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtperrors.cpp.o
[ 12%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpinternalsourcedata.cpp.o
[ 13%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv4address.cpp.o
[ 14%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv6address.cpp.o
[ 15%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv4destination.cpp.o
[ 16%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpipv6destination.cpp.o
[ 16%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtplibraryversion.cpp.o
[ 17%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppacket.cpp.o
[ 18%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppacketbuilder.cpp.o
[ 19%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtppollthread.cpp.o
[ 20%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandom.cpp.o
[ 20%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomrand48.cpp.o
[ 21%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomrands.cpp.o
[ 22%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtprandomurandom.cpp.o
[ 23%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsession.cpp.o
[ 24%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsessionparams.cpp.o
[ 25%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsessionsources.cpp.o
[ 25%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsourcedata.cpp.o
[ 26%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsources.cpp.o
[ 27%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtptimeutilities.cpp.o
[ 28%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpudpv4transmitter.cpp.o
[ 29%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpudpv6transmitter.cpp.o
[ 29%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpbyteaddress.cpp.o
[ 30%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpexternaltransmitter.cpp.o
[ 31%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpsecuresession.cpp.o
[ 32%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtpabortdescriptors.cpp.o
[ 33%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtptcpaddress.cpp.o
[ 33%] Building CXX object src/CMakeFiles/jrtplib-static.dir/rtptcptransmitter.cpp.o
[ 34%] Building CXX object src/CMakeFiles/jrtplib-static.dir/extratransmitters/rtpfaketransmitter.cpp.o
[ 35%] Linking CXX static library libjrtp.a
[ 35%] Built target jrtplib-static
Scanning dependencies of target jrtplib-shared
[ 35%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpapppacket.cpp.o
[ 36%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpbyepacket.cpp.o
[ 37%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpcompoundpacket.cpp.o
[ 38%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpcompoundpacketbuilder.cpp.o
[ 39%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcppacket.cpp.o
[ 39%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcppacketbuilder.cpp.o
[ 40%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcprrpacket.cpp.o
[ 41%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpscheduler.cpp.o
[ 42%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsdesinfo.cpp.o
[ 43%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsdespacket.cpp.o
[ 44%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtcpsrpacket.cpp.o
[ 44%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpcollisionlist.cpp.o
[ 45%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpdebug.cpp.o
[ 46%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtperrors.cpp.o
[ 47%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpinternalsourcedata.cpp.o
[ 48%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv4address.cpp.o
[ 48%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv6address.cpp.o
[ 49%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv4destination.cpp.o
[ 50%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpipv6destination.cpp.o
[ 51%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtplibraryversion.cpp.o
[ 52%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppacket.cpp.o
[ 52%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppacketbuilder.cpp.o
[ 53%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtppollthread.cpp.o
[ 54%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandom.cpp.o
[ 55%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomrand48.cpp.o
[ 56%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomrands.cpp.o
[ 56%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtprandomurandom.cpp.o
[ 57%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsession.cpp.o
[ 58%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsessionparams.cpp.o
[ 59%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsessionsources.cpp.o
[ 60%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsourcedata.cpp.o
[ 60%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsources.cpp.o
[ 61%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtptimeutilities.cpp.o
[ 62%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpudpv4transmitter.cpp.o
[ 63%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpudpv6transmitter.cpp.o
[ 64%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpbyteaddress.cpp.o
[ 64%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpexternaltransmitter.cpp.o
[ 65%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpsecuresession.cpp.o
[ 66%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtpabortdescriptors.cpp.o
[ 67%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtptcpaddress.cpp.o
[ 68%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/rtptcptransmitter.cpp.o
[ 69%] Building CXX object src/CMakeFiles/jrtplib-shared.dir/extratransmitters/rtpfaketransmitter.cpp.o
[ 69%] Linking CXX shared library libjrtp.so
[ 69%] Built target jrtplib-shared
Scanning dependencies of target example4
[ 69%] Building CXX object examples/CMakeFiles/example4.dir/example4.cpp.o
[ 70%] Linking CXX executable example4
[ 70%] Built target example4
Scanning dependencies of target example2
[ 71%] Building CXX object examples/CMakeFiles/example2.dir/example2.cpp.o
[ 72%] Linking CXX executable example2
[ 72%] Built target example2
Scanning dependencies of target example5
[ 73%] Building CXX object examples/CMakeFiles/example5.dir/example5.cpp.o
[ 74%] Linking CXX executable example5
[ 74%] Built target example5
Scanning dependencies of target example8
[ 75%] Building CXX object examples/CMakeFiles/example8.dir/example8.cpp.o
[ 76%] Linking CXX executable example8
[ 76%] Built target example8
Scanning dependencies of target example1
[ 77%] Building CXX object examples/CMakeFiles/example1.dir/example1.cpp.o
[ 77%] Linking CXX executable example1
[ 77%] Built target example1
Scanning dependencies of target example6
[ 78%] Building CXX object examples/CMakeFiles/example6.dir/example6.cpp.o
[ 78%] Linking CXX executable example6
[ 78%] Built target example6
Scanning dependencies of target example7
[ 79%] Building CXX object examples/CMakeFiles/example7.dir/example7.cpp.o
[ 80%] Linking CXX executable example7
/usr/local/lib/libsrtp2.a(datatypes.o): In function octet_string_set_to_zero': datatypes.c:(.text+0x1d91): undefined reference toOPENSSL_cleanse'
/usr/local/lib/libsrtp2.a(aes_icm_ossl.o): In function srtp_aes_icm_openssl_set_iv': aes_icm_ossl.c:(.text+0x77): undefined reference toEVP_EncryptInit_ex'
/usr/local/lib/libsrtp2.a(aes_icm_ossl.o): In function srtp_aes_icm_openssl_encrypt': aes_icm_ossl.c:(.text+0xe8): undefined reference toEVP_EncryptUpdate'
aes_icm_ossl.c:(.text+0x113): undefined reference to EVP_EncryptFinal_ex' /usr/local/lib/libsrtp2.a(aes_icm_ossl.o): In functionsrtp_aes_icm_openssl_context_init':
aes_icm_ossl.c:(.text+0x1f9): undefined reference to EVP_aes_128_ctr' aes_icm_ossl.c:(.text+0x20d): undefined reference toEVP_EncryptInit_ex'
aes_icm_ossl.c:(.text+0x231): undefined reference to EVP_aes_256_ctr' aes_icm_ossl.c:(.text+0x241): undefined reference toEVP_aes_192_ctr'
/usr/local/lib/libsrtp2.a(aes_icm_ossl.o): In function srtp_aes_icm_openssl_dealloc': aes_icm_ossl.c:(.text+0x26c): undefined reference toEVP_CIPHER_CTX_free'
/usr/local/lib/libsrtp2.a(aes_icm_ossl.o): In function srtp_aes_icm_openssl_alloc': aes_icm_ossl.c:(.text+0x36a): undefined reference toEVP_CIPHER_CTX_new'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_get_tag': aes_gcm_ossl.c:(.text+0x18): undefined reference toEVP_Cipher'
aes_gcm_ossl.c:(.text+0x2c): undefined reference to EVP_CIPHER_CTX_ctrl' /usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In functionsrtp_aes_gcm_openssl_set_aad':
aes_gcm_ossl.c:(.text+0x71): undefined reference to EVP_CIPHER_CTX_ctrl' aes_gcm_ossl.c:(.text+0x81): undefined reference toEVP_Cipher'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_context_init': aes_gcm_ossl.c:(.text+0xeb): undefined reference toEVP_aes_256_gcm'
aes_gcm_ossl.c:(.text+0x102): undefined reference to EVP_CipherInit_ex' aes_gcm_ossl.c:(.text+0x129): undefined reference toEVP_aes_128_gcm'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_dealloc': aes_gcm_ossl.c:(.text+0x147): undefined reference toEVP_CIPHER_CTX_free'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_encrypt': aes_gcm_ossl.c:(.text+0x19e): undefined reference toEVP_Cipher'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_decrypt': aes_gcm_ossl.c:(.text+0x1e3): undefined reference toEVP_CIPHER_CTX_ctrl'
aes_gcm_ossl.c:(.text+0x1f9): undefined reference to EVP_Cipher' aes_gcm_ossl.c:(.text+0x208): undefined reference toEVP_Cipher'
/usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In function srtp_aes_gcm_openssl_set_iv': aes_gcm_ossl.c:(.text+0x293): undefined reference toEVP_CipherInit_ex'
aes_gcm_ossl.c:(.text+0x2c1): undefined reference to EVP_CIPHER_CTX_ctrl' aes_gcm_ossl.c:(.text+0x2db): undefined reference toEVP_CIPHER_CTX_ctrl'
aes_gcm_ossl.c:(.text+0x2f2): undefined reference to EVP_CIPHER_CTX_ctrl' /usr/local/lib/libsrtp2.a(aes_gcm_ossl.o): In functionsrtp_aes_gcm_openssl_alloc':
aes_gcm_ossl.c:(.text+0x3cb): undefined reference to EVP_CIPHER_CTX_new' /usr/local/lib/libsrtp2.a(hmac_ossl.o): In functionsrtp_hmac_start':
hmac_ossl.c:(.text+0xe): undefined reference to HMAC_Init_ex' /usr/local/lib/libsrtp2.a(hmac_ossl.o): In functionsrtp_hmac_update':
hmac_ossl.c:(.text+0x61): undefined reference to HMAC_Update' /usr/local/lib/libsrtp2.a(hmac_ossl.o): In functionsrtp_hmac_init':
hmac_ossl.c:(.text+0x8e): undefined reference to EVP_sha1' hmac_ossl.c:(.text+0xa2): undefined reference toHMAC_Init_ex'
/usr/local/lib/libsrtp2.a(hmac_ossl.o): In function srtp_hmac_dealloc': hmac_ossl.c:(.text+0xc9): undefined reference toHMAC_CTX_free'
/usr/local/lib/libsrtp2.a(hmac_ossl.o): In function srtp_hmac_compute': hmac_ossl.c:(.text+0x129): undefined reference toHMAC_Update'
hmac_ossl.c:(.text+0x142): undefined reference to HMAC_Final' /usr/local/lib/libsrtp2.a(hmac_ossl.o): In functionsrtp_hmac_alloc':
hmac_ossl.c:(.text+0x21c): undefined reference to `HMAC_CTX_new'
collect2: error: ld returned 1 exit status
examples/CMakeFiles/example7.dir/build.make:96: ошибка выполнения рецепта для цели «examples/example7»
make[2]: *** [examples/example7] Ошибка 1
CMakeFiles/Makefile2:415: ошибка выполнения рецепта для цели «examples/CMakeFiles/example7.dir/all»
make[1]: *** [examples/CMakeFiles/example7.dir/all] Ошибка 2
Makefile:127: ошибка выполнения рецепта для цели «all»
make: *** [all] Ошибка 2