[oe] Build Qt5 with X11 backend for EGLFS

Gerhard de Clercq gerharddeclercq at outlook.com
Tue Dec 15 13:44:12 UTC 2015


Hi,

Yes that was a stupid mistake and I just realized it a few moments before your 
mail. Just xcb is probably not enough though after looking at the headers and 
I used

EGLFS_PLATFORM_HOOKS_LIBS = -lX11 -lX11-xcb -lxcb

It's still compiling though and I'll have to see if this works.

-- 
Regards,
Gerhard de Clercq
On Tuesday 15 Dec 2015 13:26:57 Julien Brianceau wrote:
> 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...




More information about the Openembedded-devel mailing list