8.0.32: build fails with gcc 13
Posted by: Tomasz Kloczko
Date: March 15, 2023 08:46PM
Date: March 15, 2023 08:46PM
Looks like mysql 8.0.32 cannot be build using gcc 13 from Fedra rawhide.
First error was easy to fix using below patch
```
--- a/sql/binlog/group_commit/bgc_ticket.h
+++ b/sql/binlog/group_commit/bgc_ticket.h
@@ -23,6 +23,7 @@
#ifndef BINLOG_BCG_TICKET_H
#define BINLOG_BCG_TICKET_H
+#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
```
However other errors I still did not bee able to figure out how o fix
```
[ 82%] Building CXX object unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o
cd /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/unittest/gunit && /usr/bin/g++ -DBOOST_NO_CXX98_FUNCTION_BASE -DDATA_DIR=\"/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/unittest/gunit\" -DDISABLE_PSI_COND -DDISABLE_PSI_FILE -DDISABLE_PSI_MEMORY -DDISABLE_PSI_METADATA -DDISABLE_PSI_MUTEX -DDISABLE_PSI_RWLOCK -DDISABLE_PSI_STAGE -DERRMSG_DIR=\"/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/share\" -DEXTRA_CODE_FOR_UNIT_TESTING -DHAVE_CONFIG_H -DHAVE_TLSv13 -DLZ4_DISABLE_DEPRECATE_WARNINGS -DMYSQL_SERVER -DRAPIDJSON_NO_SIZETYPEDEFINE -DRAPIDJSON_SCHEMA_USE_INTERNALREGEX=0 -DRAPIDJSON_SCHEMA_USE_STDREGEX=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_USE_MATH_DEFINES -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dmerge_small_tests_t_EXPORTS -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/include -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32 -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/rapidjson/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/extra/zlib/zlib-1.2.13 -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/zlib/zlib-1.2.13 -isystem /usr/include/editline -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/include/boost_1_77_0/patches -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/boost/boost_1_77_0 -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googlemock -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googlemock/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest/include -std=c++17 -fno-omit-frame-pointer -ftls-model=initial-exec -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wcast-qual -Wimplicit-fallthrough=5 -Wstringop-truncation -Wmissing-include-dirs -Wextra-semi -Wlogical-op -ffunction-sections -fdata-sections -DNDEBUG -fPIE -Wshadow=local -MD -MT unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o -MF CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o.d -o CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o -c /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc
In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
from /usr/include/c++/13/bits/stl_uninitialized.h:64,
from /usr/include/c++/13/memory:69,
from /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest/include/gtest/gtest.h:54,
from /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:23:
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int>, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >; _Up = std::unique_ptr<int>]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = std::unique_ptr<int>; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int> >::rebind<std::unique_ptr<int> >’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<std::unique_ptr<int>, stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> > >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<std::unique_ptr<int>, stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> > >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:406:43: required from ‘void stlalloc_unittest::STLAllocTestMoveOnly_MoveOnly_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:405:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
70 | _Tp>::value,
| ^~~~~
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>; _Up = stlalloc_unittest::Container_container]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_container; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container>::rebind<stlalloc_unittest::Container_container>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<stlalloc_unittest::Container_container, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<stlalloc_unittest::Container_container, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:324:40: required from ‘void stlalloc_unittest::STLAllocTestNested_NestedContainers_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:321:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>; _Up = stlalloc_unittest::Container_object]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_object; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object>::rebind<stlalloc_unittest::Container_object>’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<stlalloc_unittest::Container_object, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object> >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<stlalloc_unittest::Container_object, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:287:39: required from ‘void stlalloc_unittest::STLAllocTestObject_ContainerObject_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:286:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<int>, int, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<int>; _Up = int]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = int; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<int>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<int>, int>::rebind<int>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<int, stlalloc_unittest::Mem_root_allocator_wrapper<int> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<int, stlalloc_unittest::Mem_root_allocator_wrapper<int> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:220:24: required from ‘void stlalloc_unittest::STLAllocTestInt_SimpleList_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<int>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:219:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int>, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >; _Up = std::unique_ptr<int>]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = std::unique_ptr<int>; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int> >::rebind<std::unique_ptr<int> >’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<std::unique_ptr<int>, stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> > >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<std::unique_ptr<int>, stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> > >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:406:43: required from ‘void stlalloc_unittest::STLAllocTestMoveOnly_MoveOnly_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:405:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>; _Up = stlalloc_unittest::Container_container]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_container; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container>::rebind<stlalloc_unittest::Container_container>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<stlalloc_unittest::Container_container, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<stlalloc_unittest::Container_container, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:324:40: required from ‘void stlalloc_unittest::STLAllocTestNested_NestedContainers_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:321:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>; _Up = stlalloc_unittest::Container_object]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_object; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object>::rebind<stlalloc_unittest::Container_object>’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<stlalloc_unittest::Container_object, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object> >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<stlalloc_unittest::Container_object, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:287:39: required from ‘void stlalloc_unittest::STLAllocTestObject_ContainerObject_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:286:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<int>, int, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<int>; _Up = int]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = int; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<int>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<int>, int>::rebind<int>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<int, stlalloc_unittest::Malloc_allocator_wrapper<int> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<int, stlalloc_unittest::Malloc_allocator_wrapper<int> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:220:24: required from ‘void stlalloc_unittest::STLAllocTestInt_SimpleList_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<int>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:219:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
make[2]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/build.make:947: unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:11512: unittest/gunit/CMakeFiles/merge_small_tests-t.dir/all] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu'
make: *** [Makefile:169: all] Error 2
```
In above are warnings exposed by use LTO.
First error was easy to fix using below patch
```
--- a/sql/binlog/group_commit/bgc_ticket.h
+++ b/sql/binlog/group_commit/bgc_ticket.h
@@ -23,6 +23,7 @@
#ifndef BINLOG_BCG_TICKET_H
#define BINLOG_BCG_TICKET_H
+#include <cstdint>
#include <functional>
#include <limits>
#include <memory>
```
However other errors I still did not bee able to figure out how o fix
```
[ 82%] Building CXX object unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o
cd /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/unittest/gunit && /usr/bin/g++ -DBOOST_NO_CXX98_FUNCTION_BASE -DDATA_DIR=\"/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/unittest/gunit\" -DDISABLE_PSI_COND -DDISABLE_PSI_FILE -DDISABLE_PSI_MEMORY -DDISABLE_PSI_METADATA -DDISABLE_PSI_MUTEX -DDISABLE_PSI_RWLOCK -DDISABLE_PSI_STAGE -DERRMSG_DIR=\"/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/share\" -DEXTRA_CODE_FOR_UNIT_TESTING -DHAVE_CONFIG_H -DHAVE_TLSv13 -DLZ4_DISABLE_DEPRECATE_WARNINGS -DMYSQL_SERVER -DRAPIDJSON_NO_SIZETYPEDEFINE -DRAPIDJSON_SCHEMA_USE_INTERNALREGEX=0 -DRAPIDJSON_SCHEMA_USE_STDREGEX=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_USE_MATH_DEFINES -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Dmerge_small_tests_t_EXPORTS -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/include -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32 -I/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/rapidjson/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu/extra/zlib/zlib-1.2.13 -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/zlib/zlib-1.2.13 -isystem /usr/include/editline -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/include/boost_1_77_0/patches -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/boost/boost_1_77_0 -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googlemock -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googlemock/include -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest -isystem /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest/include -std=c++17 -fno-omit-frame-pointer -ftls-model=initial-exec -O2 -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fdata-sections -ffunction-sections -flto=auto -flto-partition=none -Wall -Wextra -Wformat-security -Wvla -Wundef -Wmissing-format-attribute -Woverloaded-virtual -Wcast-qual -Wimplicit-fallthrough=5 -Wstringop-truncation -Wmissing-include-dirs -Wextra-semi -Wlogical-op -ffunction-sections -fdata-sections -DNDEBUG -fPIE -Wshadow=local -MD -MT unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o -MF CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o.d -o CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o -c /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc
In file included from /usr/include/c++/13/ext/alloc_traits.h:34,
from /usr/include/c++/13/bits/stl_uninitialized.h:64,
from /usr/include/c++/13/memory:69,
from /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/extra/googletest/googletest-release-1.12.0/googletest/include/gtest/gtest.h:54,
from /home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:23:
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int>, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >; _Up = std::unique_ptr<int>]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = std::unique_ptr<int>; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int> >::rebind<std::unique_ptr<int> >’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<std::unique_ptr<int>, stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> > >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<std::unique_ptr<int>, stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> > >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:406:43: required from ‘void stlalloc_unittest::STLAllocTestMoveOnly_MoveOnly_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<std::unique_ptr<int> >]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:405:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
70 | _Tp>::value,
| ^~~~~
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>; _Up = stlalloc_unittest::Container_container]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_container; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container>::rebind<stlalloc_unittest::Container_container>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<stlalloc_unittest::Container_container, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<stlalloc_unittest::Container_container, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:324:40: required from ‘void stlalloc_unittest::STLAllocTestNested_NestedContainers_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_container>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:321:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>; _Up = stlalloc_unittest::Container_object]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_object; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object>::rebind<stlalloc_unittest::Container_object>’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<stlalloc_unittest::Container_object, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object> >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<stlalloc_unittest::Container_object, stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:287:39: required from ‘void stlalloc_unittest::STLAllocTestObject_ContainerObject_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<stlalloc_unittest::Container_object>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:286:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Mem_root_allocator_wrapper<int>, int, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<int>; _Up = int]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = int; _Alloc = stlalloc_unittest::Mem_root_allocator_wrapper<int>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Mem_root_allocator_wrapper<int>, int>::rebind<int>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<int, stlalloc_unittest::Mem_root_allocator_wrapper<int> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<int, stlalloc_unittest::Mem_root_allocator_wrapper<int> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:220:24: required from ‘void stlalloc_unittest::STLAllocTestInt_SimpleList_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Mem_root_allocator_wrapper<int>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:219:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int>, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >; _Up = std::unique_ptr<int>]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = std::unique_ptr<int>; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >, std::unique_ptr<int> >::rebind<std::unique_ptr<int> >’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<std::unique_ptr<int>, stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> > >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<std::unique_ptr<int>, stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> > >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:406:43: required from ‘void stlalloc_unittest::STLAllocTestMoveOnly_MoveOnly_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<std::unique_ptr<int> >]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:405:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>; _Up = stlalloc_unittest::Container_container]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_container; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>, stlalloc_unittest::Container_container>::rebind<stlalloc_unittest::Container_container>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<stlalloc_unittest::Container_container, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<stlalloc_unittest::Container_container, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:324:40: required from ‘void stlalloc_unittest::STLAllocTestNested_NestedContainers_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_container>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:321:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>; _Up = stlalloc_unittest::Container_object]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = stlalloc_unittest::Container_object; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>, stlalloc_unittest::Container_object>::rebind<stlalloc_unittest::Container_object>’
/usr/include/c++/13/bits/stl_vector.h:88:21: required from ‘struct std::_Vector_base<stlalloc_unittest::Container_object, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object> >’
/usr/include/c++/13/bits/stl_vector.h:423:11: required from ‘class std::vector<stlalloc_unittest::Container_object, stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:287:39: required from ‘void stlalloc_unittest::STLAllocTestObject_ContainerObject_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<stlalloc_unittest::Container_object>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:286:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
/usr/include/c++/13/bits/alloc_traits.h: In instantiation of ‘struct std::__allocator_traits_base::__rebind<stlalloc_unittest::Malloc_allocator_wrapper<int>, int, void>’:
/usr/include/c++/13/bits/alloc_traits.h:94:11: required by substitution of ‘template<class _Alloc, class _Up> using std::__alloc_rebind = typename std::__allocator_traits_base::__rebind<_Alloc, _Up>::type [with _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<int>; _Up = int]’
/usr/include/c++/13/bits/alloc_traits.h:228:8: required by substitution of ‘template<class _Alloc> template<class _Tp> using std::allocator_traits< <template-parameter-1-1> >::rebind_alloc = std::__alloc_rebind<_Alloc, _Tp> [with _Tp = int; _Alloc = stlalloc_unittest::Malloc_allocator_wrapper<int>]’
/usr/include/c++/13/ext/alloc_traits.h:126:65: required from ‘struct __gnu_cxx::__alloc_traits<stlalloc_unittest::Malloc_allocator_wrapper<int>, int>::rebind<int>’
/usr/include/c++/13/bits/stl_list.h:429:24: required from ‘class std::__cxx11::_List_base<int, stlalloc_unittest::Malloc_allocator_wrapper<int> >’
/usr/include/c++/13/bits/stl_list.h:632:11: required from ‘class std::__cxx11::list<int, stlalloc_unittest::Malloc_allocator_wrapper<int> >’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:220:24: required from ‘void stlalloc_unittest::STLAllocTestInt_SimpleList_Test<gtest_TypeParam_>::TestBody() [with gtest_TypeParam_ = stlalloc_unittest::Malloc_allocator_wrapper<int>]’
/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/unittest/gunit/stl_alloc-t.cc:219:1: required from here
/usr/include/c++/13/bits/alloc_traits.h:70:31: error: static assertion failed: allocator_traits<A>::rebind_alloc<A::value_type> must be A
/usr/include/c++/13/bits/alloc_traits.h:70:31: note: ‘std::integral_constant<bool, false>::value’ evaluates to false
make[2]: *** [unittest/gunit/CMakeFiles/merge_small_tests-t.dir/build.make:947: unittest/gunit/CMakeFiles/merge_small_tests-t.dir/stl_alloc-t.cc.o] Error 1
make[2]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu'
make[1]: *** [CMakeFiles/Makefile2:11512: unittest/gunit/CMakeFiles/merge_small_tests-t.dir/all] Error 2
make[1]: Leaving directory '/home/tkloczko/rpmbuild/BUILD/mysql-8.0.32/x86_64-redhat-linux-gnu'
make: *** [Makefile:169: all] Error 2
```
In above are warnings exposed by use LTO.
Subject
Views
Written By
Posted
Sorry, only registered users may post in this forum.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.