SUMMARY It seems recently due to some EGL changes, I can't compile kwin anymore OBSERVED RESULT I get the below log snip: [ 68%] Building CXX object src/plugins/platforms/wayland/CMakeFiles/KWinWaylandWaylandBackend.dir/egl_wayland_backend.cpp.o [ 68%] Building CXX object src/plugins/platforms/drm/CMakeFiles/KWinWaylandDrmBackend.dir/egl_stream_backend.cpp.o [ 68%] Building CXX object src/plugins/platforms/wayland/CMakeFiles/KWinWaylandWaylandBackend.dir/logging.cpp.o [ 68%] Building CXX object src/plugins/platforms/wayland/CMakeFiles/KWinWaylandWaylandBackend.dir/scene_qpainter_wayland_backend.cpp.o In file included from /srcbuild/kwin/src/abstract_wayland_output.h:13, from /srcbuild/kwin/src/plugins/platforms/virtual/virtual_output.h:12, from /srcbuild/kwin/src/plugins/platforms/virtual/virtual_output.cpp:9: /srcbuild/kwin/src/utils.h:134:92: warning: ‘visibility’ attribute ignored [-Wattributes] 134 | static inline QRegion KWIN_EXPORT mapRegion(const QMatrix4x4 &matrix, const QRegion ®ion) | ^ [ 68%] Building CXX object src/plugins/platforms/wayland/CMakeFiles/KWinWaylandWaylandBackend.dir/wayland_backend.cpp.o [ 68%] Building CXX object src/plugins/platforms/virtual/CMakeFiles/KWinWaylandVirtualBackend.dir/logging.cpp.o /srcbuild/kwin/src/plugins/platforms/x11/common/eglonxbackend.cpp: In member function ‘void* KWin::EglOnXBackend::createSurface(xcb_window_t)’: /srcbuild/kwin/src/plugins/platforms/x11/common/eglonxbackend.cpp:224:66: error: invalid conversion from ‘xcb_window_t’ {aka ‘unsigned int’} to ‘EGLNativeWindowType’ {aka ‘void*’} [-fpermissive] 224 | surface = eglCreateWindowSurface(eglDisplay(), config(), window, nullptr); | ^~~~~~ | | | xcb_window_t {aka unsigned int} SOFTWARE/OS VERSIONS Linux/KDE Plasma: master (available in About System) KDE Plasma Version: master KDE Frameworks Version: master Qt Version: 5.15 ADDITIONAL INFORMATION cmake configure finds everything
huh, it compiles fine for me.
I wonder if it's some other package that caused the build to break, but I am not sure which one, doesn't appear to Mesa
diff --git a/src/plugins/platforms/x11/common/eglonxbackend.cpp b/src/plugins/platforms/x11/common/eglonxbackend.cpp index c62ec170d..33b75eee1 100644 --- a/src/plugins/platforms/x11/common/eglonxbackend.cpp +++ b/src/plugins/platforms/x11/common/eglonxbackend.cpp @@ -221,7 +221,7 @@ EGLSurface EglOnXBackend::createSurface(xcb_window_t window) // cannot be an xcb_window_t. surface = eglCreatePlatformWindowSurfaceEXT(eglDisplay(), config(), (void *) &window, nullptr); } else { - surface = eglCreateWindowSurface(eglDisplay(), config(), window, nullptr); + surface = eglCreateWindowSurface(eglDisplay(), config(), &window, nullptr); } return surface; works, gets kwin to compile. I just tried it, but what's weird is that git blame says that whole if statement was last touched in 2015
Created attachment 141082 [details] kwin-5.22.4 patch Can confirm on Gentoo with kwin-5.22.4, reproducible both with gcc-11.2.0 and clang-12.0.1. Attached patch solved the error. Basically it's just updated bluescreenavenger's patch which adds void* cast for eglCreateWindowSurface call, similar to eglCreatePlatformWindowSurfaceEXT call.
Issue was introduced with libglvnd-1.3.4. See also downstream report with complete build.log: https://bugs.gentoo.org/810511
https://github.com/NVIDIA/libglvnd/commit/418cbb6be33baeb8458dbb6e6c924906bffcf459 https://github.com/NVIDIA/libglvnd/commit/b29f99d836048d157e55fc2868b5612e2ab46ac1
(In reply to miflab from comment #4) > Created attachment 141082 [details] > kwin-5.22.4 patch FYI, patch is not backwards compatible with libglvnd-1.3.3.
*** Bug 441980 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kwin/-/merge_requests/1404
Can somebody please test !1404?
(In reply to Vlad Zahorodnii from comment #10) > Can somebody please test !1404? Works for me
Git commit 839710201c389b7f4ed248cb3818e755a37ce977 by Vlad Zahorodnii. Committed on 13/09/2021 at 06:37. Pushed by vladz into branch 'master'. x11: Fix build with EGL_NO_PLATFORM_SPECIFIC_TYPES eglCreateWindowSurface() wants a Window (unsigned long), but with EGL_NO_PLATFORM_SPECIFIC_TYPES, EGLNativeWindowType is defined as an opaque pointer, i.e. void*. M +7 -6 src/plugins/platforms/x11/common/eglonxbackend.cpp https://invent.kde.org/plasma/kwin/commit/839710201c389b7f4ed248cb3818e755a37ce977