Date: Fri, 06 Jan 2023 13:17:23 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 268784] www/qt5-webengine: fix build with clang/libc++ 15 Message-ID: <bug-268784-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268784 Bug ID: 268784 Summary: www/qt5-webengine: fix build with clang/libc++ 15 Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: Individual Port(s) Assignee: kde@FreeBSD.org Reporter: dim@FreeBSD.org Assignee: kde@FreeBSD.org Flags: maintainer-feedback?(kde@FreeBSD.org) 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_p= arty/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, ^=20=20=20=20=20=20=20=20=20=20=20=20 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~= ~~~~~~~~~~~~~~~ /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>::Ite= rator &>' 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::Circula= rQueue<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::TimestampedTracePi= ece>::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 instantiati= on of function template specialization 'std::__make_heap<std::_ClassicAlgPolic= y, std::__less<perfetto::trace_processor::TimestampedTracePiece> &, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePi= ece>::Iterator>' requested here std::__make_heap<_AlgPolicy>(__first, __middle, __comp); ^ /usr/include/c++/v1/__algorithm/partial_sort.h:67:27: note: in instantiat= ion of function template specialization 'std::__partial_sort_impl<std::_ClassicAlgPolicy, std::__less<perfetto::trace_processor::TimestampedTracePiece> &, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePi= ece>::Iterator, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePi= ece>::Iterator>' requested here auto __last_iter =3D std::__partial_sort_impl<_AlgPolicy>(__first, __mi= ddle, __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::_ClassicAlgPolic= y, std::__less<perfetto::trace_processor::TimestampedTracePiece>, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePi= ece>::Iterator, perfetto::base::CircularQueue<perfetto::trace_processor::TimestampedTracePi= ece>::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::TimestampedTracePi= ece>::Iterator, std::__less<perfetto::trace_processor::TimestampedTracePiece>>' requested h= ere std::__sort_impl<_ClassicAlgPolicy>(std::move(__first), std::move(__las= t), __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::Timesta= mpedTracePiece>::Iterator, std::__less<perfetto::trace_processor::TimestampedTracePiece>>' requested h= ere std::sort(__first, __last, __less<typename iterator_traits<_RandomAccessIterator>::value_type>()); ^ =20 ../../../../qtwebengine-everywhere-src-5.15.2/src/3rdparty/chromium/third_p= arty/perfetto/src/trace_processor/trace_sorter.cc:51:8: note: in instantiation of function template specialization 'std::sort<perfetto::base::CircularQueue<perfetto::trace_processor::Timesta= mpedTracePiece>::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. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-268784-7788>