title: Error building Android webrtc library with openssl
body: <p>I am building the webrtc library for Android, using the following configuration:</p>
  <blockquote>
  <p>gn gen out/Release-arm64 -args='target_os=&quot;android&quot; target_cpu=&quot;arm64&quot; use_custom_libcxx=false use_custom_libcxx_for_host=false is_debug=false is_component_build=false rtc_include_tests=false symbol_level=0 rtc_enable_symbol_export=false rtc_build_examples=false treat_warnings_as_errors=false rtc_build_ssl=false rtc_ssl_root=&quot;/usr/local/src/openssl-1.1.1k/include&quot;'</p>
  </blockquote>
  <p>but am getting the following errors:</p>
  <pre><code>FAILED: libjingle_peerconnection_so.so libjingle_peerconnection_so.so.TOC lib.unstripped/libjingle_peerconnection_so.so 
  python3 &quot;../../build/toolchain/gcc_solink_wrapper.py&quot; --readelf=&quot;../../third_party/llvm-build/Release+Asserts/bin/llvm-readelf&quot; --nm=&quot;../../third_party/llvm-build/Release+Asserts/bin/llvm-nm&quot; --strip=../../third_party/llvm-build/Release+Asserts/bin/llvm-strip  --sofile=&quot;./lib.unstripped/libjingle_peerconnection_so.so&quot; --tocfile=&quot;./libjingle_peerconnection_so.so.TOC&quot; --output=&quot;./libjingle_peerconnection_so.so&quot; -- ../../third_party/llvm-build/Release+Asserts/bin/clang++ -shared -Wl,-soname=&quot;libjingle_peerconnection_so.so&quot; -lEGL -Wl,--build-id -fuse-ld=lld -Wl,--fatal-warnings -Wl,--build-id -fPIC -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,-z,max-page-size=4096 -Wl,--icf=all -Wl,--color-diagnostics -Wl,--no-rosegment -Wl,--no-call-graph-profile-sort -Wl,--exclude-libs=libvpx_assembly_arm.a --unwindlib=none --target=aarch64-linux-android21 -Wl,-mllvm,-enable-machine-outliner=never -no-canonical-prefixes -Wl,--warn-shared-textrel -Wl,-O2 -Wl,--gc-sections --sysroot=../../third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot -Wl,--warn-shared-textrel -Wl,-z,defs -Wl,--as-needed -Wl,--version-script=../../build/android/android_only_jni_exports.lst -Wl,--dynamic-linker,/system/bin/linker64 -o &quot;./lib.unstripped/libjingle_peerconnection_so.so&quot; @&quot;./libjingle_peerconnection_so.so.rsp&quot; 
  ld.lld: error: undefined symbol: SSL_ctrl
  &gt;&gt;&gt; referenced by openssl_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_adapter.o:(rtc::OpenSSLAdapter::BeginSSL()) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced by openssl_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_adapter.o:(rtc::OpenSSLAdapter::BeginSSL()) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced by openssl_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_adapter.o:(rtc::OpenSSLAdapter::BeginSSL()) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced 5 more times
  
  ld.lld: error: undefined symbol: SSL_CTX_ctrl
  &gt;&gt;&gt; referenced by openssl_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_adapter.o:(rtc::OpenSSLAdapter::CreateContext(rtc::SSLMode, bool)) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced by openssl_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_adapter.o:(rtc::OpenSSLAdapter::CreateContext(rtc::SSLMode, bool)) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced by openssl_stream_adapter.cc
  &gt;&gt;&gt;               rtc_base/openssl_stream_adapter.o:(rtc::OpenSSLStreamAdapter::SetupSSLContext()) in archive obj/rtc_base/librtc_base.a
  &gt;&gt;&gt; referenced 3 more times
  clang++: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  <p>Interestingly enough, when I use the default boringssl in webrtc (which builds fine), I get these same link errors when building my app (I'm using a websockets lib that makes the same ssl calls).</p>
  <p>Any feedback is appreciated.</p>