Skip to main content

Problem Summary

Platform: ARM64 (RK3588-based boards like Radxa ROCK 5B Plus)
OS: Ubuntu 22.04
Issue: GStreamer plugins (axinplace, axtransform, etc.) fail to build despite:

  • All GStreamer development packages installed
  • CMake detecting GStreamer successfully (GST_FOUND=1)
  • No explicit build errors or warnings
  • Source code present in operators/gstaxstreamer/

Symptom: ERROR

failed to create element of type axinplace (decodebin-link0)

when trying to do inference

bash

gst-inspect-1.0 axinplace
# Returns: "No such element or plugin 'axinplace'"

After build, libgstaxstreamer.so is missing from operators/lib/ even though the build claims success.

Root Cause Analysis

The Silent Dependency Failure

The issue is a silent CMake conditional failure caused by a missing platform-specific dependency that's not documented anywhere in the Voyager SDK.

What the developers missed:

  1. Incomplete dependency documentation - The SDK docs list standard GStreamer packages but omit hardware-specific requirements
  2. Silent build failure - The CMake logic silently skips building GStreamer plugins when dependencies aren't met, with no warning
  3. Platform-specific dependency - Rockchip's customized GStreamer build requires librga, which isn't mentioned in SDK documentation

Technical Details

In operators/CMakeLists.txt, there's this conditional:

 

 

cmake

pkg_check_modules(GST_VIDEO gstreamer-video-1.0)

if (GMODULE_FOUND AND GLIB_FOUND AND GST_FOUND AND GST_VIDEO_FOUND)
add_subdirectory(gstaxstreamer)
install(TARGETS gstaxstreamer LIBRARY DESTINATION lib)
endif()

When GST_VIDEO_FOUND is not set (empty/false), the entire GStreamer plugin build is silently skipped.

Why GST_VIDEO_FOUND fails on Rockchip systems:

Rockchip ships a customized GStreamer build (version format: 1.20.x-1+rkYYMMDD+x) that includes hardware acceleration support. The gstreamer-video-1.0.pc file on these systems has a dependency on librga:

 

 

bash

$ pkg-config --cflags gstreamer-video-1.0
# Output:
# Package librga was not found in the pkg-config search path.
# Perhaps you should add the directory containing `librga.pc'
# to the PKG_CONFIG_PATH environment variable
# Package 'librga', required by 'gstreamer-video-1.0', not found

When pkg-config fails to resolve librga, CMake's pkg_check_modules(GST_VIDEO ...) silently fails, leaving GST_VIDEO_FOUND unset, and the entire GStreamer plugin build is skipped.

Verification:

Check your CMakeCache.txt:

 

 

bash

grep "GST_VIDEO_FOUND" operators/CMakeCache.txt

If you see GST_VIDEO_FOUND:INTERNAL= (empty) instead of GST_VIDEO_FOUND:INTERNAL=1, you have this problem.

Solution

Step 1: Install the Missing Dependency

On RK3588/Rockchip systems (Radxa, Orange Pi, etc.):

 

 

bash

sudo apt-get update
sudo apt-get install librga-dev

On other ARM64 systems, you may need different hardware acceleration libraries. Check your gstreamer-video-1.0.pc dependencies:

 

 

bash

pkg-config --print-requires gstreamer-video-1.0
pkg-config --print-requires-private gstreamer-video-1.0

Install any missing packages listed.

Step 2: Verify pkg-config Now Works

 

 

bash

pkg-config --modversion gstreamer-video-1.0
pkg-config --cflags gstreamer-video-1.0

Both should complete without errors about missing packages.

Step 3: Clean and Rebuild

 

 

bash

cd ~/voyager-sdk/operators
rm -rf CMakeCache.txt CMakeFiles/
cmake .
make -j$(nproc)

Watch for this in the build output:

 

 

[ 99%] Built target gstaxstreamer

Step 4: Verify GST_VIDEO_FOUND

 

 

bash

grep "GST_VIDEO_FOUND" CMakeCache.txt

Should show: GST_VIDEO_FOUND:INTERNAL=1

Step 5: Locate and Install the Plugin

The built library is in the build subdirectory:

 

 

bash

# Find the library
ls -lh ~/voyager-sdk/operators/gstaxstreamer/libgstaxstreamer.so

# Install to GStreamer plugin directory
GST_PLUGIN_PATH=$(pkg-config --variable=pluginsdir gstreamer-1.0)
sudo cp ~/voyager-sdk/operators/gstaxstreamer/libgstaxstreamer.so $GST_PLUGIN_PATH/

# Clear plugin cache
rm -rf ~/.cache/gstreamer-1.0/

Step 6: Test

 

 

bash

gst-inspect-1.0 axinplace

Should now display the plugin information!

What Axelera Should Fix

For the developers:

  1. Update documentation - Add platform-specific dependency requirements:
    • For RK3588: Explicitly document librga-dev requirement
    • For other ARM platforms: Document how to check for hardware-specific GStreamer dependencies
  2. Improve CMake feedback - Add warning messages when optional components are skipped:

 

 

cmake

   if (GMODULE_FOUND AND GLIB_FOUND AND GST_FOUND AND GST_VIDEO_FOUND)
add_subdirectory(gstaxstreamer)
else()
message(WARNING "GStreamer plugins will not be built. Missing dependencies:")
if(NOT GST_FOUND)
message(WARNING " - gstreamer-1.0 not found")
endif()
if(NOT GST_VIDEO_FOUND)
message(WARNING " - gstreamer-video-1.0 not found")
message(WARNING " Try: pkg-config --modversion gstreamer-video-1.0")
endif()
endif()
  1. Add dependency validation script - Include a pre-build script that checks for all required dependencies and provides actionable error messages
  2. Update installation guide - Separate x86 and ARM installation instructions with platform-specific dependencies clearly listed

Generic Troubleshooting for Other Platforms

If you're on a different ARM64 board and encounter this issue:

  1. Check what GStreamer needs:

 

 

bash

   pkg-config --print-requires gstreamer-video-1.0
pkg-config --print-requires-private gstreamer-video-1.0
  1. Find missing packages:

 

 

bash

   pkg-config --modversion gstreamer-video-1.0
# Look for "not found" errors
  1. Search for the missing package:

 

 

bash

   apt-cache search <package-name>
apt-cache search <package-name>-dev
  1. Common ARM hardware acceleration libraries:
    • Rockchip (RK3588, RK3566, etc.): librga-dev, librockchip-mpp-dev
    • Allwinner: libcedrus-dev, libvdpau-sunxi-dev

@Bohdanken Thank you very much for the detailed explanation! Let me share this information internally so we can fix this :)

FYI ​@Tam Robb