From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from exchange07.timesys.com (exchange07.timesys.com [209.114.137.116]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id BD4F0E016A1 for ; Mon, 14 Oct 2013 12:11:22 -0700 (PDT) Received: from timesys.com (192.168.3.27) by exchange07.timesys.com (192.168.1.221) with Microsoft SMTP Server id 8.1.436.0; Mon, 14 Oct 2013 15:11:19 -0400 Date: Mon, 14 Oct 2013 15:11:22 -0400 From: Andy Voltz To: Benjamin Federau Message-ID: <20131014191122.GK2720@timesys.com> References: <487070984.8336.1381757398894.JavaMail.open-xchange@ext01.basyskom.de> MIME-Version: 1.0 In-Reply-To: <487070984.8336.1381757398894.JavaMail.open-xchange@ext01.basyskom.de> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "meta-freescale@yoctoproject.org" Subject: Re: qt5 xcb gles2 X-BeenThere: meta-freescale@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Usage and development list for the meta-fsl-* layers List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Oct 2013 19:11:25 -0000 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi Benjamin, > I followed your discussion about qt5, xcb and gles2 on an i.MX6 board. > > Finally the workaround/hack by setting the VisualId hard to "33" helped me a lot > to get Qt5.1.1 running on my SabreLite SD board. Thanks for that. :) > > First, I have to say that I use Ubuntu 12.04 instead of Yocto on my board. But I > use the same graphic libs and dev headers version (3.5.7-1.0.0) as in the next > branch of the meta-fsl-layer. > > I found out that I could not compile Qt5.1.1 with the > /usr/include/EGL/eglplatform.h header from the Freescale graphic libs package. > When I use this header I run into the following problem. > > QT5 make fails on QUrl  - http://qt-project.org/forums/viewthread/25896 > > If I replace the eglplatform.h with the one from the Ubuntu standard mesa > package the compilation runs through. The issue must be related to the > MESA_EGL_NO_X11_HEADERS macro which is not used inside the Freescale > eglplatform.h file. > > My qmake.conf > .... > QMAKE_INCDIR           += /usr/include > QMAKE_LIBDIR           += /usr/lib > > QMAKE_LIBS_EGL         += -lEGL > QMAKE_LIBS_OPENGL_ES2  += -lGLESv2 -lEGL -lGAL > QMAKE_LIBS_OPENVG      += -lOpenVG -lEGL -lGAL > > IMX6_CFLAGS             = -march=armv7-a -mfpu=neon -mfloat-abi=hard -DLINUX=1 > IMX6_CFLAGS_RELEASE     = -O2 $$IMX6_CFLAGS > QMAKE_CFLAGS_RELEASE   += $$IMX6_CFLAGS_RELEASE > QMAKE_CXXFLAGS_RELEASE += $$IMX6_CFLAGS_RELEASE > QMAKE_CFLAGS_DEBUG     += $$IMX6_CFLAGS > QMAKE_CXXFLAGS_DEBUG   += $$IMX6_CFLAGS > .... > > and my configure command > > ./configure -v -opensource -confirm-license -no-pch -opengl es2 -qpa xcb -nomake > examples -nomake tests -platform linux-imx6-g++ -prefix /opt/qt5.1.1 > > So I wonder how you could build qt5.1.1 with the Freescale eglplatform.h. > > Any hints are welcome where I could start digging to solve that issue. > The vivante EGL headers don't honor MESA_EGL_NO_X11_HEADERS, and generally seem to assume X if no other defines are specified. Defining EGL_API_FB for the affected platform plugins gets around the X11 defines--I had to patch qt sources (shown below). I ran into more issues after getting around this error, but this should get you moving: diff -Nuar qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/eglfs/eglfs.pri qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/eglfs/eglfs.pri --- qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/eglfs/eglfs.pri 2013-09-25 15:36:24.263942856 -0400 +++ qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/eglfs/eglfs.pri 2013-09-25 15:37:17.399941690 -0400 @@ -3,7 +3,7 @@ #DEFINES += QEGL_EXTRA_DEBUG #Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +DEFINES += MESA_EGL_NO_X11_HEADERS EGL_API_FB #To test the hooks on x11 (xlib), comment the above define too #EGLFS_PLATFORM_HOOKS_SOURCES += qeglfshooks_x11.cpp diff -Nuar qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/linuxfb/linuxfb.pro qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/linuxfb/linuxfb.pro --- qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/linuxfb/linuxfb.pro 2013-09-25 15:36:24.195942859 -0400 +++ qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/linuxfb/linuxfb.pro 2013-09-25 15:38:04.951940646 -0400 @@ -4,6 +4,8 @@ PLUGIN_CLASS_NAME = QLinuxFbIntegrationPlugin load(qt_plugin) +DEFINES += EGL_API_FB + QT += core-private gui-private platformsupport-private SOURCES = main.cpp qlinuxfbintegration.cpp qlinuxfbscreen.cpp diff -Nuar qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/minimalegl/minimalegl.pro qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/minimalegl/minimalegl.pro --- qt-everywhere-opensource-src-5.1.1-orig/qtbase/src/plugins/platforms/minimalegl/minimalegl.pro 2013-09-25 15:36:24.199942859 -0400 +++ qt-everywhere-opensource-src-5.1.1/qtbase/src/plugins/platforms/minimalegl/minimalegl.pro 2013-09-25 15:37:28.759941440 -0400 @@ -11,7 +11,7 @@ #DEFINES += Q_OPENKODE #Avoid X11 header collision -DEFINES += MESA_EGL_NO_X11_HEADERS +DEFINES += MESA_EGL_NO_X11_HEADERS EGL_API_FB SOURCES = main.cpp \ qminimaleglintegration.cpp \ Perhaps it would be best to patch the vivante headers to define EGL_API_FB if MESA_EGL_NO_X11_HEADERS is defined. Hope that helps. Regards -- Andy Voltz Timesys Corporation