Updating GCC_DEFAULT from GCC 11 to GCC 12 is blocked by the fact that building this port with GCC 12 on i386 and amd64 fails. The error message is the following: g++12 -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -O2 -pipe -fstack-protector-strong -Wl,-rpath=/usr/local/lib/gcc12 -Wl,-rpath=/usr/local/lib/gcc12 -std=gnu++11 -MT cdlParser.o -MD - MP -MF .deps/cdlParser.Tpo -c -o cdlParser.o cdlParser.cc In file included from /usr/local/lib/gcc12/include/c++/vector:64, from Cvc.hh:62, from cdlParser.yy:32, from cdlParser.cc:41: /usr/local/lib/gcc12/include/c++/bits/stl_vector.h: In instantiation of 'std::_Vector_base<_Tp, _Alloc>::~_Vector_base() [with _Tp = std::array<unsigned int, 5>; _Alloc = std::allocator<std:: array<unsigned int, 5> >]': /usr/local/lib/gcc12/include/c++/bits/stl_vector.h:526:7: required from here /usr/local/lib/gcc12/include/c++/bits/stl_vector.h:367:49: error: invalid use of incomplete type 'struct std::array<unsigned int, 5>' 367 | _M_impl._M_end_of_storage - _M_impl._M_start); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ In file included from /usr/local/lib/gcc12/include/c++/bits/hashtable_policy.h:34, from /usr/local/lib/gcc12/include/c++/bits/hashtable.h:35, from /usr/local/lib/gcc12/include/c++/unordered_map:46, from CvcTypes.hh:33, from Cvc.hh:39: /usr/local/lib/gcc12/include/c++/tuple:1595:45: note: declaration of 'struct std::array<unsigned int, 5>' 1595 | template<typename _Tp, size_t _Nm> struct array; | ^~~~~ In file included from /usr/local/lib/gcc12/include/c++/bits/char_traits.h:42, from /usr/local/lib/gcc12/include/c++/string:40, from CvcTypes.hh:28: /usr/local/lib/gcc12/include/c++/type_traits: In instantiation of 'struct std::is_destructible<std::array<unsigned int, 5> >': /usr/local/lib/gcc12/include/c++/bits/stl_construct.h:188:51: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = array<unsigned int, 5>*]' /usr/local/lib/gcc12/include/c++/bits/alloc_traits.h:850:15: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = array<unsigned i nt, 5>*; _Tp = array<unsigned int, 5>]' /usr/local/lib/gcc12/include/c++/bits/stl_vector.h:730:15: required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::array<unsigned int, 5>; _Alloc = std::allocator<std::array<uns igned int, 5> >]' CCircuit.hh:35:7: required from here /usr/local/lib/gcc12/include/c++/type_traits:910:52: error: static assertion failed: template argument must be a complete class or an unbounded array 910 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lib/gcc12/include/c++/type_traits:910:52: note: 'std::__is_complete_or_unbounded<__type_identity<array<unsigned int, 5> > >((std::__type_identity<std::array<unsigned int, 5> >(), std::__type_identity<std::array<unsigned int, 5> >()))' evaluates to false In file included from /usr/local/lib/gcc12/include/c++/bits/alloc_traits.h:33, from /usr/local/lib/gcc12/include/c++/ext/alloc_traits.h:34, from /usr/local/lib/gcc12/include/c++/bits/basic_string.h:39, from /usr/local/lib/gcc12/include/c++/string:53: /usr/local/lib/gcc12/include/c++/bits/stl_construct.h: In instantiation of 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = array<unsigned int, 5>*]': /usr/local/lib/gcc12/include/c++/bits/alloc_traits.h:850:15: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = array<unsigned int, 5>*; _Tp = array<unsigned int, 5>]' /usr/local/lib/gcc12/include/c++/bits/stl_vector.h:730:15: required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::array<unsigned int, 5>; _Alloc = std::allocator<std::array<unsigned int, 5> >]' CCircuit.hh:35:7: required from here /usr/local/lib/gcc12/include/c++/type_traits:910:52: error: static assertion failed: template argument must be a complete class or an unbounded array 910 | static_assert(std::__is_complete_or_unbounded(__type_identity<_Tp>{}), | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lib/gcc12/include/c++/type_traits:910:52: note: 'std::__is_complete_or_unbounded<__type_identity<array<unsigned int, 5> > >((std::__type_identity<std::array<unsigned int, 5> >(), s td::__type_identity<std::array<unsigned int, 5> >()))' evaluates to false In file included from /usr/local/lib/gcc12/include/c++/bits/alloc_traits.h:33, from /usr/local/lib/gcc12/include/c++/ext/alloc_traits.h:34, from /usr/local/lib/gcc12/include/c++/bits/basic_string.h:39, from /usr/local/lib/gcc12/include/c++/string:53: /usr/local/lib/gcc12/include/c++/bits/stl_construct.h: In instantiation of 'void std::_Destroy(_ForwardIterator, _ForwardIterator) [with _ForwardIterator = array<unsigned int, 5>*]': /usr/local/lib/gcc12/include/c++/bits/alloc_traits.h:850:15: required from 'void std::_Destroy(_ForwardIterator, _ForwardIterator, allocator<_T2>&) [with _ForwardIterator = array<unsigned i nt, 5>*; _Tp = array<unsigned int, 5>]' /usr/local/lib/gcc12/include/c++/bits/stl_vector.h:730:15: required from 'std::vector<_Tp, _Alloc>::~vector() [with _Tp = std::array<unsigned int, 5>; _Alloc = std::allocator<std::array<uns igned int, 5> >]' CCircuit.hh:35:7: required from here /usr/local/lib/gcc12/include/c++/bits/stl_construct.h:188:51: error: static assertion failed: value type is destructible 188 | static_assert(is_destructible<_Value_type>::value, | ^~~~~ /usr/local/lib/gcc12/include/c++/bits/stl_construct.h:188:51: note: 'std::integral_constant<bool, false>::value' evaluates to false /usr/local/lib/gcc12/include/c++/bits/stl_construct.h:195:25: error: invalid use of incomplete type 'std::iterator_traits<std::array<unsigned int, 5>*>::value_type' {aka 'struct std::array<unsigned int, 5>'} 195 | std::_Destroy_aux<__has_trivial_destructor(_Value_type)>:: | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/lib/gcc12/include/c++/tuple:1595:45: note: declaration of 'std::iterator_traits<std::array<unsigned int, 5>*>::value_type' {aka 'struct std::array<unsigned int, 5>'} 1595 | template<typename _Tp, size_t _Nm> struct array; | ^~~~~ gmake[4]: *** [Makefile:551: cdlParser.o] Error 1 Please see also the log in the URL field. This URL might be useful to solve the issue: http://gcc.gnu.org/gcc-12/porting_to.html .
Relevant bug report: https://github.com/d-m-bailey/cvc/issues/239
(In reply to Yuri Victorovich from comment #1) Thanks Yuri. I see that the GitHub issue starts as an issue about clang. Please note that while it is is always nice to have the port compile with GCC 12, removing USE_GCC would be even better as far as GCC default version upgrade is concerned: you might want to check that USE_GCC is still needed once the issue is resolved.
Is there any progress on this bug report? Is there anything I could do to help? This is one of last three bugs that is blocking the update off GCC default version according to the most recent exp-run. If the bug is complex and requires more time, please also consider setting USE_GCC=11. Thanks.
cad/cvc currently builds fine with gcc. Thank you for your help, Lorenzo!
I am sorry, but I have to re-open this bug report: according to Antoine's exp-run, it still fails with GCC 12. New log: http://package18.nyi.freebsd.org/data/123amd64-default-foo/2022-11-12_19h30m16s/logs/cvc-1.1.3.log
Created attachment 238130 [details] Set USE_GCC=11 Unless we have a better solution, I propose keeping this port with GCC 11 for now.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=b486b0dd5d4ae8b6b21865b409ed2953cf477fd9 commit b486b0dd5d4ae8b6b21865b409ed2953cf477fd9 Author: Lorenzo Salvadore <salvadore@FreeBSD.org> AuthorDate: 2022-11-16 21:51:36 +0000 Commit: Lorenzo Salvadore <salvadore@FreeBSD.org> CommitDate: 2022-12-03 14:15:24 +0000 cad/cvc: Set USE_GCC=11 The build fails with GCC 12, which is soon to become GCC_DEFAULT. PR: 266189 Reported by: exp-run (antoine) Approved by: maintainer timeout (yuri, 2 weeks) cad/cvc/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
I have committed the patch that enforces the use of GCC 11, so this bug does not block the GCC_DEFAULT update anymore.