Open zlyadvocate opened 3 months ago
also,can't set libnice. Checking for module 'nice' No package 'nice' found Found LibNice: /home/zly/metartcthirdparty/lib/lib/libnice.so
add this before cmake-gui: export PKG_CONFIG_LIBDIR=/home/zly/metartcthirdparty/lib/lib/pkgconfig cmake can find nice.but benchmark ,tests,examples also failed to link .so. Checking for module 'nice' Found nice, version 0.1.22. Maybe should I change libdatachannel to make static library?How to change that?
copy related so to the build directory,fixed.
Hope we can get a more smart way.
The first issue is that the linker found libssl
but not libcrypto
is missing. It probably means your OpenSSL build is broken. Also, note that OpenSSL 1.1 is EOL and doesn't receive security fixes anymore, you should not use it and update to OpenSSL 3.
The following issues are because the .so files are not found. You shouldn't copy them around, instead you should install dynamic libraries, for instance under a /usr/local prefix. libnice is notoriously problematic due to its large number of dependencies, it's easier to use the library packaged with your system.
Creating a static library for libdatachannel itself can be done with the libdatachannel-static CMake target, but it is unrelated and won't solve any of those issues.
[ 70%] Building CXX object CMakeFiles/datachannel.dir/src/impl/verifiedtlstransport.cpp.o [ 70%] Building CXX object CMakeFiles/datachannel.dir/src/impl/websocket.cpp.o [ 72%] Building CXX object CMakeFiles/datachannel.dir/src/impl/websocketserver.cpp.o [ 72%] Building CXX object CMakeFiles/datachannel.dir/src/impl/wstransport.cpp.o [ 72%] Building CXX object CMakeFiles/datachannel.dir/src/impl/wshandshake.cpp.o [ 74%] Linking CXX shared library libdatachannel.so [ 74%] Built target datachannel Scanning dependencies of target datachannel-benchmark [ 74%] Building CXX object CMakeFiles/datachannel-benchmark.dir/test/benchmark.cpp.o [ 74%] Linking CXX executable benchmark /opt/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libssl.so.1.1, needed by libdatachannel.so.0.21.0, not found (try using -rpath or -rpath-link) /opt/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/../lib/gcc/arm-linux-gnueabihf/7.5.0/../../../../arm-linux-gnueabihf/bin/ld: warning: libcrypto.so.1.1, needed by libdatachannel.so.0.21.0, not found (try using -rpath or -rpath-link) libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_use_certificate@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_CIPHER_CTX_ctrl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toDTLS_method@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
PEM_read_bio_PrivateKey@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set_tlsext_use_srtp@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_set_issuer_name@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBN_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_aes_192_ctr@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set1_host@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
CRYPTO_get_ex_new_index@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BN_to_ASN1_INTEGER@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_digest@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_sha256@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_gmtime_adj@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
ERR_peek_last_error@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_meth_set_ctrl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_s_mem@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_NAME_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
ERR_get_error@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_set_cipher_list@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EC_KEY_set_asn1_flag@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_sign@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_set_init@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_set_version@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SHA1_Init@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_Cipher@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_aes_128_gcm@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toERR_error_string_n@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
OPENSSL_cleanse@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_set_verify_depth@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_ctrl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EC_KEY_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toHMAC_Init_ex@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBN_rand@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_sha224@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toTLS_method@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_write@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
HMAC_Update@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_CipherInit_ex@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_export_keying_material@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_EncryptFinal_ex@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_set_connect_state@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_meth_set_create@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_set_subject_name@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_get_ex_data@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
HMAC_CTX_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_meth_set_write@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_read@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_NAME_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_aes_256_gcm@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_check_private_key@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBN_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_set_pubkey@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEC_KEY_generate_key@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_get_serialNumber@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_sha512@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_sha384@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_load_verify_locations@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_meth_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
HMAC_CTX_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_PKEY_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_get_ex_data_X509_STORE_CTX_idx@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set_verify_depth@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
OPENSSL_init_crypto@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSHA1_Update@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
ERR_clear_error@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_ctrl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_set_accept_state@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
PEM_read_bio_X509@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_set_verify@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_get_data@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_getm_notAfter@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_use_PrivateKey@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEC_KEY_new_by_curve_name@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_CTX_set_default_verify_paths@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_EncryptInit_ex@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_set_hostflags@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_shutdown@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_alert_desc_string_long@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toRSA_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_EncryptUpdate@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_meth_set_destroy@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_aes_128_ctr@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_sha1@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_read@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_CIPHER_CTX_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_set_data@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_do_handshake@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_get_selected_srtp_profile@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBIO_set_shutdown@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_aes_256_ctr@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_set_info_callback@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
HMAC_Final@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_set_options@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
OPENSSL_init_ssl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_getm_notBefore@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
BIO_ctrl@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set_verify@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_CIPHER_CTX_free@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_STORE_CTX_get_ex_data@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_CIPHER_CTX_reset@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set_bio@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SHA1_Final@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_CTX_set_quiet_shutdown@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
RSA_generate_key_ex@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_set_ex_data@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_NAME_add_entry_by_NID@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toBN_set_word@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
EVP_PKEY_assign@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toX509_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
SSL_write@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toSSL_get_error@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
X509_STORE_CTX_get_current_cert@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference toEVP_PKEY_new@OPENSSL_1_1_0' libdatachannel.so.0.21.0: undefined reference to
RSA_free@OPENSSL_1_1_0' collect2: error: ld returned 1 exit status