Fundamentals 30 min read

Porting QQ Audio/Video SDK to Linux: Architecture, Build Process, and Debugging

The article details the complete process of porting QQ's NTRTC audio/video SDK to Linux, covering platform surveys, packaging, build‑time issues like GLIBC mismatches and fPIC errors, debugging steps, Qt/Electron demos, GPU blocklist workarounds, and future compatibility plans.

Tencent Cloud Developer
Tencent Cloud Developer
Tencent Cloud Developer
Porting QQ Audio/Video SDK to Linux: Architecture, Build Process, and Debugging

This article documents the end‑to‑end process of adapting the QQ desktop audio/video SDK (NTRTC) for Linux platforms. It begins with a background on the new Linux QQ version and the need to support audio/video calls, followed by a systematic Linux platform survey covering kernel basics, major distributions, CPU architectures, and required development environments.

The author then describes the packaging of the SDK into various formats (deb, rpm, AppImage, etc.) and the preparation of development tools (CMake, GCC/Clang, VSCode, Git). Key build challenges are highlighted, such as GLIBC version mismatches (e.g., GLIBC_2.29 not found), missing symbols in libstdc++.so.6 , and fPIC errors when linking static libraries. The solution involves inspecting library dependencies with ldd and strings , using lower‑version toolchains, and merging static libraries via ar (extracting objects, renaming duplicates, and recreating the archive with ranlib ).

After successful compilation, the author builds a Qt demo and an Electron demo to verify the SDK. The Electron integration required disabling the default sandbox (removing --enable-sandbox ) and addressing permission errors when loading the AVSDKPlugin.so module.

A major issue was the failure of PPB_Graphics3D::Create on certain Linux environments, leading to black screens. Investigation revealed that Chromium automatically adds the --disable-gpu-compositing flag based on GPU blocklists. The author traced this through the Chromium source ( gpu_data_manager_impl.cc ) and resolved it by either ignoring the blocklist ( --ignore-gpu-blocklist ) or, to avoid side effects on the main QQ process, implementing a fallback rendering path using PPB_Graphics2D . This fallback renders frames off‑screen with an OpenGL context, reads back RGBA pixels, and paints them via the 2D API.

Additional debugging steps include attaching to the audio/video process with CLion, handling FD ownership crashes by modifying Chromium’s launch code, and configuring library search paths with patchelf . The article concludes with performance observations, remaining compatibility challenges, and future plans to support additional architectures (loongarch64, mips64el) and improve video rendering stability.

debuggingSDKElectronLinuxcmakeAudioVideoglibc
Tencent Cloud Developer
Written by

Tencent Cloud Developer

Official Tencent Cloud community account that brings together developers, shares practical tech insights, and fosters an influential tech exchange community.

0 followers
Reader feedback

How this landed with the community

login Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.