Emerging kde-plasma/kwin-6.3.0 fails on a llvm profile with because of the following errors: /usr/include/qt6/QtCore/qcompare_impl.h:26:49: error: no member named 'is_null_pointer_v' in namespace 'std' 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ~~~~~^ /usr/include/qt6/QtCore/qcompare_impl.h:26:67: error: 'T' does not refer to a value 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ^ /usr/include/qt6/QtCore/qcompare_impl.h:26:24: note: declared here 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true> | ^ /usr/include/qt6/QtCore/qcompare_impl.h:26:77: error: expected member name or ';' after declaration specifiers 26 | template <typename T, std::enable_if_t<std::is_null_pointer_v<T>, bool> = true>
Created attachment 918789 [details] emerge log
Created attachment 918790 [details] emerge --info
This was reported upstream too: https://bugs.kde.org/show_bug.cgi?id=499835 Their workaround (reverting the C++ standard version to 20) breaks the build in another place though (src/core/colorspace.cpp:618), since newer code has been added that uses C++23 features.
Created attachment 918794 [details, diff] Revert C++ std to c++20 I was able to remove the C++23 feature dependency and kwin now compiles for me, I attached the patch I'm using. I'm still quite inexperienced with C++ though, so I can't really vouch for the functionality of the patch.
Created attachment 918795 [details, diff] qtbase missing include I dug into this a bit more and the actual issue is "qcompare_impl.h" from dev-qt/qtbase is missing an include. With this new patch for dev-qt/qtbase clang compiles kwin 6.3.0 with no patches.
As https://bugs.kde.org/show_bug.cgi?id=499835#c2 asks, anyone reported this upstream yet?
Not a KWin issue, so dropping CC.
(In reply to Robert Holt from comment #5) > Created attachment 918795 [details, diff] [details, diff] > qtbase missing include > > I dug into this a bit more and the actual issue is "qcompare_impl.h" from > dev-qt/qtbase is missing an include. With this new patch for dev-qt/qtbase > clang compiles kwin 6.3.0 with no patches. Thank you, this works for me. Have you posted this to upstream Qt? I don't think upstream KDE can do anything about it nor should they.
(been hoping for it to get reported upstream before adding the patch downstream)
I've been trying to come up with a minimal reproducer to report to QT, but so far I haven't actually been able to reproduce it. QT's example code for QFlags (from here: https://wiki.qt.io/QFlags_tutorial) compiles fine with clang on my system without the qtbase patch applied, even with all the same defines and other compiler args as the kwin build. So it seems like the issue is more complicated than just a missing include. I think I've reached the limit of my C++ expertise though. I'm happy to report the issue upstream to QT, but I'm not actually sure what the QT-specific issue is anymore. It looks like there's a strange interaction between QT, kwin, and libc++ that needs further investigation.
The Qt developers will understand it's a "transitive include" / "include what you use" issue if you use those phrases. No need for a minimal reproducer then. Just point out that the Qt headers use XXX without including YYY.
(In reply to Sam James from comment #11) > The Qt developers will understand it's a "transitive include" / "include > what you use" issue if you use those phrases. No need for a minimal > reproducer then. > > Just point out that the Qt headers use XXX without including YYY. ... and include a link to this bug, and the upstream KDE bug.
Makes sense, I've reported it upstream now: https://bugreports.qt.io/browse/QTBUG-133808
Thanks! Sounds like it'll make it into 6.8.3, so I'll skip live and add it 6.8.2 only.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=935749bdad6bcc00bb117a8001bd8ff35ddc9b8e commit 935749bdad6bcc00bb117a8001bd8ff35ddc9b8e Author: Ionen Wolkens <ionen@gentoo.org> AuthorDate: 2025-02-18 02:14:34 +0000 Commit: Ionen Wolkens <ionen@gentoo.org> CommitDate: 2025-02-18 02:25:20 +0000 dev-qt/qtbase: add missing header needed for kwin + libc++ Please make sure update to this version first (manually if need be) given kwin does not explicitly requests this revision. Closes: https://bugs.gentoo.org/949629 Signed-off-by: Ionen Wolkens <ionen@gentoo.org> dev-qt/qtbase/files/qtbase-6.8.2-QTBUG-133808.patch | 12 ++++++++++++ .../{qtbase-6.8.2-r1.ebuild => qtbase-6.8.2-r2.ebuild} | 1 + 2 files changed, 13 insertions(+)