[Bug 268784] www/qt5-webengine: fix build with clang/libc++ 15
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Fri Jan 6 18:06:04 GMT 2023
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=268784
--- Comment #3 from commit-hook at FreeBSD.org ---
A commit in branch main references this bug:
URL:
https://cgit.FreeBSD.org/ports/commit/?id=a6ea23b32706da00c72f645cc57c7e26ce419668
commit a6ea23b32706da00c72f645cc57c7e26ce419668
Author: Dimitry Andric <dim at FreeBSD.org>
AuthorDate: 2023-01-06 11:42:21 +0000
Commit: Dimitry Andric <dim at FreeBSD.org>
CommitDate: 2023-01-06 18:03:41 +0000
www/qt5-webengine: fix build with clang/libc++ 15
During an exp-run for llvm 15 (see bug 265425), it turned out that
www/qt5-webengine failed to build with clang and libc++ 15:
In file included from
../../../../qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_party/perfetto/src/trace_processor/trace_sorter.cc:17:
In file included from /usr/include/c++/v1/algorithm:1712:
In file included from /usr/include/c++/v1/memory:842:
In file included from /usr/include/c++/v1/__algorithm/move.h:12:
/usr/include/c++/v1/__algorithm/iterator_operations.h:100:5: error:
static assertion failed due to requirement
'is_same<perfetto::trace_processor::TimestampedTracePiece &, const
perfetto::trace_processor::TimestampedTracePiece &>::value': It looks like your
iterator's `iterator_traits<It>::reference` does not match the return type of
dereferencing the iterator, i.e., calling `*it`. This is undefined behavior
according to [input.iterators] and can lead to dangling reference issues at
runtime, so we are flagging this.
static_assert(is_same<__deref_t<_Iter>, typename
iterator_traits<__uncvref_t<_Iter> >::reference>::value,
^
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/__algorithm/iterator_operations.h:115:5: note: in
instantiation of function template specialization
'std::_IterOps<std::_ClassicAlgPolicy>::__validate_iter_reference<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator
&>' requested here
__validate_iter_reference<_Iter>();
^
/usr/include/c++/v1/__algorithm/sift_down.h:55:28: note: in instantiation
of function template specialization
'std::_IterOps<std::_ClassicAlgPolicy>::__iter_move<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator
&>' requested here
value_type __top(_Ops::__iter_move(__start));
^
/usr/include/c++/v1/__algorithm/make_heap.h:37:14: note: in instantiation
of function template specialization 'std::__sift_down<std::_ClassicAlgPolicy,
std::__less<perfetto::trace_processor::TimestampedTracePiece> &,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>'
requested here
std::__sift_down<_AlgPolicy>(__first, __comp_ref, __n, __first +
__start);
^
/usr/include/c++/v1/__algorithm/partial_sort.h:39:8: note: in
instantiation of function template specialization
'std::__make_heap<std::_ClassicAlgPolicy,
std::__less<perfetto::trace_processor::TimestampedTracePiece> &,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>'
requested here
std::__make_heap<_AlgPolicy>(__first, __middle, __comp);
^
/usr/include/c++/v1/__algorithm/partial_sort.h:67:27: note: in
instantiation of function template specialization
'std::__partial_sort_impl<std::_ClassicAlgPolicy,
std::__less<perfetto::trace_processor::TimestampedTracePiece> &,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>'
requested here
auto __last_iter = std::__partial_sort_impl<_AlgPolicy>(__first,
__middle, __last, static_cast<_Comp_ref>(__comp));
^
/usr/include/c++/v1/__algorithm/sort.h:681:10: note: in instantiation of
function template specialization 'std::__partial_sort<std::_ClassicAlgPolicy,
std::__less<perfetto::trace_processor::TimestampedTracePiece>,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator>'
requested here
std::__partial_sort<_AlgPolicy>(__first, __last, __last, __comp);
^
/usr/include/c++/v1/__algorithm/sort.h:694:8: note: in instantiation of
function template specialization 'std::__sort_impl<std::_ClassicAlgPolicy,
perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator,
std::__less<perfetto::trace_processor::TimestampedTracePiece>>' requested here
std::__sort_impl<_ClassicAlgPolicy>(std::move(__first),
std::move(__last), __comp);
^
/usr/include/c++/v1/__algorithm/sort.h:700:8: note: in instantiation of
function template specialization
'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePiece>::Iterator,
std::__less<perfetto::trace_processor::TimestampedTracePiece>>' requested here
std::sort(__first, __last, __less<typename
iterator_traits<_RandomAccessIterator>::value_type>());
^
../../../../qtwebengine-everywhere-src-5.15.2/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
std::sort(sort_begin, events_.end());
^
This turns out to be a problem with the iterator type in perfetto's
CircularQueue class: its pointer and reference types are const, while
they should not be. Upstream fixed this in
https://github.com/google/perfetto/commit/c81e804f8, so apply a
minimalistic version of it.
PR: 268784
Approved by: tcberner (maintainer)
MFH: 2023Q1
...clude_perfetto_ext_base_circular__queue.h (new) | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the kde-freebsd
mailing list