Libwebrtc linker errors with application compiled using libstdcxx ABI and gcc

We have been using the libwebrtc tool provided by Nvidia for hardware accelerated webrtc streams in our application.

Recently, we decided to upgrade our system to integrate with Jetson AGX Orin. The latest libwebrtc tool provided by Nvidia seems to be using google’s custom clang toolchain (default for building recent libwebrtc versions).

Ultimately, we get a host of linker errors, since we compile our app using gcc and libstdcxx. The linker fails to find symbols in the std::__cr namespace which points to an ABI incompatibility.

I wanted to know if there was a version of libwebrtc tool for jetson that was built with standard toolchains.

If there are other ways to resolve then please do let me know.

Thanks.

*** Please note that this reply is generated by LLM automatically ***

The issue you’re facing is due to the ABI (Application Binary Interface) incompatibility between the libwebrtc library built with Google’s custom Clang toolchain and your application built with GCC. This incompatibility arises because the libwebrtc library is using a different C++ standard library (libc++) than your application, which is using libstdc++.

To resolve this issue, you have a few options:

  1. Use the same toolchain: Try to build your application using the same Clang toolchain that was used to build the libwebrtc library. This will ensure that both your application and the library are using the same ABI and C++ standard library.
  2. Use a compatible libwebrtc version: Look for an older version of the libwebrtc library that was built with GCC and libstdc++. This might not be the latest version, but it should be compatible with your application’s toolchain.
  3. Build libwebrtc with GCC: If you have the source code for libwebrtc, you can try building it with GCC and libstdc++. This will ensure that the library is built with the same ABI and C++ standard library as your application.
  4. Use a wrapper library: Create a wrapper library that provides a compatible interface between your application and the libwebrtc library. This wrapper library can be built with the same toolchain as the libwebrtc library, and then linked with your application.

Regarding the availability of a libwebrtc tool for Jetson that was built with standard toolchains, I couldn’t find any information on a specific version that is built with GCC and libstdc++. However, you can try contacting NVIDIA support or checking their forums to see if anyone has built a compatible version.

In comparison, the Jetson Linux Toolchain provided by NVIDIA is based on GCC 11.3.0 and Binutils 2.38, which might not be compatible with the latest libwebrtc versions. However, you can try using this toolchain to build your application and see if it resolves the ABI incompatibility issue.

In summary, to resolve the ABI incompatibility issue, you can try using the same toolchain, finding a compatible libwebrtc version, building libwebrtc with GCC, or creating a wrapper library. If none of these options work, you may need to contact NVIDIA support for further assistance.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi,
We may not be able to rebuild the libs, please check if you can adjust your environment to use the libs. The latest package is

Jetson Linux Release 36.4.4 | NVIDIA Developer
https://developer.nvidia.com/downloads/embedded/l4t/r36_release_v4.4/release/WebRTC_r36.4.4_aarch64.tbz2

Thank you for your reply DaneLL.L.

We have had no success building and linking the project with standard clang environment. Unfortunately, the only option remaining is to use the same custom libc++ to compile our application . This is not something we are able to do as it can potentially cause issues with other libraries linked to our application and for future provisioning.

I would request for re-built libwebrtc version if possible. Alternatively, we will have to abandon this library and look for alternate hardware accelerated options for streaming through webrtc.

Thank you!

Hi,
We would suggest looks for other solution if these libs cannot be fit into your use-case.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.