FreeBSD Bugzilla – Attachment 245895 Details for
Bug 274740
www/qt5-webengine: fix build with libc++ 17
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
www/qt5-webengine: fix build with libc++ 17
www__qt5-webengine-fix-libcxx17-build-1.diff (text/plain), 5.85 KB, created by
Dimitry Andric
on 2023-10-26 16:31:29 UTC
(
hide
)
Description:
www/qt5-webengine: fix build with libc++ 17
Filename:
MIME Type:
Creator:
Dimitry Andric
Created:
2023-10-26 16:31:29 UTC
Size:
5.85 KB
patch
obsolete
>commit 74b8285e42c5b8e7810d79726c5a8522c06dd8d8 >Author: Dimitry Andric <dim@FreeBSD.org> >Date: 2023-10-26T12:45:00+02:00 > > www/qt5-webengine: fix build with libc++ 17 > > Building www/qt5-webengine with libc++ 17 results in the following > compile errors: > > In file included from ../../../../kde-qtwebengine-5.15.15p0/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<>()); > | ^ > ../../../../kde-qtwebengine-5.15.15p0/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()); > | ^ > ../../../../kde-qtwebengine-5.15.15p0/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) { > | ^ > ../../../../kde-qtwebengine-5.15.15p0/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; > | ^ > > This is because perfetto's CircularQueue template is only half > const-correct. Upstream fixed this in: > > https://github.com/google/perfetto/commit/b82a213bcf71dd8e68b53941375936c7905c0ff2 > > so apply that fix to qt5-webengine's older copy of perfetto. > >diff --git a/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_circular__queue.h b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_circular__queue.h >new file mode 100644 >index 000000000000..227cbf7dfcfd >--- /dev/null >+++ b/www/qt5-webengine/files/patch-src_3rdparty_chromium_third__party_perfetto_include_perfetto_ext_base_circular__queue.h >@@ -0,0 +1,35 @@ >+--- src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h.orig 2023-07-14 13:25:01 UTC >++++ src/3rdparty/chromium/third_party/perfetto/include/perfetto/ext/base/circular_queue.h >+@@ -67,25 +67,21 @@ class CircularQueue { >+ ignore_result(generation); >+ } >+ >+- T* operator->() { >++ Iterator(const Iterator&) noexcept = default; >++ Iterator& operator=(const Iterator&) noexcept = default; >++ Iterator(Iterator&&) noexcept = default; >++ Iterator& operator=(Iterator&&) noexcept = default; >++ >++ T* operator->() const { >+ #if PERFETTO_DCHECK_IS_ON() >+ PERFETTO_DCHECK(generation_ == queue_->generation()); >+ #endif >+ return queue_->Get(pos_); >+ } >+ >+- const T* operator->() const { >+- return const_cast<CircularQueue<T>::Iterator*>(this)->operator->(); >+- } >++ T& operator*() const { return *(operator->()); } >+ >+- T& operator*() { return *(operator->()); } >+- const T& operator*() const { return *(operator->()); } >+- >+ value_type& operator[](difference_type i) { return *(*this + i); } >+- >+- const value_type& operator[](difference_type i) const { >+- return const_cast<CircularQueue<T>::Iterator&>(*this)[i]; >+- } >+ >+ Iterator& operator++() { >+ Add(1);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 274740
: 245895