Build Kirkstone Yocto with Qt6

Software summary

Bootloader: U-Boot
Kernel version: 5.15.148-6.7.0-devel+git.f437ddb7191d #1 SMP PREEMPT Wed May 15 17:04:15 UTC 2024
Kernel command line: root=PARTUUID=7685212c-02 ro rootwait console=tty1 console=ttymxc2,115200 consoleblank=0 earlycon
Distro name: NAME=“TDX Wayland with XWayland”
Distro version: VERSION_ID=6.7.0-devel-20240904225552-build.0
Distro variant: -
Hostname: verdin-imx8mp-15335644

Hardware info

HW model: Toradex Verdin iMX8M Plus on Verdin Development Board
Toradex version: 0063 V1.1B
Serial number: 15335644
Processor arch: aarch64

I am modifying the instructions by @benjamin.tx at the following link to build Kirkstone Yocto with Qt6:

https://community.toradex.com/t/apalis-imx8-toradex-bsp-version-yocto-linux-qt6/19153/3

I can build without errors and the Qt libraries listed on the device under /usr/lib/ are Qt6 except for libQt5waylandclient and libQt5waylandcompositor. When I try to start a Qt6 application, I get the following error in QtCreator:

qt.core.plugin.loader: In /usr/lib/plugins/platforms/libqwayland-egl.so:
Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.factoryloader: “The plugin ‘/usr/lib/plugins/platforms/libqwayland-egl.so’ uses incompatible Qt library. (5.15.0) [release]”
not a plugin

The meta-qt5 layer is not included in my BBLayers.conf. Can I please get a clarification on how the Qt version is set for the Qt/wayland libraries?

Thanks

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

To address the issue with your Qt6 application failing due to a plugin using an incompatible Qt5 library, please consider the following steps:

  1. Verify Build Configuration: Ensure your Yocto build is configured to use only Qt6. Double-check your bblayers.conf and local.conf files to confirm that no Qt5 layers or recipes are included. Make sure the meta-qt5 layer is absent and all settings are aligned with Qt6.

  2. Remove Qt5 Libraries: Inspect the /usr/lib/ directory on your device to identify and remove any Qt5 libraries or plugins, such as libQt5waylandclient and libQt5waylandcompositor, as they may conflict with Qt6 applications.

  3. Check Plugin Compatibility: The error suggests that libqwayland-egl.so is built against Qt5.15.0. Verify the source of this plugin to ensure it is compatible with Qt6. If it’s a third-party plugin, consider rebuilding it against Qt6 or finding an updated version.

  4. Set Qt Version in Yocto: In the Yocto build system, the Qt version is typically set using the PREFERRED_VERSION variable in your configuration files. Ensure this variable is set to the desired Qt6 version for all relevant packages.

By following these steps, you should be able to resolve the compatibility issues and successfully run your Qt6 applications on the Toradex Verdin iMX8M Plus board.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

Verdin IMX8M Plus Qt Creator.

In order for the changes I had made to take affect and install all of the Qt6 libraries, I had to delete my build folder and bitbake my image again.