QGroundControl for Linux aarch64 (2)

Building QGroundControl from source on aarch64 (OrangePi CM5) — CMake fails with No target "OpenGL::EGL"

This appears to be related to: QGroundControl for Linux aarch64 . Although this thread discusses the minor issues associated with building procedure, it doesn’t clearly explain how the issue was eventually resolved.


System:

  • Device: OrangePi CM5 (RK3588, aarch64)
  • OS: Ubuntu 22.04.5 LTS (Jammy)
  • Kernel: 6.1.43-rockchip-rk3588
  • RAM: 4GB
  • Qt: 6.10.1 (built from source following Qt for Linux/X11 - Building from Source | Qt 6.10 )
  • CMake: 3.25 (minimum required per QGC’s CMakeLists.txt)

Problem:

Running the configure step:

/opt/Qt/6.10.1/bin/qt-cmake -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug

Fails with:

Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/LoggingSettings.qml:No such file or directory                                      
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/PlanViewSettings.qml:No such file or directory                                     
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/ADSBServerSettings.qml:No such file or directory                                   
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/MapsSettings.qml:No such file or directory                                         
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/FlyViewSettings.qml:No such file or directory                                      
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/TelemetrySettings.qml:No such file or directory                                    
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/VideoSettings.qml:No such file or directory                                        
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/PX4LogTransferSettings.qml:No such file or directory                               
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/NTRIPSettings.qml:No such file or directory                                        
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/GeneralSettings.qml:No such file or directory                                      
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/CommLinksSettings.qml:No such file or directory                                    
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/RemoteIDSettings.qml:No such file or directory                                     
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/Viewer3DSettings.qml:No such file or directory                                     
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AppSettings/SettingsPagesModel.qml:No such file or directory                                   
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/APM/APMFlightSafetyComponent.qml:No such file or directory                    
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/APM/APMFailsafesComponent.qml:No such file or directory                       
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/APM/APMTuningCopterComponent.qml:No such file or directory                    
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/APM/APMPowerComponent.qml:No such file or directory                           
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/APM/APMLoggingComponent.qml:No such file or directory                         
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/PX4/SafetyComponent.qml:No such file or directory                             
Cannot open input file /home/orangepi/Applications/QGroundControlNative/qgroundcontrol/build/qml/QGroundControl/AutoPilotPlugins/PX4/PowerComponent.qml:No such file or directory                              
-- Configuring done  
CMake Error in CMakeLists.txt:
  Error evaluating generator expression:
    $<TARGET_LINKER_FILE:OpenGL::EGL>
  No target "OpenGL::EGL"
CMake Generate step failed. Build files cannot be regenerated correctly.

The error originates from src/VideoManager/VideoReceiver/GStreamer/HwBuffers/CMakeLists.txt which calls find_package(OpenGL QUIET COMPONENTS EGL) — but the OpenGL::EGL imported target is never created despite libEGL.so and libOpenGL.so both being present at /usr/lib/aarch64-linux-gnu/.

What I’ve tried:

  • Passing -DOpenGL_GL_PREFERENCE=GLVND, -DOpenGL_EGL_LIBRARY, -DOpenGL_EGL_INCLUDE_DIR explicitly — ignored
  • Patching FindWrapOpenGL.cmake to include COMPONENTS EGL in its find_package(OpenGL) call. (I had upgraded CMake to version 4.2.3 in an attempt to fix the issue, however that didn’t prove useful so I had to revert back to CMake 3.25)
  • Setting CMAKE_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu via preload script, env variable, and directly inside HwBuffers/CMakeLists.txt

None of the above resolved the issue.

Question:

Any pointers on how to resolve this OpenGL::EGL target issue as well as no such qml files issue would be greatly appreciated. I think the OpenGL::GL target issue is the main culprit. cc @mcayci You seem to have resolved a similar issue here: QGroundControl for Linux aarch64 would appreciate any insight on how you fixed it!

Hi @Omair I replied to your question in the following post. Please refer there.

https://discuss.px4.io/t/re-qgroundcontrol-for-linux-aarch64-2/49008/2?u=mcayci

Mustafa