[Bug 266189] cad/cvc: error: invalid use of incomplete type 'struct std::array<unsigned int, 5>'

From: <bugzilla-noreply_at_freebsd.org>
Date: Sat, 03 Sep 2022 09:02:46 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=266189

            Bug ID: 266189
           Summary: cad/cvc: error: invalid use of incomplete type 'struct
                    std::array<unsigned int, 5>'
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
               URL: http://package18.nyi.freebsd.org/data/123amd64-default
                    -foo/2022-08-30_18h10m18s/logs/errors/cvc-1.1.3.log
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: yuri@freebsd.org
          Reporter: salvadore@freebsd.org
            Blocks: 265948
          Assignee: yuri@freebsd.org
             Flags: maintainer-feedback?(yuri@freebsd.org)

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 .


Referenced Bugs:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=265948
[Bug 265948] [exp-run] Update GCC_DEFAULT from 11 to 12
-- 
You are receiving this mail because:
You are the assignee for the bug.