Bug 281474 - www/qt6-webengine: fix build with clang and libc++ 19
Summary: www/qt6-webengine: fix build with clang and libc++ 19
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-kde (group)
URL:
Keywords:
Depends on:
Blocks: 280562
  Show dependency treegraph
 
Reported: 2024-09-13 07:28 UTC by Dimitry Andric
Modified: 2024-09-14 07:35 UTC (History)
1 user (show)

See Also:
jhale: maintainer-feedback+


Attachments
www/qt6-webengine: fix build with clang 19 (13.41 KB, patch)
2024-09-13 07:36 UTC, Dimitry Andric
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dimitry Andric freebsd_committer freebsd_triage 2024-09-13 07:28:54 UTC
Clang 19 now implements CWG 96 [1], which requires a template
argument list after a 'template' keyword, resulting in errors similar
to:

  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:331:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    331 |     Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); });
        |                    ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:337:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    337 |     Base::template CallIfEnabled(
        |                    ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:352:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    352 |     Base::template Trace([&](typename Base::TraceContext ctx) {
        |                    ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:499:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
    499 |     Base::template Trace([&](typename Base::TraceContext ctx) {
        |                    ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1050:22: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
   1050 |       Base::template TraceWithInstances(instances, std::move(lambda));
        |                      ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1064:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
   1064 |     Base::template Trace([&](typename Base::TraceContext ctx) {
        |                    ^

For perfetto, this was fixed by upstream commit e2f661907a [1].

Another typo is in the third-party quiche library, resulting in:

  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h:201:48: error: no member named 'size' in 'QuicIntervalDeque<T, C>'; did you mean 'Size'?
    201 |       QUICHE_DCHECK(copy.index_ < copy.deque_->size());
        |                                                ^~~~
        |                                                Size
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/common/platform/api/quiche_logging.h:48:53: note: expanded from macro 'QUICHE_DCHECK'
     48 | #define QUICHE_DCHECK(condition) QUICHE_DCHECK_IMPL(condition)
        |                                                     ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/overrides/quiche_platform_impl/quiche_logging_impl.h:89:46: note: expanded from macro 'QUICHE_DCHECK_IMPL'
     89 | #define QUICHE_DCHECK_IMPL(condition) DCHECK(condition)
        |                                              ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/check.h:237:53: note: expanded from macro 'DCHECK'
    237 | #define DCHECK(condition) EAT_CHECK_STREAM_PARAMS(!(condition))
        |                                                     ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/check.h:58:35: note: expanded from macro 'EAT_CHECK_STREAM_PARAMS'
     58 |        : ::logging::VoidifyStream(expr) & (*::logging::g_swallow_stream)
        |                                   ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h:241:15: note: 'Size' declared here
    241 |   std::size_t Size() const;
        |               ^

And finally there is a typo in chromium:

  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:181:19: error: no member named 'map' in 'Iterator<ReturnType>'; did you mean 'map_'?
    181 |       map_ = iter.map;
        |                   ^~~
        |                   map_
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:239:26: note: 'map_' declared here
    239 |     raw_ptr<IDMap<V, K>> map_;
        |                          ^
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:182:20: error: no member named 'iter' in 'Iterator<ReturnType>'; did you mean 'iter_'?
    182 |       iter_ = iter.iter;
        |                    ^~~~
        |                    iter_
  ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:240:40: note: 'iter_' declared here
    240 |     typename HashTable::const_iterator iter_;
        |                                        ^

[1] https://android.googlesource.com/platform/external/perfetto/+/e2f661907a
Comment 1 Dimitry Andric freebsd_committer freebsd_triage 2024-09-13 07:36:19 UTC
Created attachment 253534 [details]
www/qt6-webengine: fix build with clang 19
Comment 2 Jason E. Hale freebsd_committer freebsd_triage 2024-09-14 03:11:52 UTC
Approved for commit to main with the condition that it is made before 2024-09-19, so as not to cause conflict with either of our workflows. Qt 6.7.3, which will include these changes, is scheduled to be out 2024-09-19 and I'll have the update ready to push shortly afterwards.

I don't think MFH for this is really necessary since I will be MFH'ing Qt 6.7.3 for security reasons anyways and will just have to revert this in the quarterly branch, as well, since the patches will no longer apply. I can deal with it, though, if it interrupts your workflow.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-09-14 07:24:26 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2c14b6e0b4af03bff9cefe5a9288d6b7450755d8

commit 2c14b6e0b4af03bff9cefe5a9288d6b7450755d8
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2024-09-13 07:34:56 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2024-09-14 07:22:49 +0000

    www/qt6-webengine: fix build with clang and libc++ 19

    Clang 19 now implements CWG 96 [1], which requires a template
    argument list after a 'template' keyword, resulting in errors similar
    to:

      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:331:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        331 |     Base::template Trace([](typename Base::TraceContext ctx) { ctx.Flush(); });
            |                    ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:337:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        337 |     Base::template CallIfEnabled(
            |                    ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:352:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        352 |     Base::template Trace([&](typename Base::TraceContext ctx) {
            |                    ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:499:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
        499 |     Base::template Trace([&](typename Base::TraceContext ctx) {
            |                    ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1050:22: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       1050 |       Base::template TraceWithInstances(instances, std::move(lambda));
            |                      ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/third_party/perfetto/include/perfetto/tracing/internal/track_event_data_source.h:1064:20: error: a template argument list is expected after a name prefixed by the template keyword [-Wmissing-template-arg-list-after-template-kw]
       1064 |     Base::template Trace([&](typename Base::TraceContext ctx) {
            |                    ^

    For perfetto, this was fixed by upstream commit e2f661907a [1].

    Another typo is in the third-party quiche library, resulting in:

      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h:201:48: error: no member named 'size' in 'QuicIntervalDeque<T, C>'; did you mean 'Size'?
        201 |       QUICHE_DCHECK(copy.index_ < copy.deque_->size());
            |                                                ^~~~
            |                                                Size
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/common/platform/api/quiche_logging.h:48:53: note: expanded from macro 'QUICHE_DCHECK'
         48 | #define QUICHE_DCHECK(condition) QUICHE_DCHECK_IMPL(condition)
            |                                                     ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/overrides/quiche_platform_impl/quiche_logging_impl.h:89:46: note: expanded from macro 'QUICHE_DCHECK_IMPL'
         89 | #define QUICHE_DCHECK_IMPL(condition) DCHECK(condition)
            |                                              ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/check.h:237:53: note: expanded from macro 'DCHECK'
        237 | #define DCHECK(condition) EAT_CHECK_STREAM_PARAMS(!(condition))
            |                                                     ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/check.h:58:35: note: expanded from macro 'EAT_CHECK_STREAM_PARAMS'
         58 |        : ::logging::VoidifyStream(expr) & (*::logging::g_swallow_stream)
            |                                   ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/net/third_party/quiche/src/quiche/quic/core/quic_interval_deque.h:241:15: note: 'Size' declared here
        241 |   std::size_t Size() const;
            |               ^

    And finally there is a typo in chromium:

      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:181:19: error: no member named 'map' in 'Iterator<ReturnType>'; did you mean 'map_'?
        181 |       map_ = iter.map;
            |                   ^~~
            |                   map_
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:239:26: note: 'map_' declared here
        239 |     raw_ptr<IDMap<V, K>> map_;
            |                          ^
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:182:20: error: no member named 'iter' in 'Iterator<ReturnType>'; did you mean 'iter_'?
        182 |       iter_ = iter.iter;
            |                    ^~~~
            |                    iter_
      ../../../../../qtwebengine-everywhere-src-6.7.2/src/3rdparty/chromium/base/containers/id_map.h:240:40: note: 'iter_' declared here
        240 |     typename HashTable::const_iterator iter_;
            |                                        ^

    [1] https://android.googlesource.com/platform/external/perfetto/+/e2f661907a

    PR:             281474
    Approved by:    jhale (maintainer)

 ...dparty_chromium_base_containers_id__map.h (new) | 13 +++++
 ..._quiche_quic_core_quic__interval__deque.h (new) | 17 +++++++
 ...blink_renderer_platform_wtf_hash__table.h (new) | 31 ++++++++++++
 ...ing_internal_track__event__data__source.h (new) | 55 ++++++++++++++++++++++
 4 files changed, 116 insertions(+)