I tried to build OSv in Fedora 34 container which comes with gcc 11 and 
boost 1.75 and I got following errors straight away:

./scripts/build -j4 check
Building into build/release.x64
  GEN gen/include/osv/version.h
  GEN build/release.x64/gen/include/bits/alltypes.h
  HOST_CXX build/release.x64/gen-ctype-data
  AS arch/x64/boot.S
  CXX bsd/init.cc
  CXX bsd/net.cc
  CXX bsd/x64/machine/in_cksum.cc
  CC bsd/sys/crypto/rijndael/rijndael-alg-fst.c
In file included from /usr/include/c++/11/ext/atomicity.h:38,
                 from /usr/include/c++/11/bits/ios_base.h:39,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/net.cc:8:
/usr/include/sys/single_threaded.h:24:1: error: ‘__BEGIN_DECLS’ does not 
name a type
   24 | __BEGIN_DECLS
      | ^~~~~~~~~~~~~
/usr/include/sys/single_threaded.h:31:1: error: ‘__END_DECLS’ does not name 
a type
   31 | __END_DECLS
      | ^~~~~~~~~~~
In file included from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/net.cc:8:
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::facet::_M_add_reference() const’:
/usr/include/c++/11/bits/locale_classes.h:449:18: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  449 |     { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                  ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::facet::_M_remove_reference() const’:
/usr/include/c++/11/bits/locale_classes.h:456:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  456 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) 
== 1)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::_Impl::_M_add_reference()’:
/usr/include/c++/11/bits/locale_classes.h:559:18: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  559 |     { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                  ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::_Impl::_M_remove_reference()’:
/usr/include/c++/11/bits/locale_classes.h:566:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  566 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) 
== 1)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/net.cc:8:
/usr/include/c++/11/bits/ios_base.h: In member function ‘void 
std::ios_base::_Callback_list::_M_add_reference()’:
/usr/include/c++/11/bits/ios_base.h:566:39: error: ‘__atomic_add_dispatch’ 
is not a member of ‘__gnu_cxx’
  566 |       _M_add_reference() { 
__gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ios_base.h: In member function ‘int 
std::ios_base::_Callback_list::_M_remove_reference()’:
/usr/include/c++/11/bits/ios_base.h:574:32: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  574 |         int __res = 
__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC bsd/sys/crypto/rijndael/rijndael-api.c
In file included from /usr/include/c++/11/ext/atomicity.h:38,
                 from /usr/include/c++/11/bits/ios_base.h:39,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/init.cc:8:
/usr/include/sys/single_threaded.h:24:1: error: ‘__BEGIN_DECLS’ does not 
name a type
   24 | __BEGIN_DECLS
      | ^~~~~~~~~~~~~
/usr/include/sys/single_threaded.h:31:1: error: ‘__END_DECLS’ does not name 
a type
   31 | __END_DECLS
      | ^~~~~~~~~~~
  CC bsd/sys/crypto/rijndael/rijndael-api-fst.c
In file included from /usr/include/c++/11/bits/ios_base.h:41,
                 from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/init.cc:8:
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::facet::_M_add_reference() const’:
/usr/include/c++/11/bits/locale_classes.h:449:18: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  449 |     { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                  ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::facet::_M_remove_reference() const’:
/usr/include/c++/11/bits/locale_classes.h:456:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  456 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) 
== 1)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::_Impl::_M_add_reference()’:
/usr/include/c++/11/bits/locale_classes.h:559:18: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  559 |     { __gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                  ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/locale_classes.h: In member function ‘void 
std::locale::_Impl::_M_remove_reference()’:
/usr/include/c++/11/bits/locale_classes.h:566:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  566 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1) 
== 1)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/ios:42,
                 from /usr/include/c++/11/ostream:38,
                 from /usr/include/c++/11/iostream:39,
                 from include/osv/debug.hh:11,
                 from bsd/init.cc:8:
/usr/include/c++/11/bits/ios_base.h: In member function ‘void 
std::ios_base::_Callback_list::_M_add_reference()’:
/usr/include/c++/11/bits/ios_base.h:566:39: error: ‘__atomic_add_dispatch’ 
is not a member of ‘__gnu_cxx’
  566 |       _M_add_reference() { 
__gnu_cxx::__atomic_add_dispatch(&_M_refcount, 1); }
      |                                       ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/ios_base.h: In member function ‘int 
std::ios_base::_Callback_list::_M_remove_reference()’:
/usr/include/c++/11/bits/ios_base.h:574:32: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  574 |         int __res = 
__gnu_cxx::__exchange_and_add_dispatch(&_M_refcount, -1);
      |                                ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr.h:53,
                 from /usr/include/c++/11/memory:77,
                 from /usr/include/boost/core/pointer_traits.hpp:13,
                 from /usr/include/boost/core/allocator_access.hpp:13,
                 from /usr/include/boost/format/alt_sstream.hpp:19,
                 from /usr/include/boost/format/internals.hpp:24,
                 from /usr/include/boost/format.hpp:38,
                 from include/osv/printf.hh:11,
                 from include/osv/debug.hh:17,
                 from bsd/net.cc:8:
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_add_ref_copy()’:
/usr/include/c++/11/bits/shared_ptr_base.h:148:20: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  148 |       { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
      |                    ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_release()’:
/usr/include/c++/11/bits/shared_ptr_base.h:165:24: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  165 |         if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 
-1) == 1)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h:180:28: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  180 |             if 
(__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_weak_add_ref()’:
/usr/include/c++/11/bits/shared_ptr_base.h:191:20: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  191 |       { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
      |                    ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_weak_release()’:
/usr/include/c++/11/bits/shared_ptr_base.h:198:24: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  198 |         if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, 
-1) == 1)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘bool 
std::_Sp_counted_base<_Lp>::_M_add_ref_lock_nothrow() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_mutex]’:
/usr/include/c++/11/bits/shared_ptr_base.h:244:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  244 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) 
== 0)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
  CC bsd/sys/crypto/sha2/sha2.c
bsd/sys/crypto/sha2/sha2.c:556:29: error: argument 1 of type ‘sha2_byte[]’ 
{aka ‘unsigned char[]’} with mismatched bound [-Werror=array-parameter=]
  556 | void SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {
      |                   ~~~~~~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:120:19: note: previously declared as 
‘u_int8_t[32]’ {aka ‘unsigned char[32]’}
  120 | void SHA256_Final(u_int8_t[SHA256_DIGEST_LENGTH], SHA256_CTX*);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsd/sys/crypto/sha2/sha2.c:619:44: error: argument 2 of type ‘char[]’ with 
mismatched bound [-Werror=array-parameter=]
  619 | char *SHA256_End(SHA256_CTX* context, char buffer[]) {
      |                                       ~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:121:31: note: previously declared as ‘char[65]’
  121 | char* SHA256_End(SHA256_CTX*, char[SHA256_DIGEST_STRING_LENGTH]);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsd/sys/crypto/sha2/sha2.c:919:29: error: argument 1 of type ‘sha2_byte[]’ 
{aka ‘unsigned char[]’} with mismatched bound [-Werror=array-parameter=]
  919 | void SHA512_Final(sha2_byte digest[], SHA512_CTX* context) {
      |                   ~~~~~~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:132:19: note: previously declared as 
‘u_int8_t[64]’ {aka ‘unsigned char[64]’}
  132 | void SHA512_Final(u_int8_t[SHA512_DIGEST_LENGTH], SHA512_CTX*);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsd/sys/crypto/sha2/sha2.c:948:44: error: argument 2 of type ‘char[]’ with 
mismatched bound [-Werror=array-parameter=]
  948 | char *SHA512_End(SHA512_CTX* context, char buffer[]) {
      |                                       ~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:133:31: note: previously declared as 
‘char[129]’
  133 | char* SHA512_End(SHA512_CTX*, char[SHA512_DIGEST_STRING_LENGTH]);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsd/sys/crypto/sha2/sha2.c:994:29: error: argument 1 of type ‘sha2_byte[]’ 
{aka ‘unsigned char[]’} with mismatched bound [-Werror=array-parameter=]
  994 | void SHA384_Final(sha2_byte digest[], SHA384_CTX* context) {
      |                   ~~~~~~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:126:19: note: previously declared as 
‘u_int8_t[48]’ {aka ‘unsigned char[48]’}
  126 | void SHA384_Final(u_int8_t[SHA384_DIGEST_LENGTH], SHA384_CTX*);
      |                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bsd/sys/crypto/sha2/sha2.c:1023:44: error: argument 2 of type ‘char[]’ with 
mismatched bound [-Werror=array-parameter=]
 1023 | char *SHA384_End(SHA384_CTX* context, char buffer[]) {
      |                                       ~~~~~^~~~~~~~
In file included from bsd/sys/crypto/sha2/sha2.c:49:
./bsd/sys/crypto/sha2/sha2.h:127:31: note: previously declared as ‘char[97]’
  127 | char* SHA384_End(SHA384_CTX*, char[SHA384_DIGEST_STRING_LENGTH]);
      |                               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/shared_ptr.h:53,
                 from /usr/include/c++/11/memory:77,
                 from /usr/include/boost/core/pointer_traits.hpp:13,
                 from /usr/include/boost/core/allocator_access.hpp:13,
                 from /usr/include/boost/format/alt_sstream.hpp:19,
                 from /usr/include/boost/format/internals.hpp:24,
                 from /usr/include/boost/format.hpp:38,
                 from include/osv/printf.hh:11,
                 from include/osv/debug.hh:17,
                 from bsd/init.cc:8:
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_add_ref_copy()’:
/usr/include/c++/11/bits/shared_ptr_base.h:148:20: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  148 |       { __gnu_cxx::__atomic_add_dispatch(&_M_use_count, 1); }
      |                    ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_release()’:
/usr/include/c++/11/bits/shared_ptr_base.h:165:24: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  165 |         if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 
-1) == 1)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h:180:28: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  180 |             if 
(__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count,
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_weak_add_ref()’:
/usr/include/c++/11/bits/shared_ptr_base.h:191:20: error: 
‘__atomic_add_dispatch’ is not a member of ‘__gnu_cxx’
  191 |       { __gnu_cxx::__atomic_add_dispatch(&_M_weak_count, 1); }
      |                    ^~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘void 
std::_Sp_counted_base<_Lp>::_M_weak_release()’:
/usr/include/c++/11/bits/shared_ptr_base.h:198:24: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  198 |         if (__gnu_cxx::__exchange_and_add_dispatch(&_M_weak_count, 
-1) == 1)
      |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/11/bits/shared_ptr_base.h: In member function ‘bool 
std::_Sp_counted_base<_Lp>::_M_add_ref_lock_nothrow() [with 
__gnu_cxx::_Lock_policy _Lp = __gnu_cxx::_S_mutex]’:
/usr/include/c++/11/bits/shared_ptr_base.h:244:22: error: 
‘__exchange_and_add_dispatch’ is not a member of ‘__gnu_cxx’
  244 |       if (__gnu_cxx::__exchange_and_add_dispatch(&_M_use_count, 1) 
== 0)
      |                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:348: build/release.x64/bsd/sys/crypto/sha2/sha2.o] 
Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:344: build/release.x64/bsd/net.o] Error 1
make: *** [Makefile:344: build/release.x64/bsd/init.o] Error 1
make failed. Exiting from build script

Any help fixing those would be appreciated.

Waldek

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osv-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/d1d7cfc2-6a55-4466-a8a6-b223fdefabfan%40googlegroups.com.

Reply via email to