Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 949629 - kde-plasma/kwin-6.3.0 w/ dev-qt/qtbase-6.8.2: [llvm/libcxx] error: no member named 'is_null_pointer_v' in namespace 'std'
Summary: kde-plasma/kwin-6.3.0 w/ dev-qt/qtbase-6.8.2: [llvm/libcxx] error: no member ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-libcxx
  Show dependency tree
 
Reported: 2025-02-11 20:11 UTC by Michael Egger
Modified: 2025-02-18 02:25 UTC (History)
6 users (show)

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


Attachments
emerge log (emerge.zip,48.90 KB, application/zip)
2025-02-11 20:12 UTC, Michael Egger
Details
emerge --info (emerge-info.txt,8.24 KB, text/plain)
2025-02-11 20:13 UTC, Michael Egger
Details
Revert C++ std to c++20 (fix-cxx-std.patch,1.52 KB, patch)
2025-02-11 23:56 UTC, Robert Holt
Details | Diff
qtbase missing include (qtbase-include.patch,315 bytes, patch)
2025-02-12 03:55 UTC, Robert Holt
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Egger 2025-02-11 20:11:47 UTC
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>
Comment 1 Michael Egger 2025-02-11 20:12:53 UTC
Created attachment 918789 [details]
emerge log
Comment 2 Michael Egger 2025-02-11 20:13:07 UTC
Created attachment 918790 [details]
emerge --info
Comment 3 Robert Holt 2025-02-11 23:24:38 UTC
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.
Comment 4 Robert Holt 2025-02-11 23:56:30 UTC
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.
Comment 5 Robert Holt 2025-02-12 03:55:18 UTC
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.
Comment 6 Ionen Wolkens gentoo-dev 2025-02-13 02:00:52 UTC
As https://bugs.kde.org/show_bug.cgi?id=499835#c2 asks, anyone reported this upstream yet?
Comment 7 Andreas Sturmlechner gentoo-dev 2025-02-16 15:02:47 UTC
Not a KWin issue, so dropping CC.
Comment 8 unhappy-ending 2025-02-17 07:15:31 UTC
(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.
Comment 9 Ionen Wolkens gentoo-dev 2025-02-17 08:25:08 UTC
(been hoping for it to get reported upstream before adding the patch downstream)
Comment 10 Robert Holt 2025-02-17 15:59:27 UTC
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.
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-17 17:58:33 UTC
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.
Comment 12 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2025-02-17 17:58:42 UTC
(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.
Comment 13 Robert Holt 2025-02-17 19:06:32 UTC
Makes sense, I've reported it upstream now: https://bugreports.qt.io/browse/QTBUG-133808
Comment 14 Ionen Wolkens gentoo-dev 2025-02-18 02:08:48 UTC
Thanks!

Sounds like it'll make it into 6.8.3, so I'll skip live and add it 6.8.2 only.
Comment 15 Larry the Git Cow gentoo-dev 2025-02-18 02:25:48 UTC
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(+)