Ijkplayer: Error when compiling with openssl on iOS

Created on 18 Apr 2017  ·  3Comments  ·  Source: bilibili/ijkplayer

Hi.
I do this:

   cd config
   rm module.sh
   ln -s module-default.sh module.sh
   cd ../
   ./init-ios.sh
   ./init-ios-openssl.sh
   cd ios
   ./compile-openssl.sh clean
   ./compile-ffmpeg.sh clean
   ./compile-openssl.sh all
   ./compile-ffmpeg.sh all

But when I run and build IJKMediaDemo.xcodeproj errors occur:
2017-04-18 13 21 34

When I import into my project error occuor too:
2017-04-18 13 27 32
2017-04-18 13 28 25

xcode 8.3. Without openssl all is well, but I need to work with https

Log:

Undefined symbols for architecture x86_64:
"_BN_bin2bn", referenced from:
_ff_dh_compute_shared_secret_key in IJKMediaFramework(rtmpdh.o)
"_DH_compute_key", referenced from:
_ff_dh_compute_shared_secret_key in IJKMediaFramework(rtmpdh.o)
"_BN_bn2bin", referenced from:
_ff_dh_write_public_key in IJKMediaFramework(rtmpdh.o)
"_BN_CTX_new", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_BN_value_one", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_DH_generate_key", referenced from:
_ff_dh_generate_public_key in IJKMediaFramework(rtmpdh.o)
"_BN_free", referenced from:
_ff_dh_generate_public_key in IJKMediaFramework(rtmpdh.o)
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
_ff_dh_compute_shared_secret_key in IJKMediaFramework(rtmpdh.o)
"_BIO_clear_flags", referenced from:
_url_bio_bwrite in IJKMediaFramework(tls_openssl.o)
_url_bio_bread in IJKMediaFramework(tls_openssl.o)
_url_bio_bputs in IJKMediaFramework(tls_openssl.o)
_url_bio_ctrl in IJKMediaFramework(tls_openssl.o)
"_SSL_write", referenced from:
_tls_write in IJKMediaFramework(tls_openssl.o)
"_BN_mod_exp", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_BN_cmp", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_BN_hex2bn", referenced from:
_ff_dh_init in IJKMediaFramework(rtmpdh.o)
_ff_dh_generate_public_key in IJKMediaFramework(rtmpdh.o)
_ff_dh_compute_shared_secret_key in IJKMediaFramework(rtmpdh.o)
"_TLSv1_server_method", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_TLSv1_client_method", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_SSL_CTX_use_PrivateKey_file", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_BN_CTX_free", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_SSL_CTX_set_verify", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_DH_free", referenced from:
_ff_dh_free in IJKMediaFramework(rtmpdh.o)
_ff_dh_init in IJKMediaFramework(rtmpdh.o)
"_SSL_set_bio", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_BN_num_bits", referenced from:
_ff_dh_write_public_key in IJKMediaFramework(rtmpdh.o)
"_DH_new", referenced from:
_ff_dh_init in IJKMediaFramework(rtmpdh.o)
"_SSL_accept", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_ERR_get_error", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
_tls_read in IJKMediaFramework(tls_openssl.o)
_tls_write in IJKMediaFramework(tls_openssl.o)
"_SSL_CTX_load_verify_locations", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_SSL_CTX_use_certificate_chain_file", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_BN_new", referenced from:
_ff_dh_init in IJKMediaFramework(rtmpdh.o)
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_BIO_new", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_SSL_connect", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_SSL_read", referenced from:
_tls_read in IJKMediaFramework(tls_openssl.o)
"_CRYPTO_get_locking_callback", referenced from:
_ff_openssl_init in IJKMediaFramework(tls_openssl.o)
_ff_openssl_deinit in IJKMediaFramework(tls_openssl.o)
"_SSL_library_init", referenced from:
_ff_openssl_init in IJKMediaFramework(tls_openssl.o)
"_CRYPTO_num_locks", referenced from:
_ff_openssl_init in IJKMediaFramework(tls_openssl.o)
_ff_openssl_deinit in IJKMediaFramework(tls_openssl.o)
"_BN_copy", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_SSL_new", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_BN_sub_word", referenced from:
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_ERR_error_string", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
_tls_read in IJKMediaFramework(tls_openssl.o)
_tls_write in IJKMediaFramework(tls_openssl.o)
"_SSL_CTX_free", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
_tls_close in IJKMediaFramework(tls_openssl.o)
"_DH_size", referenced from:
_ff_dh_compute_shared_secret_key in IJKMediaFramework(rtmpdh.o)
"_SSL_free", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
_tls_close in IJKMediaFramework(tls_openssl.o)
"_SSL_CTX_new", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_SSL_load_error_strings", referenced from:
_ff_openssl_init in IJKMediaFramework(tls_openssl.o)
"_BN_set_word", referenced from:
_ff_dh_init in IJKMediaFramework(rtmpdh.o)
_dh_is_valid_public_key in IJKMediaFramework(rtmpdh.o)
"_SSL_shutdown", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
_tls_close in IJKMediaFramework(tls_openssl.o)
"_SSL_ctrl", referenced from:
_tls_open in IJKMediaFramework(tls_openssl.o)
"_CRYPTO_set_locking_callback", referenced from:
_ff_openssl_init in IJKMediaFramework(tls_openssl.o)
_ff_openssl_deinit in IJKMediaFramework(tls_openssl.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Most helpful comment

I solved. But why is this not written in readme?
I did this:

  1. open IJKMediaPlayer project
  2. create a new group name with OpenSSL
  3. add libcrypto.a and libssl.a from ijkplayer-master/ios/build/universal/lib
    2017-04-19 10 08 37

All 3 comments

I solved. But why is this not written in readme?
I did this:

  1. open IJKMediaPlayer project
  2. create a new group name with OpenSSL
  3. add libcrypto.a and libssl.a from ijkplayer-master/ios/build/universal/lib
    2017-04-19 10 08 37

3.5 years later and still relevant.

3.5 years later and still relevant. too

Was this page helpful?
0 / 5 - 0 ratings