Summary: | kwin fails to compile with >=libglvnd-1.3.4 on Linux: "invalid conversion from ‘xcb_window_t’" | ||
---|---|---|---|
Product: | [Plasma] kwin | Reporter: | bluescreenavenger |
Component: | core | Assignee: | KWin default assignee <kwin-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | arojas, asturm, demm, heiko.becker, josef64, kyle.devir, luis.davila.pc, miflab, nate, rdieter |
Priority: | NOR | ||
Version: | git master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/plasma/kwin/commit/839710201c389b7f4ed248cb3818e755a37ce977 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | kwin-5.22.4 patch |
Description
bluescreenavenger
2021-07-28 22:39:24 UTC
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 |