I spent a lot of time trying to solve the problem of Qt5.15.5 with openGL cross compile. Using armbian image from here:https://github.com/amazingfate/armbian-rock3a-images/
Maybe it’s a problem with the g++ version. The cross toolchain I used at the beginning was 9.4.0 in ubuntu20.04. There were variety errors when compiling Qt, because the versions in the armbian image were g++ 11.2.0 and ubuntu22. So I changed to aarch64-linux-gnu 11.2.2 and Ubuntu22.04 on my x86 PC, but there are still some errors when -sysroot
is set. I tried to compile it all on rock3a, finally, this time there was no error, but it took nearly 5 hours to compile Qt, and no error was reported when compiling opencv, but at the end of compiling my own app, the following error appeared.
qt.qpa.plugin: Could not find the Qt platform plugin "xcb" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.
Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, webgl.
I use locate libqxcb.so
to find the lib ane got
/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so
,
There are some libraries of Qt5 in the amrbian image. Then I set the export QT_QPA_PLATFORM_PLUGIN_PATH=/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/
and export QT_DEBUG_PLUGINS=1
there are part of output:
Cannot load library /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)
QLibraryPrivate::loadPlugin failed on "/usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so" : "Cannot load library /usr/lib/aarch64-linux-gnu/qt5/plugins/platforms/libqxcb.so: (/lib/aarch64-linux-gnu/libQt5XcbQpa.so.5: undefined symbol: _ZN23QPlatformVulkanInstance22presentAboutToBeQueuedEP7QWindow, version Qt_5_PRIVATE_API)"
So I am trying to compile this lib:(
Oh God!:fog::fog::fog: