Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 855164 - dev-qt/qtwayland-5.15.4[-X]: /usr/include/EGL/eglplatform.h:109:10: fatal error: X11/Xlib.h: No such file or directory
Summary: dev-qt/qtwayland-5.15.4[-X]: /usr/include/EGL/eglplatform.h:109:10: fatal err...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
: 880239 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-06-29 18:00 UTC by Yaroslav Isakov
Modified: 2023-01-08 06:53 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yaroslav Isakov 2022-06-29 18:00:24 UTC
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?
Comment 1 Andreas Sturmlechner gentoo-dev 2022-07-03 07:13:39 UTC
/usr/include/EGL/eglplatform.h is part of media-libs/libglvnd, Xlib.h is guarded by #elif defined(USE_X11).
Comment 2 Yaroslav Isakov 2022-07-03 08:01:15 UTC
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
Comment 3 Yaroslav Isakov 2022-07-03 08:18:35 UTC
I think, this upstream commit is needed https://github.com/qt/qtwayland/commit/2dc725c57bb12a99f141b3852f6db516ced1661b
Comment 4 Yaroslav Isakov 2022-07-03 08:21:40 UTC
I've dropped the definition from qt_egl_p.h, and now qtwayland compiles successfully.
Comment 5 Yaroslav Isakov 2022-07-03 08:29:55 UTC
Also, it worked to set CXXFLAGS to -DQT_EGL_NO_X11, and restoring define in qt_egl_p.h
Comment 6 Andreas Sturmlechner gentoo-dev 2022-07-03 11:02:50 UTC
(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.
Comment 7 Kirill A. Shutemov 2022-12-04 12:02:53 UTC
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>
      |
Comment 8 Andreas Sturmlechner gentoo-dev 2022-12-04 18:32:34 UTC
*** Bug 880239 has been marked as a duplicate of this bug. ***
Comment 9 Kirill A. Shutemov 2023-01-08 06:53:56 UTC
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.