【问题标题】:Integrating OpenSSL with PJSIP build error将 OpenSSL 与 PJSIP 构建错误集成
【发布时间】:2017-09-11 07:15:14
【问题描述】:

将最新的 OpenSSL 库与 PJSIP 集成时会出现以下错误。

使用以下命令使用 PJSIP 编译 Openssl 1.1.0f。

./configure-iphone --with-ssl=/Users/nexgetech01/Downloads/OpenSSL-for-iPhone-master/bin/iPhoneOS10.3-armv7.sdk/

它使用 openssl 成功编译并准备好进行构建。

之后,我使用以下命令使用 PJSIP 构建 OpenSSL 库。

制作 dep && 制作干净 && 制作

在构建时出现以下错误。

Undefined symbols for architecture armv7:
  "_SSL_library_init", referenced from:
      _init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
  "_SSL_load_error_strings", referenced from:
      _init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
  "_TLSv1_method", referenced from:
      _create_ssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
  "_TLSv1_server_method", referenced from:
      _init_openssl in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
  "_X509_get_notAfter", referenced from:
      _get_cert_info in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
  "_X509_get_notBefore", referenced from:
      _get_cert_info in libpj-armv7-apple-darwin_ios.a(ssl_sock_ossl.o)
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [../bin/pjlib-test-armv7-apple-darwin_ios] Error 1
make[1]: *** [pjlib-test-armv7-apple-darwin_ios] Error 2
make: *** [all] Error 1

【问题讨论】:

    标签: ios gcc openssl voip pjsip


    【解决方案1】:

    在检查 PJSIP 票证后,此错误已由 PJSIP 开发人员修复。我将展示如何更轻松地修复上述错误。

    请在以下路径中打开ssl_sock_ossl.c文件,

    $(PJSIP_DIR)/pjlib/src/pj/ssl_sock_ossl.c

    按照下面的 PJSIP 链接覆盖 ssl_sock_ossl.c 文件。

    使用以下链接在 ssl_sock_ossl.c 中正确添加绿色线条。

    https://trac.pjsip.org/repos/changeset/5623

    https://trac.pjsip.org/repos/ticket/1999

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-01-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-27
      相关资源
      最近更新 更多