You are not logged in.

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Monday, November 14th 2016, 4:57am

Unable to run my Qt application using wayland plugin(using Yocto build) on Target

I am not able to run my Qt application using wayland plugin. The below are the steps and other methods followed for Running Qt Application in wayland.

Edit yocto/build/conf/local.conf and add:
EXTRA_IMAGE_FEATURES = "debug-tweaks ssh-server-openssh"
DISTRO_FEATURES_remove = "x11 "
DISTRO_FEATURES_append += "wayland opengl"
#opengl = "0"
IMAGE_INSTALL_append = "
freetype
gdb
ruby
qtbase
qtbase-fonts
qtbase-plugins
qtbase-tools
qtdeclarative
qtdeclarative-plugins
qtdeclarative-tools
qtdeclarative-qmlplugins
qtmultimedia
qtmultimedia-plugins
qtmultimedia-qmlplugins
qtsvg
qtsvg-plugins
qtsensors
qtimageformats-plugins
qtsystems
qtsystems-tools
qtsystems-qmlplugins
qtscript
qt3d
qt3d-qmlplugins
qtwebkit
qtwebkit-examples-examples
qtwebkit-qmlplugins
qtgraphicaleffects-qmlplugins
qtconnectivity-qmlplugins
qtlocation-plugins
qtlocation-qmlplugins
openssh-sftp-server
qtwayland
qtwayland-examples
"

Edit yocto/build/conf/bblayers.conf to add the meta-qt5 layer at the end:
BBLAYERS = "${BSPDIR}/WORK/build/../poky/meta ${BSPDIR}/WORK/build/../poky/meta-yocto ${BSPDIR}/WORK/build/../poky/meta-yocto-bsp ${BSPDIR}/WORK/build/../meta-renesas/meta-rcar-gen3 ${BSPDIR}/WORK/build/../meta-linaro/meta-linaro-toolchain ${BSPDIR}/WORK/build/../meta-qt5 ${BSPDIR}/WORK/build/../meta-openembedded/meta-oe ${BSPDIR}/WORK/build/../meta-openembedded/meta-ruby ${BSPDIR}/WORK/build/../meta-openembedded/meta-multimedia "

bitbake core-image-weston
I was able to compile and execute a simple Hello world widget application (https://wiki.qt.io/Qt_for_Beginners) using qt in Target :

When i run the application it was showing :

./Helloworld

"This application failed to start because it could not find or load the Qt platform plugin "xcb".

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, wayland-egl, wayland.

Reinstalling the application may fix this problem."

Hence i run the same application with wayland plugin:

./Helloworld -platform wayland

I was succesfully able to view the output.

"weston demo applications were running fine"

I was trying to use wayland plugin for running another application with the following steps:

Set the env variable by export XDG_RUNTIME_DIR=/run/user/root
(used since XDG_RUNTIME_DIR variable was set in weston.service was /run/user/root and also i was able to list the wayland-0 in /run/user/root/)

It was showing segmentation fault

Therefore i set it as export XDG_RUNTIME_DIR=/run/user/0

./App -platform wayland

But it was showing error:

"Failed to create display"

Tried another method of running by the following steps:

./qml-compositor &
./App -platform wayland

/usr/share/qt5/examples/wayland/qml-compositor -platform wayland &
For this step also i got the same "Failed to create display" error.

Could not find a solution to issue. Can any one please support ?