[oe] Build Qt5 with X11 backend for EGLFS

Gerhard de Clercq gerharddeclercq at outlook.com
Tue Dec 15 12:45:40 UTC 2015


Hi,

I am trying to build Qt5 on Fido for my Tegra 3 based device that only 
provides hardware acceleration through X11 but does have EGL. I have been 
using the XCB backend but have run into tearing issues and have found that 
everyone regards switching to EGLFS as the best solution. 

I initially thought this was not an option but have recently found that one 
can use EGLFS with an X11 backend. To do so I created a qtbase_git.bbappend in 
my layer and filled it with the following:

PACKAGECONFIG[gles2] = "-opengl es2 -xcb -eglfs -no-kms,,virtual/libgles2 
virtual/egl"

do_configure_prepend() {
	cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/qeglfshooks_x11.cpp
EOF
	# copy the hook in the mkspecs directory OE is using
	cp ${S}/src/plugins/platforms/eglfs/qeglfshooks_x11.cpp ${S}/mkspecs/linux-
oe-g++/
}

Unfortunately when I try to compile Qt, I get hit with a lot of errors 
relating to xcb references like:

| /home/gerhard/Toradex-New/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-
angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-
r0/git/mkspecs/linux-oe-g++/qeglfshooks_x11.cpp:159: error: undefined reference 
to 'xcb_wait_for_event'
| /home/gerhard/Toradex-New/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-
angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-
r0/git/mkspecs/linux-oe-g++/qeglfshooks_x11.cpp:219: error: undefined reference 
to 'XOpenDisplay'
| /home/gerhard/Toradex-New/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-
angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-
r0/git/mkspecs/linux-oe-g++/qeglfshooks_x11.cpp:223: error: undefined reference 
to 'XSetEventQueueOwner'
| /home/gerhard/Toradex-New/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-
angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-
r0/git/mkspecs/linux-oe-g++/qeglfshooks_x11.cpp:224: error: undefined reference 
to 'XGetXCBConnection'
| /home/gerhard/Toradex-New/yocto/build/out-glibc/work/armv7at2hf-vfp-neon-
angstrom-linux-gnueabi/qtbase/5.4.2+gitAUTOINC+2cb17c1fb9-
r0/git/mkspecs/linux-oe-g++/qeglfshooks_x11.cpp:228: error: undefined reference 
to 'xcb_get_setup'

Those aren't all the errors but they all seem to point to the fact that xcb (I 
guess libxcb) is not being linked to Qt. I thought adding "-xcb" to the 
packageconfig might have helped but I did not seem to do so. What I can I do to 
try and fix this?

PS. Considering it is possible to build the proper XCB backend I guess the 
files must exist somewhere... 

-- 
Regards,
Gerhard de Clercq



More information about the Openembedded-devel mailing list