2

Pre-requisites

  • Pre-built SDK from the website

  • Firebase C++ SDK version: 9.0.0

  • Main Firebase Components in concern: App (Auth, Database, etc.)

  • Other Firebase Components in use: Database (Auth, Database, etc.)

  • The platform you are using the C++ SDK on Ubuntu 18.04.6 LTS (Mac, Windows, or Linux)

  • The platform you are targeting: Desktop (iOS, Android, and/or desktop)

Problem-Statement

I am building Firebase Sdk with WebRtc. while adding firebase App classes I am getting the following error.

home/webrtc/lib_webrtc/src/third_party/boringssl/src/ssl/ssl_lib.cc.o first defined here

../firebase/libs/linux/x86_64/legacy/libfirebase_app.a(93f69bbf5771d4a5b72056dec59d993b_ssl_lib.cc.o): In function ssl_st::~ssl_st()':

/home/runner/work/firebase-cpp-sdk/firebase-cpp-sdk/out-sdk/external/src/boringssl/src/ssl/ssl_lib.cc:655: multiple definition of ssl_st::~ssl_st()'

getting the same error for every function of ssl_st

Stand-alone Both Firebase SDK and Webrtc SDK are working fine, the above error arises upon integrating these two.

  • 1
    Probably, that's because each of WebRTC and Firebase SDK uses its own version of BoringSSL, so you have 2 different SSL libs with same symbols, and linker doesn't know which to use. – Artem Suprunov Jun 29 '22 at 17:10
  • Yes, They both use SSL libs with the same symbols. Is there any way to link them together? – Muhammad Zaid Ali Jun 30 '22 at 12:00
  • Try to turn off "rtc_build_ssl" flag when building WebRTC - that will disable building own BoringSSL lib. And also you will need to specify in option "rtc_ssl_root path" path to BoringSSL includes from Firebase SDK. Link to build options: https://chromium.googlesource.com/external/webrtc/+/47f33cb28ffb0fa0f053ae0aa0086e11f85bf444/webrtc/base/BUILD.gn#91 – Artem Suprunov Jun 30 '22 at 17:05
  • If that won't help, you might need to modify build scripts to make WebRTC use external SSL lib. This is how it is done by Intel: https://github.com/open-webrtc-toolkit/owt-client-native/tree/main/build_overrides/ssl They use OpenSSL instead of Boring but this is just an example. – Artem Suprunov Jun 30 '22 at 17:05
  • @ArtemSuprunov I already tried to do that, but I don't have access to Firebase Cpp files, their SDK provides only headers and compiled libs. – Muhammad Zaid Ali Jul 01 '22 at 06:08
  • There is a way to link both libs in one process, but WebRTC should be wrapped in dynamic lib so that all its internal symbols will be hidden, and only your custom interface should be visible. Check "Solution 1" in my answer: https://stackoverflow.com/questions/71107066/how-to-integrate-part-of-webrtc-as-a-static-dynamic-library-with-the-existing/71190559#71190559 – Artem Suprunov Jul 01 '22 at 11:34

0 Answers0