All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [git commit] package/qt: Avoid X11 header collision with OpenGL/EGL
Date: Sun, 16 Oct 2016 11:05:48 +0200	[thread overview]
Message-ID: <20161016090627.49FAE8172B@busybox.osuosl.org> (raw)

commit: https://git.buildroot.net/buildroot/commit/?id=0a7c9b6b0ac63d01ca55a75363e9c446dca19772
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

Including X11 headers via EGL/egl.h leads to a collision of defines
between Qt and X11. To fix this qt5 added
  DEFINES += MESA_EGL_NO_X11_HEADERS
in various files:

https://github.com/qtproject/qtbase/blob/dev/src/platformsupport/eglconvenience/eglconvenience.pri#L19
https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/minimalegl/minimalegl.pro#L10
https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro#L6
[...]

This patch fixes a similar compile error in qt4:
http://autobuild.buildroot.net/results/9b0/9b0ed92984eead89d148eaa71aff6e2f1e117837/
http://autobuild.buildroot.org/results/4fd/4fd57553336d36439fab32a7221fc8639758e887/
http://autobuild.buildroot.org/results/5cb/5cb8072f8220f7203fa79936eedcc43eab53ec66/

Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...012-OpenGL-EGL-Avoid-X11-header-collision.patch | 60 ++++++++++++++++++++++
 1 file changed, 60 insertions(+)

diff --git a/package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch b/package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch
new file mode 100644
index 0000000..8c65d1d
--- /dev/null
+++ b/package/qt/0012-OpenGL-EGL-Avoid-X11-header-collision.patch
@@ -0,0 +1,60 @@
+From 87c9c18fad02744238336a6cf1ce70d3ec2c89c2 Mon Sep 17 00:00:00 2001
+From: Bernd Kuhls <bernd.kuhls@t-online.de>
+Date: Sat, 11 Jun 2016 17:03:07 +0200
+Subject: [PATCH 1/1] OpenGL/EGL: Avoid X11 header collision
+
+Including X11 headers via EGL/egl.h leads to a collision of defines
+between Qt and X11. To fix this qt5 added
+  DEFINES += MESA_EGL_NO_X11_HEADERS
+in various files:
+
+https://github.com/qtproject/qtbase/blob/dev/src/platformsupport/eglconvenience/eglconvenience.pri#L19
+https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/minimalegl/minimalegl.pro#L10
+https://github.com/qtproject/qtbase/blob/dev/src/plugins/platforms/eglfs/deviceintegration/eglfs_x11/eglfs_x11.pro#L6
+[...]
+
+This patch fixes a similar compile error in qt4:
+http://autobuild.buildroot.net/results/9b0/9b0ed92984eead89d148eaa71aff6e2f1e117837/
+http://autobuild.buildroot.org/results/4fd/4fd57553336d36439fab32a7221fc8639758e887/
+http://autobuild.buildroot.org/results/5cb/5cb8072f8220f7203fa79936eedcc43eab53ec66/
+
+Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
+(patch not sent upstream because qt4 branch is closed:
+ http://blog.qt.io/blog/2015/05/26/qt-4-8-7-released/)
+---
+
+ src/gui/egl/egl.pri   | 3 +++
+ src/opengl/opengl.pro | 3 +++
+ 2 files changed, 6 insertions(+)
+
+diff --git a/src/gui/egl/egl.pri b/src/gui/egl/egl.pri
+index 8e8664c..715ffd7 100644
+--- a/src/gui/egl/egl.pri
++++ b/src/gui/egl/egl.pri
+@@ -22,6 +22,9 @@ contains(QT_CONFIG, egl): {
+             !isEmpty(QMAKE_LIBS_EGL): LIBS += $$QMAKE_LIBS_EGL
+         }
+ 
++	# Avoid X11 header collision
++	DEFINES += MESA_EGL_NO_X11_HEADERS
++
+ 	wince*: SOURCES += egl/qegl_wince.cpp
+ 
+ 	unix {
+diff --git a/src/opengl/opengl.pro b/src/opengl/opengl.pro
+index ce1a5d2..65b1031 100644
+--- a/src/opengl/opengl.pro
++++ b/src/opengl/opengl.pro
+@@ -149,6 +149,9 @@ embedded {
+                qglwindowsurface_qws_p.h \
+                qgl_egl_p.h
+ 
++    # Avoid X11 header collision
++    DEFINES += MESA_EGL_NO_X11_HEADERS
++
+     contains(QT_CONFIG, fontconfig) {
+         include($$QT_SOURCE_TREE/config.tests/unix/freetype/freetype.pri)
+     } else {
+-- 
+2.8.1
+

                 reply	other threads:[~2016-10-16  9:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161016090627.49FAE8172B@busybox.osuosl.org \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.