Step-by-step guide to building RenderDoc on Bianbu Linux riscv64, including Qt5 to Qt6 migration, deployment, and frame capture on PowerVR BXM-4-64.
RenderDoc is the de facto graphics debugger for frame capture, draw-call replay, and shader inspection. Official binaries are only published for x86 and ARM, so running it on RISC-V requires a source build. A community contributor recently documented the full workflow for SpacemiT K3 running Bianbu Linux, including the only non-trivial change: migrating the Qt GUI from Qt5 to Qt6.
The good news is that the capture and replay core is almost entirely architecture-agnostic. The Linux capture path uses LD_PRELOAD to intercept graphics API calls, and the software shader interpreter is pure C++. On K3 the GPU is the PowerVR BXM-4-64, so replay uses the real Vulkan/OpenGL ES driver. The result is a working qrenderdoc that can capture GLES applications on Wayland.Install the build dependencies first:
sudo apt-get update sudo apt-get install -y cmake ninja-build \ libxcb-keysyms1-dev \ qt6-base-dev qt6-tools-dev qt6-svg-dev qt6-5compat-devlibxcb-keysyms1-dev is required or CMake configure aborts. qt6-5compat-dev is required because qrenderdoc still uses QTextCodec, which moved to the QtCore5Compat module in Qt6.
Start by building the command-line tools and core library without the GUI:
git clone https://github.com/baldurk/renderdoc.git cd renderdoc git checkout 4e59f62a9 git switch -c riscv-qt6-port mkdir -p build-riscv && cd build-riscv cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_QRENDERDOC=OFF \ -DENABLE_PYRENDERDOC=OFF cmake --build .Outputs:
Check that the binary is a RISC-V ELF and has no missing libraries:
file bin/renderdoccmd ldd bin/renderdoccmd | grep "not found" ./bin/renderdoccmd versionThe version string prints "x64" as a hard-coded upstream label; this can be ignored.
Bianbu supplies Qt6 but upstream qrenderdoc is written for Qt5. The contributor produced a single git patch covering 62 files and approximately +362/-142 lines. Apply it before enabling the GUI build:
cd /path/to/renderdoc git am 0001-Port-qrenderdoc-UI-to-Qt6.patchKey API replacements in the patch:
Then build the GUI:
cd build-riscv cmake .. -G Ninja \ -DCMAKE_BUILD_TYPE=Release \ -DENABLE_QRENDERDOC=ON \ -DENABLE_PYRENDERDOC=OFF \ -DQMAKE_QT5_COMMAND=/usr/bin/qmake6 cmake --build .Pitfall 1: Running qmake6 manually fails with "please set the Build Environment Variable CMAKE_DIR"
Cause: qrenderdoc is a qmake sub-project invoked by CMake. The .pro file uses DESTDIR=$$CMAKE_DIR/bin, and CMAKE_DIR is empty when qmake6 is run by hand.Fix: pass the variable explicitly:
qmake6 CMAKE_DIR=/path/to/renderdoc/build-riscvPitfall 2: Link errors mentioning libatomic
Cause: Bianbu's Qt6 platform configuration does not set QMAKE_LIBS_LIBATOMIC, but GCC on RISC-V needs -latomic for some atomic operations.Fix: add the following to the .pro file (already included in the migration patch):
isEmpty(QMAKE_LIBS_LIBATOMIC): QMAKE_LIBS_LIBATOMIC = -latomicIf symbols are still missing, create the symlink manually:
ln -s /usr/lib/riscv64-linux-gnu/libatomic.so.1 \ /usr/lib/riscv64-linux-gnu/libatomic.soThe final output is bin/qrenderdoc, roughly 18 MB unstripped.
Copy the binaries into a self-contained tree. RUNPATH is already set to $ORIGIN:$ORIGIN/../lib/, so no LD_LIBRARY_PATH is needed:
mkdir -p /home/bianbu/renderdoc/{bin,lib} cp bin/qrenderdoc bin/renderdoccmd /home/bianbu/renderdoc/bin/ cp lib/librenderdoc.so /home/bianbu/renderdoc/lib/ chown -R bianbu:bianbu /home/bianbu/renderdocRun the GUI:
cd /home/bianbu/renderdoc ./bin/qrenderdocRecommended approach: use the GUI Queue Capture feature.
This method works on Wayland because it does not rely on a global hotkey.
Command-line capture with renderdoccmd is currently less reliable on Bianbu because it depends on the F12 key, which is not captured under Wayland. Two issues are involved:To enable command-line capture, either rebuild with experimental Wayland support or add the missing EGL hook.
Porting RenderDoc to K3 is practical because the core library is already mostly RISC-V-ready. The only significant work is moving the GUI from Qt5 to Qt6. Once that patch is applied, qrenderdoc builds, deploys without LD_LIBRARY_PATH, and captures GLES frames on Wayland through Queue Capture. For anyone building graphics applications on SpacemiT K3, this removes a major tooling gap.
Source: RenderDoc 移植到 SpacemiT K3 (Bianbu) 实战指南 (SpacemiT Forum) https://forum.spacemit.com/t/topic/1578