[oe] Build Qt5 with X11 backend for EGLFS

Julien Brianceau (jbriance) jbriance at cisco.com
Tue Dec 15 13:26:57 UTC 2015


Hi,

>From what I see, you just need to define EGLFS_PLATFORM_HOOKS_LIBS.

Your do_configure_prepend() should look like this:

do_configure_prepend() {
	cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
EGLFS_PLATFORM_HOOKS_SOURCES = \$\$PWD/qeglfshooks_x11.cpp
EGLFS_PLATFORM_HOOKS_LIBS = -lxcb
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++/
}

Of course, you can add other xcb libraries if needed (-lxcb-shm, -lxcb-keysyms, etc ...)

Julien

-----Original Message-----
From: openembedded-devel-bounces at lists.openembedded.org [mailto:openembedded-devel-bounces at lists.openembedded.org] On Behalf Of Gerhard de Clercq
Sent: mardi 15 décembre 2015 13:46
To: openembedded-devel at lists.openembedded.org
Subject: [oe] Build Qt5 with X11 backend for EGLFS

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
-- 
_______________________________________________
Openembedded-devel mailing list
Openembedded-devel at lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list