Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 915059 - dev-qt/qtwebengine-5.15.10 fails to build on clang-17[default-libcxx]: error: no viable overloaded '='
Summary: dev-qt/qtwebengine-5.15.10 fails to build on clang-17[default-libcxx]: error:...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks: systemwide-libcxx 912821
  Show dependency tree
 
Reported: 2023-10-02 01:15 UTC by ppw0
Modified: 2023-12-19 18:14 UTC (History)
1 user (show)

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


Attachments
build log (dev-qt:qtwebengine-5.15.10_p20230815:20231002-003327.log.gz,343.15 KB, application/gzip)
2023-10-02 01:15 UTC, ppw0
Details
emerge --info (emerge_info.log,7.36 KB, text/x-log)
2023-10-02 01:15 UTC, ppw0
Details
qtwebengine-5.15.10_p20230815-clang-17-p1.patch (qtwebengine-5.15.10_p20230815-clang-17-p1.patch,5.47 KB, patch)
2023-10-08 21:48 UTC, Mark Wright
Details | Diff
qtwebengine-5.15.10_p20230815-clang-17-p2.patch (qtwebengine-5.15.10_p20230815-clang-17-p2.patch,1.70 KB, patch)
2023-10-08 21:50 UTC, Mark Wright
Details | Diff
qtwebengine-5.15.10_p20230815-clang-17-p3.patch (qtwebengine-5.15.10_p20230815-clang-17-p3.patch,11.26 KB, patch)
2023-10-08 22:01 UTC, Mark Wright
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ppw0 2023-10-02 01:15:27 UTC
Created attachment 871994 [details]
build log

In a clang-17[default-libcxx] environment, qtwebengine-5.15.10 will fail to compile with the following error(s):
---
In file included from ../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/trace_sorter.cc:17:
In file included from /usr/include/c++/v1/algorithm:1803:
In file included from /usr/include/c++/v1/__algorithm/nth_element.h:15:
/usr/include/c++/v1/__algorithm/sort.h:577:14: error: no viable overloaded '='
  577 |     *__begin = _Ops::__iter_move(__pivot_pos);
      |     ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__algorithm/sort.h:802:20: note: in instantiation of function template specialization 'std::__bitset_partition<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void> &>' requested here
  802 |             ? std::__bitset_partition<_AlgPolicy, _RandomAccessIterator, _Compare>(__first, __last, __comp)
      |                    ^
/usr/include/c++/v1/__algorithm/sort.h:878:8: note: in instantiation of function template specialization 'std::__introsort<std::_ClassicAlgPolicy, std::__less<void, void> &, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, false>' requested here
  878 |   std::__introsort<_AlgPolicy,
      |        ^
/usr/include/c++/v1/__algorithm/sort.h:946:10: note: in instantiation of function template specialization 'std::__sort_dispatch<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  946 |     std::__sort_dispatch<_AlgPolicy>(std::__unwrap_iter(__first), std::__unwrap_iter(__last), __comp);
      |          ^
/usr/include/c++/v1/__algorithm/sort.h:954:8: note: in instantiation of function template specialization 'std::__sort_impl<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  954 |   std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
      |        ^
/usr/include/c++/v1/__algorithm/sort.h:960:8: note: in instantiation of function template specialization 'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  960 |   std::sort(__first, __last, __less<>());
      |        ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/trace_sorter.cc:51:8: note: in instantiation of function template specialization 'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>' requested here
   51 |   std::sort(sort_begin, events_.end());
      |        ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h:191:26: note: candidate function not viable: 'this' argument has type 'const perfetto::trace_processor::TimestampedTracePiece', but method is not marked const
  191 |   TimestampedTracePiece& operator=(TimestampedTracePiece&& ttp) {
      |                          ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h:202:26: note: candidate function not viable: 'this' argument has type 'const perfetto::trace_processor::TimestampedTracePiece', but method is not marked const
  202 |   TimestampedTracePiece& operator=(const TimestampedTracePiece&) = delete;
      |                          ^
In file included from ../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/trace_sorter.cc:17:
In file included from /usr/include/c++/v1/algorithm:1803:
In file included from /usr/include/c++/v1/__algorithm/nth_element.h:15:

/usr/include/c++/v1/__algorithm/sort.h:647:14: error: no viable overloaded '='
  647 |     *__begin = _Ops::__iter_move(__pivot_pos);
      |     ~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__algorithm/sort.h:803:20: note: in instantiation of function template specialization 'std::__partition_with_equals_on_right<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void> &>' requested here
  803 |             : std::__partition_with_equals_on_right<_AlgPolicy, _RandomAccessIterator, _Compare>(__first, __last, __comp);
      |                    ^
/usr/include/c++/v1/__algorithm/sort.h:878:8: note: in instantiation of function template specialization 'std::__introsort<std::_ClassicAlgPolicy, std::__less<void, void> &, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, false>' requested here
  878 |   std::__introsort<_AlgPolicy,
      |        ^
/usr/include/c++/v1/__algorithm/sort.h:946:10: note: in instantiation of function template specialization 'std::__sort_dispatch<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  946 |     std::__sort_dispatch<_AlgPolicy>(std::__unwrap_iter(__first), std::__unwrap_iter(__last), __comp);
      |          ^
/usr/include/c++/v1/__algorithm/sort.h:954:8: note: in instantiation of function template specialization 'std::__sort_impl<std::_ClassicAlgPolicy, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  954 |   std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__last), __comp);
      |        ^
/usr/include/c++/v1/__algorithm/sort.h:960:8: note: in instantiation of function template specialization 'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator, std::__less<void, void>>' requested here
  960 |   std::sort(__first, __last, __less<>());
      |        ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/trace_sorter.cc:51:8: note: in instantiation of function template specialization 'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>' requested here
   51 |   std::sort(sort_begin, events_.end());
      |        ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h:191:26: note: candidate function not viable: 'this' argument has type 'const perfetto::trace_processor::TimestampedTracePiece', but method is not marked const
  191 |   TimestampedTracePiece& operator=(TimestampedTracePiece&& ttp) {
      |                          ^
../../../../qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/timestamped_trace_piece.h:202:26: note: candidate function not viable: 'this' argument has type 'const perfetto::trace_processor::TimestampedTracePiece', but method is not marked const
  202 |   TimestampedTracePiece& operator=(const TimestampedTracePiece&) = delete;
      |                          ^
2 errors generated.
---

Attaching log.
Comment 1 ppw0 2023-10-02 01:15:53 UTC
Created attachment 871995 [details]
emerge --info
Comment 2 Mark Wright gentoo-dev 2023-10-08 21:48:46 UTC
Created attachment 872358 [details, diff]
qtwebengine-5.15.10_p20230815-clang-17-p1.patch

Patch qtwebengine-5.15.10_p20230815-orig/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h to update it to the current version from upstream:
https://github.com/google/perfetto/raw/master/include/perfetto/ext/base/circular_queue.h
Comment 3 Mark Wright gentoo-dev 2023-10-08 21:50:50 UTC
Created attachment 872359 [details, diff]
qtwebengine-5.15.10_p20230815-clang-17-p2.patch

Add from upstream:
https://github.com/google/perfetto/raw/master/include/perfetto/ext/base/sys_types.h
Comment 4 Mark Wright gentoo-dev 2023-10-08 22:01:04 UTC
Created attachment 872360 [details, diff]
qtwebengine-5.15.10_p20230815-clang-17-p3.patch

Update qtwebengine-5.15.10_p20230815/src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/utils.h to a slightly stripped down version from upstream:
https://github.com/google/perfetto/raw/master/include/perfetto/ext/base/utils.h
and add a stripped down version of utils.cc from upstream:
https://raw.githubusercontent.com/google/perfetto/master/src/base/utils.cc
Comment 5 Mark Wright gentoo-dev 2023-10-08 22:08:14 UTC
(In reply to ppw0 from comment #0)

> In a clang-17[default-libcxx] environment, qtwebengine-5.15.10 will fail to
> compile with the following error(s):

Thanks for reporting. A workaround is to create the directory /etc/portage/patches/dev-qt/qtwebengine-5.15.10_p20230815 and add the attached patches to this directory:

# ls -al qtwebengine-5.15.10_p20230815-clang-17-p?.patch
-rw-r--r--. 1 root root  5604 Oct  8 21:29 qtwebengine-5.15.10_p20230815-clang-17-p1.patch
-rw-r--r--. 1 root root  1737 Oct  8 21:29 qtwebengine-5.15.10_p20230815-clang-17-p2.patch
-rw-r--r--. 1 root root 11535 Oct  8 21:29 qtwebengine-5.15.10_p20230815-clang-17-p3.patch
# 

The patches update template <class T> class CircularQueue { class Iterator { } } from upstream:
https://github.com/google/perfetto/
and some other stuff from upstream to allow it to compile and link with clang 17.0.2
Comment 6 Mark Wright gentoo-dev 2023-10-09 06:37:09 UTC
qtwebengine-5.15.11_p20230927 builds fine with clang 17.0.2 with no additional patches.
Comment 7 Andreas Sturmlechner gentoo-dev 2023-12-19 18:14:57 UTC
(In reply to Mark Wright from comment #6)
> qtwebengine-5.15.11_p20230927 builds fine with clang 17.0.2 with no
> additional patches.

Thanks, assuming this can be closed then.