All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
@ 2018-02-27 20:48 Peter Korsgaard
  2018-02-27 22:11 ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2018-02-27 20:48 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=85483968bec8c5bb3332f61b22cc9be8f0ad15f7
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The mesa's EGL/eglplatform.h header includes X11 headers unless the flag
MESA_EGL_NO_X11_HEADERS is defined[1].

A build issue happens when mesa3d is selected as then OpenGL EGL backend
but the XCB library is not selected.

This commit tells qmake to pass the cflag MESA_EGL_NO_X11_HEADERS to
make and prevent from including the missing X headers.

The issue QTBUG-66233 is opened in the Qt tracker[1].

Fixes:

	In file included from
	/home/gportay/src/buildroot/output-qt5.10/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39:0,
	                 from
	/home/gportay/src/buildroot/output-qt5.10/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtEglSupport/5.10.0/QtEglSupport/private/qt_egl_p.h:65,
	                 from
	/home/gportay/src/buildroot/output-qt5.10/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtEglSupport/5.10.0/QtEglSupport/private/qeglstreamconvenience_p.h:55,
	                 from
	../../../../hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp:56:
	/home/gportay/src/buildroot/output-qt5.10/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:118:22:
	fatal error: X11/Xlib.h: No such file or directory
	 #include <X11/Xlib.h>
	                      ^
	compilation terminated.
	Makefile:656: recipe for target
	'.obj/waylandeglclientbufferintegration.o' failed
	make[8]: *** [.obj/waylandeglclientbufferintegration.o] Error 1

[1]: https://github.com/mesa3d/mesa/blob/79ee1b2ff0b85f4eeb4165d23a7943c28d3a3d93/include/EGL/eglplatform.h#L109-L125
[2]: https://bugreports.qt.io/browse/QTBUG-66233

[Peter: simplify logic]
Cc: Julien CORJON <corjon.j@ecagroup.com>
Signed-off-by: Ga??l PORTAY <gael.portay@savoirfairelinux.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
---
 package/qt5/qt5wayland/qt5wayland.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/qt5/qt5wayland/qt5wayland.mk b/package/qt5/qt5wayland/qt5wayland.mk
index 0a7bdb8cf9..8a7f2e1fb5 100644
--- a/package/qt5/qt5wayland/qt5wayland.mk
+++ b/package/qt5/qt5wayland/qt5wayland.mk
@@ -26,6 +26,13 @@ ifeq ($(BR2_PACKAGE_QT5WAYLAND_COMPOSITOR),y)
 QT5WAYLAND_QMAKEFLAGS += CONFIG+=wayland-compositor
 endif
 
+# The mesa's EGL/eglplatform.h header includes X11 headers unless the flag
+# MESA_EGL_NO_X11_HEADERS is defined. Tell to not include X11 headers if
+# the libxcb is not selected.
+ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)x$(BR2_PACKAGE_LIBXCB),yx)
+QT5WAYLAND_QMAKEFLAGS += QMAKE_CXXFLAGS+=-DMESA_EGL_NO_X11_HEADERS
+endif
+
 define QT5WAYLAND_CONFIGURE_CMDS
 	(cd $(@D); $(TARGET_MAKE_ENV) $(HOST_DIR)/bin/qmake $(QT5WAYLAND_QMAKEFLAGS))
 endef

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
  2018-02-27 20:48 [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb Peter Korsgaard
@ 2018-02-27 22:11 ` Thomas Petazzoni
  2018-02-27 22:28   ` Gaël PORTAY
  2018-02-28  6:32   ` Peter Korsgaard
  0 siblings, 2 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-02-27 22:11 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Feb 2018 21:48:17 +0100, Peter Korsgaard wrote:

> +# The mesa's EGL/eglplatform.h header includes X11 headers unless the flag
> +# MESA_EGL_NO_X11_HEADERS is defined. Tell to not include X11 headers if
> +# the libxcb is not selected.
> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)x$(BR2_PACKAGE_LIBXCB),yx)
> +QT5WAYLAND_QMAKEFLAGS += QMAKE_CXXFLAGS+=-DMESA_EGL_NO_X11_HEADERS
> +endif

I should have replied to the patch, but: I'm not happy with this
change. Indeed this -D flag should be part of mesa's pkg-config files,
and be picked up by Qt.

The simple fact that this identical fix had to be added to qt5wayland,
qt5webkit and qt5multimedia is a good indication that the fix is not
the appropriate one. We may have to replicate this fix to lots of other
qt5 packages.

So the right fix is to propagate the flag using pkg-config.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
  2018-02-27 22:11 ` Thomas Petazzoni
@ 2018-02-27 22:28   ` Gaël PORTAY
  2018-02-27 22:39     ` Thomas Petazzoni
  2018-02-28  6:32   ` Peter Korsgaard
  1 sibling, 1 reply; 6+ messages in thread
From: Gaël PORTAY @ 2018-02-27 22:28 UTC (permalink / raw)
  To: buildroot

Thomas,

On Tue, Feb 27, 2018 at 11:11:25PM +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Tue, 27 Feb 2018 21:48:17 +0100, Peter Korsgaard wrote:
> 
> > +# The mesa's EGL/eglplatform.h header includes X11 headers unless the flag
> > +# MESA_EGL_NO_X11_HEADERS is defined. Tell to not include X11 headers if
> > +# the libxcb is not selected.
> > +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)x$(BR2_PACKAGE_LIBXCB),yx)
> > +QT5WAYLAND_QMAKEFLAGS += QMAKE_CXXFLAGS+=-DMESA_EGL_NO_X11_HEADERS
> > +endif
> 
> I should have replied to the patch, but: I'm not happy with this
> change. Indeed this -D flag should be part of mesa's pkg-config files,
> and be picked up by Qt.
> 
> The simple fact that this identical fix had to be added to qt5wayland,
> qt5webkit and qt5multimedia is a good indication that the fix is not
> the appropriate one. We may have to replicate this fix to lots of other
> qt5 packages.
> 
> So the right fix is to propagate the flag using pkg-config.
> 
> Best regards,
> 
> Thomas
> -- 
> Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
> Embedded Linux and Kernel engineering
> http://bootlin.com

Peter Seiderer sent me an hint[1].

I have to find time to send a proper patch. Do not worry, I have that
fix in mind.

Gael

[1]: http://lists.busybox.net/pipermail/buildroot/2018-February/214210.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
  2018-02-27 22:28   ` Gaël PORTAY
@ 2018-02-27 22:39     ` Thomas Petazzoni
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2018-02-27 22:39 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 27 Feb 2018 17:28:06 -0500, Ga?l PORTAY wrote:

> Peter Seiderer sent me an hint[1].
> 
> I have to find time to send a proper patch. Do not worry, I have that
> fix in mind.
> 
> Gael
> 
> [1]: http://lists.busybox.net/pipermail/buildroot/2018-February/214210.html

Indeed, this hint looks good. It will be nice to have a better fix for
this.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
  2018-02-27 22:11 ` Thomas Petazzoni
  2018-02-27 22:28   ` Gaël PORTAY
@ 2018-02-28  6:32   ` Peter Korsgaard
  2018-02-28 11:47     ` Gaël PORTAY
  1 sibling, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2018-02-28  6:32 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:

 > Hello,
 > On Tue, 27 Feb 2018 21:48:17 +0100, Peter Korsgaard wrote:

 >> +# The mesa's EGL/eglplatform.h header includes X11 headers unless the flag
 >> +# MESA_EGL_NO_X11_HEADERS is defined. Tell to not include X11 headers if
 >> +# the libxcb is not selected.
 >> +ifeq ($(BR2_PACKAGE_MESA3D_OPENGL_EGL)x$(BR2_PACKAGE_LIBXCB),yx)
 >> +QT5WAYLAND_QMAKEFLAGS += QMAKE_CXXFLAGS+=-DMESA_EGL_NO_X11_HEADERS
 >> +endif

 > I should have replied to the patch, but: I'm not happy with this
 > change. Indeed this -D flag should be part of mesa's pkg-config files,
 > and be picked up by Qt.

 > The simple fact that this identical fix had to be added to qt5wayland,
 > qt5webkit and qt5multimedia is a good indication that the fix is not
 > the appropriate one. We may have to replicate this fix to lots of other
 > qt5 packages.

 > So the right fix is to propagate the flag using pkg-config.

Yes, you had already discussed this on IRC and I agree, but that fix
does not look like it will be ready in time for 2018.02, so I've added
these fixes for now.

But indeed, please continue to work on the real upstreamable pkg-config
fix.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb
  2018-02-28  6:32   ` Peter Korsgaard
@ 2018-02-28 11:47     ` Gaël PORTAY
  0 siblings, 0 replies; 6+ messages in thread
From: Gaël PORTAY @ 2018-02-28 11:47 UTC (permalink / raw)
  To: buildroot

Thomas, Peter,

On Wed, Feb 28, 2018 at 07:32:05AM +0100, Peter Korsgaard wrote:
> ...
> 
> Yes, you had already discussed this on IRC and I agree, but that fix
> does not look like it will be ready in time for 2018.02, so I've added
> these fixes for now.
> 
> But indeed, please continue to work on the real upstreamable pkg-config
> fix.
>

I have backported the patch[1] pointed by Peter Seiderer and the build
of qt5multimedia, qt5wayland and qt5webkit passed successfully on next
branch where the workaround is not preset (+ qt5.10).

As you can see, the -DMESA_EGL_NO_X11_HEADERS flag is passed to the
compiler.

	/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/bin/x86_64-buildroot-linux-gnu-g++ -c -pipe -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os --sysroot=/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot -O2 -O3 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -W -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -D_REENTRANT -fPIC -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_PLUGIN -DQT_WAYLANDCLIENT_LIB -DQT_SERVICE_SUPPORT_LIB -DQT_EGL_SUPPORT_LIB -DQT_GUI_LIB -DQT_CORE_LIB -DMESA_EGL_NO_X11_HEADERS -I. -I../../../../hardwareintegration/client/wayland-egl -I../../../../../include/QtWaylandClient/5.10.1 -I../../../../../include/QtWaylandClient/5.10.1/QtWaylandClient -I../../../../../include -I../../../../../include/QtWaylandClient -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5 -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtServiceSupport -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtServiceSupport/5.10.1 -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtServiceSupport/5.10.1/QtServiceSupport -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtEglSupport -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtEglSupport/5.10.1 -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtEglSupport/5.10.1/QtEglSupport -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtGui/5.10.1 -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtGui/5.10.1/QtGui -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtGui -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.10.1 -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore/5.10.1/QtCore -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include/qt5/QtCore -I.moc -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/x86_64-buildroot-linux-gnu/sysroot/usr/include -I/home/gportay/src/buildroot-for-int/output-qt5.10-next/host/mkspecs/devices/linux-buildroot-g++ -o .obj/qwaylandglcontext.o ../../../../hardwareintegration/client/wayland-egl/qwaylandglcontext.cpp

So sorry for the noise; I finally found the time (copy a simple patch
and start a build). I can send a patch serie today for master that
reverts my workaround.

Note: It is not tested on other EGL platform without XCB and MESA3D/EGL
with XCB.

[1]: https://codereview.qt-project.org/#/c/198906/

Regards,
Gael

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-28 11:47 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-27 20:48 [Buildroot] [git commit] qt5wayland: fix build issue with mesa3d w/out xcb Peter Korsgaard
2018-02-27 22:11 ` Thomas Petazzoni
2018-02-27 22:28   ` Gaël PORTAY
2018-02-27 22:39     ` Thomas Petazzoni
2018-02-28  6:32   ` Peter Korsgaard
2018-02-28 11:47     ` Gaël PORTAY

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.