Hello! Recently I finally managed to delete libX11/libxcb from my system. Unfortunately, when I'm building qtwayland, it fails with In file included from /usr/include/EGL/egl.h:20, from /usr/include/qt5/QtEglSupport/5.15.4/QtEglSupport/private/qt_egl_p.h:74, from /usr/include/qt5/QtEglSupport/5.15.4/QtEglSupport/private/qeglstreamconvenience_p.h:55, from /var/tmp/portage/dev-qt/qtwayland-5.15.4/work/qtwayland-everywhere-src-5.15.4/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp:46: /usr/include/EGL/eglplatform.h:109:10: fatal error: X11/Xlib.h: No such file or directory 109 | #include <X11/Xlib.h> | ^~~~~~~~~~~~ compilation terminated. make[5]: *** [Makefile:540: .obj/waylandeglclientbufferintegration.o] Error 1 I found change in libglvnd https://gitlab.freedesktop.org/glvnd/libglvnd/-/merge_requests/248, but I have libglvnd-1.4.0 installed, which already have updated headers. I've tried to set CFLAGS/CXXFLAGS to -DEGL_NO_X11=true, no success... Anything else I'm missing?
/usr/include/EGL/eglplatform.h is part of media-libs/libglvnd, Xlib.h is guarded by #elif defined(USE_X11).
I found that USE_X11 is defined in /usr/include/qt5/QtEglSupport/5.15.4/QtEglSupport/private/qt_egl_p.h, from dev-qt/qtgui-5.15.4-r2. I rebuilt it. just in case - no change
I think, this upstream commit is needed https://github.com/qt/qtwayland/commit/2dc725c57bb12a99f141b3852f6db516ced1661b
I've dropped the definition from qt_egl_p.h, and now qtwayland compiles successfully.
Also, it worked to set CXXFLAGS to -DQT_EGL_NO_X11, and restoring define in qt_egl_p.h
(In reply to Yaroslav Isakov from comment #3) > I think, this upstream commit is needed > https://github.com/qt/qtwayland/commit/ > 2dc725c57bb12a99f141b3852f6db516ced1661b ...except that Qt5 does not use CMake at all, so this change is useless without porting it to qmake. The necessary change to qt_egl_p.h in dev-qt/qtgui was backported in commit f9c024984ea21dd5bdee7e45764d041fb6d9ef27 though. Thanks for pointing out that commit.
Broken in 5.15.7: In file included from /usr/include/EGL/egl.h:20, from /usr/include/qt5/QtEglSupport/5.15.7/QtEglSupport/private/qt_egl_p.h:74, from /usr/include/qt5/QtEglSupport/5.15.7/QtEglSupport/private/qeglstreamconvenience_p.h:55, from /var/tmp/portage/dev-qt/qtwayland-5.15.7/work/qtwayland-everywhere-src-5.15.7/src/hardwareintegration/compositor/wayland-egl/waylandeglclientbufferintegration.cpp:46: /usr/include/EGL/eglplatform.h:109:10: fatal error: X11/Xlib.h: No such file or directory 109 | #include <X11/Xlib.h> |
*** Bug 880239 has been marked as a duplicate of this bug. ***
USE_X11 in qt_egl_p.h is not part of upstream. It comes from patch 0027-Cater-for-upstream-changes-in-eglplatform.h.patch qtbase-5.15.7-gentoo-kde-1.tar.xz. Reverting the patch helps to fix the issue.