oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

tbb-2021.10.0-rc1 Fails to compile when -Wfatal-errors is set

Open heitbaum opened this issue 2 years ago • 16 comments

s/build tbb
CLEAN      tbb
    *      Removing /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.9.0 ...
    *      Removing /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/qa_checks/tbb-* ...
UNPACK      tbb
BUILD      tbb (target)
    TOOLCHAIN      cmake (auto-detect)
Executing (target): cmake -GNinja -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_TOOLCHAIN_FILE=/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/etc/cmake-x86_64-libreelec-linux-gnu.conf -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1
-- The CXX compiler identification is GNU 13.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- IPO enabled
-- The C compiler identification is GNU 13.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created
-- HWLOC target HWLOC::hwloc_2 doesn't exist. The tbbbind_2_0 target cannot be created
-- HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created
-- Performing Test LINKER_HAS_NO_AS_NEEDED
-- Performing Test LINKER_HAS_NO_AS_NEEDED - Success
-- Configuring done (0.2s)
-- Generating done (0.1s)
-- Build files have been written to: /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/.x86_64-libreelec-linux-gnu
Executing (target): ninja 
[63/323] Building CXX object test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o
FAILED: test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o 
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++  -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/.. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/src/tbb/../../include -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -MF test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o.d -o test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/tbb/test_task_group.cpp
In file included from ../test/common/test.h:32,
                 from ../test/tbb/test_task_group.cpp:17:
../test/common/doctest.h: In instantiation of 'doctest::detail::Expression_lhs<L>::operator doctest::detail::Result() [with L = const char (&)[58]]':
../test/tbb/test_task_group.cpp:103:17:   required from 'void SharedGroupBodyImpl<task_group_type>::Wait() [with task_group_type = tbb::detail::d1::task_group]'
../test/tbb/test_task_group.cpp:138:13:   required from 'void SharedGroupBodyImpl<task_group_type>::Run(uintptr_t) [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]'
../test/tbb/test_task_group.cpp:188:43:   required from 'void SharedGroupBody<task_group_type>::operator()(uintptr_t) const [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]'
../test/common/utils.h:75:17:   required from 'void utils::NativeParallelFor(Index, const Body&) [with Index = unsigned int; Body = SharedGroupBody<tbb::detail::d1::task_group>]'
../test/tbb/test_task_group.cpp:220:22:   required from 'void TestParallelSpawn() [with task_group_type = tbb::detail::d1::task_group]'
../test/tbb/test_task_group.cpp:247:47:   required from 'void TestThreadSafety() [with task_group_type = tbb::detail::d1::task_group]'
../test/tbb/test_task_group.cpp:770:42:   required from here
../test/common/doctest.h:1560:42: error: the compiler can assume that the address of 'doctest::detail::Expression_lhs<const char (&)[58]>::lhs' will never be NULL [-Werror=address]
 1560 |             bool res = static_cast<bool>(lhs);
      |                                          ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[76/323] Building CXX object test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o
FAILED: test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o 
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++  -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/.. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/src/tbb/../../include -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o -MF test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o.d -o test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/tbb/test_concurrent_unordered_set.cpp
In file included from ../test/common/concurrent_associative_common.h:22,
                 from ../test/common/concurrent_unordered_common.h:24,
                 from ../test/tbb/test_concurrent_unordered_set.cpp:23:
In destructor 'AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >::~AllocatorAwareData()',
    inlined from 'void std::__new_allocator<_Tp>::destroy(_Up*) [with _Up = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Tp = tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int>]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/new_allocator.h:194:13,
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::destroy(allocator_type&, _Up*) [with _Up = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Tp = tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int>]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:557:15,
    inlined from 'void std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::destroy(_Tp*) [with _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _OuterAlloc = std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> >; _InnerAllocs = {}]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/scoped_allocator:452:22,
    inlined from 'static decltype (__a.destroy(__p)) std::allocator_traits< <template-parameter-1-1> >::_S_destroy(_Alloc2&, _Tp*, int) [with _Alloc2 = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >; _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Alloc = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:287:15,
    inlined from 'static void std::allocator_traits< <template-parameter-1-1> >::destroy(_Alloc&, _Tp*) [with _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Alloc = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:393:14,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, true>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:930:49,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:915:10,
    inlined from 'tbb::detail::d1::concurrent_unordered_base<Traits>::list_node_type* tbb::detail::d1::concurrent_unordered_base<Traits>::insert_dummy_node(node_ptr, sokey_type) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1064:29,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::init_bucket(size_type) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1112:48:
../test/common/custom_allocators.h:438:7: error: array subscript 2 is outside array bounds of 'tbb::detail::d1::list_node<long unsigned int> [1]' [-Werror=array-bounds=]
  438 | class AllocatorAwareData {
      |       ^~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[77/323] Building CXX object test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o
FAILED: test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o 
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/bin/x86_64-libreelec-linux-gnu-g++  -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/.. -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test -I/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/src/tbb/../../include -march=x86-64-v3 -Wall -pipe  -O2 -fomit-frame-pointer -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o -MF test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o.d -o test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o -c /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/build/tbb-2021.10.0-rc1/test/tbb/test_concurrent_unordered_map.cpp
In file included from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/x86_64-libreelec-linux-gnu/bits/c++allocator.h:33,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/allocator.h:46,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/string:43,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/locale_classes.h:40,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/ios_base.h:41,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/streambuf:43,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/streambuf_iterator.h:35,
                 from /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/iterator:66,
                 from ../include/tbb/../oneapi/tbb/detail/_range_common.h:25,
                 from ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:24,
                 from ../include/tbb/../oneapi/tbb/concurrent_unordered_map.h:21,
                 from ../include/tbb/concurrent_unordered_map.h:17,
                 from ../test/tbb/test_concurrent_unordered_map.cpp:22:
In member function 'void std::__new_allocator<_Tp>::destroy(_Up*) [with _Up = std::pair<const int, int>; _Tp = tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int>]',
    inlined from 'static void std::allocator_traits<std::allocator<_CharT> >::destroy(allocator_type&, _Up*) [with _Up = std::pair<const int, int>; _Tp = tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int>]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:557:15,
    inlined from 'void StaticSharedCountingAllocator<BaseAllocatorType>::destroy(U*) [with U = std::pair<const int, int>; BaseAllocatorType = std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> >]' at ../test/common/custom_allocators.h:432:29,
    inlined from 'static decltype (__a.destroy(__p)) std::allocator_traits< <template-parameter-1-1> >::_S_destroy(_Alloc2&, _Tp*, int) [with _Alloc2 = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >; _Tp = std::pair<const int, int>; _Alloc = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:287:15,
    inlined from 'static void std::allocator_traits< <template-parameter-1-1> >::destroy(_Alloc&, _Tp*) [with _Tp = std::pair<const int, int>; _Alloc = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >]' at /var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/alloc_traits.h:393:14,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:930:49,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:915:10,
    inlined from 'tbb::detail::d1::concurrent_unordered_base<Traits>::list_node_type* tbb::detail::d1::concurrent_unordered_base<Traits>::insert_dummy_node(node_ptr, sokey_type) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1064:29,
    inlined from 'void tbb::detail::d1::concurrent_unordered_base<Traits>::init_bucket(size_type) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]' at ../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1112:48:
/var/media/DATA/home-rudi/LibreELEC.tv/build.LibreELEC-Generic.x86_64-12.0-devel/toolchain/x86_64-libreelec-linux-gnu/include/c++/13.1.0/bits/new_allocator.h:194:11: error: array subscript 2 is outside array bounds of 'StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::list_node<long unsigned int> > >::value_type [1]' {aka 'tbb::detail::d1::list_node<long unsigned int> [1]'} [-Werror=array-bounds=]
  194 |         { __p->~_Up(); }
      |           ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[78/323] Building CXX object test/CMakeFiles/test_eh_flow_graph.dir/tbb/test_eh_flow_graph.cpp.o
ninja: build stopped: subcommand failed.
FAILURE: s/build tbb during make_target (default)
*********** FAILED COMMAND ***********
ninja ${NINJA_OPTS} ${PKG_MAKE_OPTS_TARGET}
**************************************

heitbaum avatar Jun 12 '23 04:06 heitbaum

Hi ! Could you please let us know more about the build environment? I also see that you are using a toolchain file, could you give us more details about the additional flags being used?

AnuyaWelling2801 avatar Jun 12 '23 15:06 AnuyaWelling2801

I can reproduce this on Fedora 38 without anything special:

[hpa@carbon-x1 oneTBB]$ mkdir -p ../build
[hpa@carbon-x1 oneTBB]$ cd ../build/
[hpa@carbon-x1 build]$ cmake -S ../oneTBB
-- Checking for one of the modules 'hwloc'
-- IPO enabled
-- HWLOC target HWLOC::hwloc_1_11 doesn't exist. The tbbbind target cannot be created
-- HWLOC target HWLOC::hwloc_2 doesn't exist. The tbbbind_2_0 target cannot be created
-- HWLOC target HWLOC::hwloc_2_5 doesn't exist. The tbbbind_2_5 target cannot be created
-- Configuring done (0.3s)
-- Generating done (0.1s)
-- Build files have been written to: /home/hpa/3d/onetbb/build
[hpa@carbon-x1 build]$ cmake --build . -j8 
[...]
In file included from /home/hpa/3d/onetbb/oneTBB/test/common/concurrent_associative_common.h:22,
                 from /home/hpa/3d/onetbb/oneTBB/test/common/concurrent_unordered_common.h:24,
                 from /home/hpa/3d/onetbb/oneTBB/test/tbb/test_concurrent_unordered_set.cpp:23:
In destructor ‘AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >::~AllocatorAwareData()’,
    inlined from ‘void std::__new_allocator<_Tp>::destroy(_Up*) [with _Up = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Tp = tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int>]’ at /usr/include/c++/13/bits/new_allocator.h:194:13,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::destroy(allocator_type&, _Up*) [with _Up = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Tp = tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int>]’ at /usr/include/c++/13/bits/alloc_traits.h:557:15,
    inlined from ‘void std::scoped_allocator_adaptor<_OuterAlloc, _InnerAllocs>::destroy(_Tp*) [with _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _OuterAlloc = std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> >; _InnerAllocs = {}]’ at /usr/include/c++/13/scoped_allocator:452:22,
    inlined from ‘static decltype (__a.destroy(__p)) std::allocator_traits< <template-parameter-1-1> >::_S_destroy(_Alloc2&, _Tp*, int) [with _Alloc2 = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >; _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Alloc = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >]’ at /usr/include/c++/13/bits/alloc_traits.h:287:15,
    inlined from ‘static void std::allocator_traits< <template-parameter-1-1> >::destroy(_Alloc&, _Tp*) [with _Tp = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >; _Alloc = std::scoped_allocator_adaptor<std::allocator<tbb::detail::d1::value_node<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, long unsigned int> > >]’ at /usr/include/c++/13/bits/alloc_traits.h:393:14,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, true>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:930:49,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:915:10,
    inlined from ‘tbb::detail::d1::concurrent_unordered_base<Traits>::list_node_type* tbb::detail::d1::concurrent_unordered_base<Traits>::insert_dummy_node(node_ptr, sokey_type) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1064:29,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::init_bucket(size_type) [with Traits = tbb::detail::d1::concurrent_unordered_set_traits<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > >, std::hash<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::equal_to<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > >, std::scoped_allocator_adaptor<std::allocator<AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int> > > > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1112:48:
/home/hpa/3d/onetbb/oneTBB/test/common/custom_allocators.h:438:7: error: array subscript 2 is outside array bounds of ‘tbb::detail::d1::list_node<long unsigned int> [1]’ [-Werror=array-bounds=]
  438 | class AllocatorAwareData {
      |       ^~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
gmake[2]: *** [test/CMakeFiles/test_concurrent_unordered_set.dir/build.make:76: test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:754: test/CMakeFiles/test_concurrent_unordered_set.dir/all] Error 2
In file included from /usr/include/c++/13/x86_64-redhat-linux/bits/c++allocator.h:33,
                 from /usr/include/c++/13/bits/allocator.h:46,
                 from /usr/include/c++/13/string:43,
                 from /usr/include/c++/13/bits/locale_classes.h:40,
                 from /usr/include/c++/13/bits/ios_base.h:41,
                 from /usr/include/c++/13/streambuf:43,
                 from /usr/include/c++/13/bits/streambuf_iterator.h:35,
                 from /usr/include/c++/13/iterator:66,
                 from /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_range_common.h:25,
                 from /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:24,
                 from /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/concurrent_unordered_map.h:21,
                 from /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/concurrent_unordered_map.h:17,
                 from /home/hpa/3d/onetbb/oneTBB/test/tbb/test_concurrent_unordered_map.cpp:22:
In member function ‘void std::__new_allocator<_Tp>::destroy(_Up*) [with _Up = std::pair<const int, int>; _Tp = tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int>]’,
    inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::destroy(allocator_type&, _Up*) [with _Up = std::pair<const int, int>; _Tp = tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int>]’ at /usr/include/c++/13/bits/alloc_traits.h:557:15,
    inlined from ‘void StaticSharedCountingAllocator<BaseAllocatorType>::destroy(U*) [with U = std::pair<const int, int>; BaseAllocatorType = std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> >]’ at /home/hpa/3d/onetbb/oneTBB/test/common/custom_allocators.h:432:29,
    inlined from ‘static decltype (__a.destroy(__p)) std::allocator_traits< <template-parameter-1-1> >::_S_destroy(_Alloc2&, _Tp*, int) [with _Alloc2 = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >; _Tp = std::pair<const int, int>; _Alloc = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >]’ at /usr/include/c++/13/bits/alloc_traits.h:287:15,
    inlined from ‘static void std::allocator_traits< <template-parameter-1-1> >::destroy(_Alloc&, _Tp*) [with _Tp = std::pair<const int, int>; _Alloc = StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::value_node<std::pair<const int, int>, long unsigned int> > >]’ at /usr/include/c++/13/bits/alloc_traits.h:393:14,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:930:49,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::destroy_node(node_ptr) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:915:10,
    inlined from ‘tbb::detail::d1::concurrent_unordered_base<Traits>::list_node_type* tbb::detail::d1::concurrent_unordered_base<Traits>::insert_dummy_node(node_ptr, sokey_type) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1064:29,
    inlined from ‘void tbb::detail::d1::concurrent_unordered_base<Traits>::init_bucket(size_type) [with Traits = tbb::detail::d1::concurrent_unordered_map_traits<int, int, std::hash<int>, std::equal_to<int>, StaticSharedCountingAllocator<std::allocator<std::pair<const int, int> > >, false>]’ at /home/hpa/3d/onetbb/oneTBB/src/tbb/../../include/tbb/../oneapi/tbb/detail/_concurrent_unordered_base.h:1112:48:
/usr/include/c++/13/bits/new_allocator.h:194:11: error: array subscript 2 is outside array bounds of ‘StaticSharedCountingAllocator<std::allocator<tbb::detail::d1::list_node<long unsigned int> > >::value_type [1]’ {aka ‘tbb::detail::d1::list_node<long unsigned int> [1]’} [-Werror=array-bounds=]
  194 |         { __p->~_Up(); }
      |           ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
gmake[2]: *** [test/CMakeFiles/test_concurrent_unordered_map.dir/build.make:76: test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o] Error 1

hpax avatar Jun 26 '23 05:06 hpax

Can confirm that this still errors with 2021.10.0

heitbaum avatar Jul 25 '23 11:07 heitbaum

I'm also experiencing this issue, 2021.10.0 on Void Linux:

[61/323] Building CXX object test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o
FAILED: test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o 
/usr/bin/g++  -I/builddir/tbb-2021.10.0/test/.. -I/builddir/tbb-2021.10.0/test -I/builddir/tbb-2021.10.0/src/tbb/../../include -DNDEBUG -fstack-clash-protection -D_FORTIFY_SOURCE=2 -mtune=generic -O2    -ffile-prefix-map=/builddir/tbb-2021.10.0/build=. -std=c++11 -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -MF test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o.d -o test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -c /builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp
In file included from /builddir/tbb-2021.10.0/test/common/test.h:32,
                 from /builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:17:
/builddir/tbb-2021.10.0/test/common/doctest.h: In instantiation of 'doctest::detail::Expression_lhs<L>::operator doctest::detail::Result() [with L = const char (&)[58]]':
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:103:17:   required from 'void SharedGroupBodyImpl<task_group_type>::Wait() [with task_group_type = tbb::detail::d1::task_group]'
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:138:13:   required from 'void SharedGroupBodyImpl<task_group_type>::Run(uintptr_t) [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]'
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:188:43:   required from 'void SharedGroupBody<task_group_type>::operator()(uintptr_t) const [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]'
/builddir/tbb-2021.10.0/test/common/utils.h:75:17:   required from 'void utils::NativeParallelFor(Index, const Body&) [with Index = unsigned int; Body = SharedGroupBody<tbb::detail::d1::task_group>]'
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:220:22:   required from 'void TestParallelSpawn() [with task_group_type = tbb::detail::d1::task_group]'
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:247:47:   required from 'void TestThreadSafety() [with task_group_type = tbb::detail::d1::task_group]'
/builddir/tbb-2021.10.0/test/tbb/test_task_group.cpp:770:42:   required from here
/builddir/tbb-2021.10.0/test/common/doctest.h:1560:42: error: the compiler can assume that the address of 'doctest::detail::Expression_lhs<const char (&)[58]>::lhs' will never be NULL [-Werror=address]
 1560 |             bool res = static_cast<bool>(lhs);
      |                                          ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

cinerea0 avatar Aug 13 '23 02:08 cinerea0

A Flatpak build using oneTBB 2021.10.0 fails with the Freedesktop SDK 22.08 (gcc (GCC) 12.2.0), but succeeds with version 21.08 (gcc (GCC) 11.3.0).

Build log including the flags
========================================================================
Building module onetbb in /srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1
========================================================================
]2;flatpak-builder: Building onetbbFB: Running: tar xf /srv/buildbot/worker/downloads/downloads/487023a955e5a3cc6d3a0d5f89179f9b6c0ae7222613a7185b0227ba0c83700b/v2021.10.0.tar.gz --no-same-owner --strip-components=1 -z
FB: Running 'flatpak build --die-with-parent --nofilesystem=host:reset --filesystem=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1 --env=SOURCE_DATE_EPOCH=1691257918 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --unshare=network /srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/rofiles/rofiles-8QPuzH /bin/sh -c 'sed -i "s|set(TBB_WARNING_LEVEL|set(TBB_WARNING_LEVEL -Wno-error=stringop-overflow|" cmake/compilers/GNU.cmake'' on host
FB: host_command_exited_cb 3788330 0
FB: Running 'flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/onetbb --nofilesystem=host:reset --filesystem=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1 --bind-mount=/run/build/onetbb=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1 --build-dir=/run/build/onetbb --bind-mount=/run/ccache=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/ccache --unshare=network --env=SOURCE_DATE_EPOCH=1691257918 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=64 /srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/rofiles/rofiles-8QPuzH cmake '-DCMAKE_INSTALL_PREFIX:PATH='\''/app'\''' -G Ninja . -Wno-dev' on host
-- The CXX compiler identification is GNU 12.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- CMAKE_BUILD_TYPE is not specified. Using default: RelWithDebInfo
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE  
-- Checking for one of the modules 'hwloc'
-- IPO enabled
-- The C compiler identification is GNU 12.2.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The tbbbind_2_5 target will be configured using the HWLOC 2.9.2
-- Performing Test LINKER_HAS_NO_AS_NEEDED
-- Performing Test LINKER_HAS_NO_AS_NEEDED - Success
-- Configuring done (1.4s)
-- Generating done (0.1s)
-- Build files have been written to: /run/build/onetbb
FB: host_command_exited_cb 3788350 0
]2;flatpak-builder: Installing onetbbFB: Running 'flatpak build --die-with-parent --env=FLATPAK_BUILDER_BUILDDIR=/run/build/onetbb --nofilesystem=host:reset --filesystem=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1 --bind-mount=/run/build/onetbb=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/build/onetbb-1 --build-dir=/run/build/onetbb --bind-mount=/run/ccache=/srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/ccache --unshare=network --env=SOURCE_DATE_EPOCH=1691257918 '--env=CFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=CXXFLAGS=-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer ' '--env=LDFLAGS=-L/app/lib -Wl,-z,relro,-z,now -Wl,--as-needed ' --env=CCACHE_DIR=/run/ccache/disabled --env=PATH=/app/bin:/usr/bin --env=LD_LIBRARY_PATH=/app/lib --env=PKG_CONFIG_PATH=/app/lib/pkgconfig:/app/share/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig --env=FLATPAK_BUILDER_N_JOBS=64 /srv/buildbot/worker/build-x86_64-5/build/.flatpak-builder/rofiles/rofiles-8QPuzH ninja -j64 -l128' on host
[1/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/itt_notify.cpp.o
[2/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o
[3/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.o
[4/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/version.cpp.o
[5/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.o
[6/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/rml_tbb.cpp.o
[7/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/semaphore.cpp.o
[8/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.o
[9/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/queuing_rw_mutex.cpp.o
[10/326] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/proxy.cpp.o
[11/326] Building CXX object src/tbbmalloc_proxy/CMakeFiles/tbbmalloc_proxy.dir/function_replacement.cpp.o
[12/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/exception.cpp.o
[13/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/parallel_pipeline.cpp.o
[14/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/rtm_rw_mutex.cpp.o
[15/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.o
[16/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/misc_ex.cpp.o
[17/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/rtm_mutex.cpp.o
[18/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/dynamic_link.cpp.o
[19/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.o
[20/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.o
[21/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/governor.cpp.o
[22/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/main.cpp.o
[23/326] Building CXX object src/tbbbind/CMakeFiles/tbbbind_2_5.dir/tbb_bind.cpp.o
[24/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/private_server.cpp.o
[25/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/observer_proxy.cpp.o
[26/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/concurrent_bounded_queue.cpp.o
[27/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/task_dispatcher.cpp.o
[28/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/arena_slot.cpp.o
[29/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/misc.cpp.o
[30/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/small_object_pool.cpp.o
[31/326] Linking CXX shared library gnu_12.2_cxx11_64_relwithdebinfo/libtbbbind_2_5.so.3.10
[32/326] Building CXX object src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.o
[33/326] Creating library symlink gnu_12.2_cxx11_64_relwithdebinfo/libtbbbind_2_5.so.3 gnu_12.2_cxx11_64_relwithdebinfo/libtbbbind_2_5.so
[34/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/arena.cpp.o
[35/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/global_control.cpp.o
[36/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/profiling.cpp.o
[37/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/task_group_context.cpp.o
[38/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/market.cpp.o
[39/326] Building CXX object test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o
FAILED: test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o 
/usr/bin/c++  -I/run/build/onetbb/test/.. -I/run/build/onetbb/test -I/run/build/onetbb/src/tbb/../../include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -O2 -g -DNDEBUG -std=c++11 -Wno-error=stringop-overflow -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -mrtm -mwaitpkg -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -MF test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o.d -o test/CMakeFiles/test_task_group.dir/tbb/test_task_group.cpp.o -c /run/build/onetbb/test/tbb/test_task_group.cpp
In file included from /run/build/onetbb/test/common/test.h:32,
                 from /run/build/onetbb/test/tbb/test_task_group.cpp:17:
/run/build/onetbb/test/common/doctest.h: In instantiation of ‘doctest::detail::Expression_lhs<L>::operator doctest::detail::Result() [with L = const char (&)[58]]’:
/run/build/onetbb/test/tbb/test_task_group.cpp:103:17:   required from ‘void SharedGroupBodyImpl<task_group_type>::Wait() [with task_group_type = tbb::detail::d1::task_group]’
/run/build/onetbb/test/tbb/test_task_group.cpp:138:13:   required from ‘void SharedGroupBodyImpl<task_group_type>::Run(uintptr_t) [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]’
/run/build/onetbb/test/tbb/test_task_group.cpp:188:43:   required from ‘void SharedGroupBody<task_group_type>::operator()(uintptr_t) const [with task_group_type = tbb::detail::d1::task_group; uintptr_t = long unsigned int]’
/run/build/onetbb/test/common/utils.h:75:17:   required from ‘void utils::NativeParallelFor(Index, const Body&) [with Index = unsigned int; Body = SharedGroupBody<tbb::detail::d1::task_group>]’
/run/build/onetbb/test/tbb/test_task_group.cpp:220:22:   required from ‘void TestParallelSpawn() [with task_group_type = tbb::detail::d1::task_group]’
/run/build/onetbb/test/tbb/test_task_group.cpp:247:47:   required from ‘void TestThreadSafety() [with task_group_type = tbb::detail::d1::task_group]’
/run/build/onetbb/test/tbb/test_task_group.cpp:770:42:   required from here
/run/build/onetbb/test/common/doctest.h:1560:42: error: the compiler can assume that the address of ‘doctest::detail::Expression_lhs<const char (&)[58]>::lhs’ will never be NULL [-Werror=address]
 1560 |             bool res = static_cast<bool>(lhs);
      |                                          ^~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors
[40/326] Building CXX object src/tbb/CMakeFiles/tbb.dir/task.cpp.o
[41/326] Linking C shared library gnu_12.2_cxx11_64_relwithdebinfo/libtbbmalloc.so.2.10
[42/326] Building CXX object test/CMakeFiles/test_blocked_range.dir/tbb/test_blocked_range.cpp.o
[43/326] Building CXX object test/CMakeFiles/test_partitioner.dir/tbb/test_partitioner.cpp.o
[44/326] Building CXX object test/CMakeFiles/test_dynamic_link.dir/tbb/test_dynamic_link.cpp.o
[45/326] Building CXX object test/CMakeFiles/test_tick_count.dir/tbb/test_tick_count.cpp.o
[46/326] Building CXX object test/CMakeFiles/test_arena_priorities.dir/tbb/test_arena_priorities.cpp.o
[47/326] Building CXX object test/CMakeFiles/test_parallel_invoke.dir/tbb/test_parallel_invoke.cpp.o
[48/326] Building CXX object test/CMakeFiles/test_concurrent_lru_cache.dir/tbb/test_concurrent_lru_cache.cpp.o
[49/326] Building CXX object test/CMakeFiles/test_resumable_tasks.dir/tbb/test_resumable_tasks.cpp.o
[50/326] Building CXX object test/CMakeFiles/test_collaborative_call_once.dir/tbb/test_collaborative_call_once.cpp.o
[51/326] Building CXX object test/CMakeFiles/test_concurrent_queue.dir/tbb/test_concurrent_queue.cpp.o
[52/326] Building CXX object test/CMakeFiles/test_concurrent_queue_whitebox.dir/tbb/test_concurrent_queue_whitebox.cpp.o
[53/326] Building CXX object test/CMakeFiles/test_environment_whitebox.dir/tbb/test_environment_whitebox.cpp.o
[54/326] Building CXX object test/CMakeFiles/test_broadcast_node.dir/tbb/test_broadcast_node.cpp.o
[55/326] Building CXX object test/CMakeFiles/test_parallel_for.dir/tbb/test_parallel_for.cpp.o
[56/326] Building CXX object test/CMakeFiles/test_semaphore.dir/tbb/test_semaphore.cpp.o
[57/326] Building CXX object test/CMakeFiles/test_mutex.dir/tbb/test_mutex.cpp.o
[58/326] Building CXX object test/CMakeFiles/test_hw_concurrency.dir/tbb/test_hw_concurrency.cpp.o
[59/326] Building CXX object test/CMakeFiles/test_concurrent_priority_queue.dir/tbb/test_concurrent_priority_queue.cpp.o
[60/326] Building CXX object test/CMakeFiles/test_parallel_scan.dir/tbb/test_parallel_scan.cpp.o
[61/326] Building CXX object test/CMakeFiles/test_allocators.dir/tbb/test_allocators.cpp.o
[62/326] Building CXX object test/CMakeFiles/test_sequencer_node.dir/tbb/test_sequencer_node.cpp.o
[63/326] Building CXX object test/CMakeFiles/test_buffer_node.dir/tbb/test_buffer_node.cpp.o
[64/326] Building CXX object test/CMakeFiles/test_input_node.dir/tbb/test_input_node.cpp.o
[65/326] Building CXX object test/CMakeFiles/test_tagged_msg.dir/tbb/test_tagged_msg.cpp.o
[66/326] Building CXX object test/CMakeFiles/test_intrusive_list.dir/tbb/test_intrusive_list.cpp.o
[67/326] Building CXX object test/CMakeFiles/test_parallel_reduce.dir/tbb/test_parallel_reduce.cpp.o
[68/326] Building CXX object test/CMakeFiles/test_composite_node.dir/tbb/test_composite_node.cpp.o
[69/326] Building CXX object test/CMakeFiles/test_overwrite_node.dir/tbb/test_overwrite_node.cpp.o
[70/326] Building CXX object test/CMakeFiles/test_continue_node.dir/tbb/test_continue_node.cpp.o
[71/326] Building CXX object test/CMakeFiles/test_parallel_sort.dir/tbb/test_parallel_sort.cpp.o
[72/326] Building CXX object test/CMakeFiles/test_profiling.dir/tbb/test_profiling.cpp.o
[73/326] Building CXX object test/CMakeFiles/test_enumerable_thread_specific.dir/tbb/test_enumerable_thread_specific.cpp.o
[74/326] Building CXX object test/CMakeFiles/test_flow_graph.dir/tbb/test_flow_graph.cpp.o
[75/326] Building CXX object test/CMakeFiles/test_write_once_node.dir/tbb/test_write_once_node.cpp.o
[76/326] Building CXX object test/CMakeFiles/test_flow_graph_priorities.dir/tbb/test_flow_graph_priorities.cpp.o
[77/326] Building CXX object test/CMakeFiles/test_parallel_for_each.dir/tbb/test_parallel_for_each.cpp.o
[78/326] Building CXX object test/CMakeFiles/test_task_arena.dir/tbb/test_task_arena.cpp.o
[79/326] Building CXX object test/CMakeFiles/test_limiter_node.dir/tbb/test_limiter_node.cpp.o
[80/326] Building CXX object test/CMakeFiles/test_priority_queue_node.dir/tbb/test_priority_queue_node.cpp.o
[81/326] Building CXX object test/CMakeFiles/test_queue_node.dir/tbb/test_queue_node.cpp.o
[82/326] Building CXX object test/CMakeFiles/test_function_node.dir/tbb/test_function_node.cpp.o
[83/326] Building CXX object test/CMakeFiles/test_concurrent_vector.dir/tbb/test_concurrent_vector.cpp.o
[84/326] Building CXX object test/CMakeFiles/test_eh_algorithms.dir/tbb/test_eh_algorithms.cpp.o
[85/326] Building CXX object test/CMakeFiles/test_multifunction_node.dir/tbb/test_multifunction_node.cpp.o
[86/326] Building CXX object test/CMakeFiles/test_async_node.dir/tbb/test_async_node.cpp.o
[87/326] Building CXX object test/CMakeFiles/test_join_node_preview.dir/tbb/test_join_node_preview.cpp.o
[88/326] Building CXX object test/CMakeFiles/test_flow_graph_whitebox.dir/tbb/test_flow_graph_whitebox.cpp.o
[89/326] Building CXX object test/CMakeFiles/test_split_node.dir/tbb/test_split_node.cpp.o
[90/326] Building CXX object test/CMakeFiles/test_indexer_node.dir/tbb/test_indexer_node.cpp.o
[91/326] Building CXX object test/CMakeFiles/test_join_node_key_matching.dir/tbb/test_join_node_key_matching.cpp.o
[92/326] Building CXX object test/CMakeFiles/test_join_node_msg_key_matching.dir/tbb/test_join_node_msg_key_matching.cpp.o
[93/326] Building CXX object test/CMakeFiles/test_parallel_pipeline.dir/tbb/test_parallel_pipeline.cpp.o
[94/326] Building CXX object test/CMakeFiles/test_concurrent_hash_map.dir/tbb/test_concurrent_hash_map.cpp.o
[95/326] Building CXX object test/CMakeFiles/test_concurrent_set.dir/tbb/test_concurrent_set.cpp.o
[96/326] Building CXX object test/CMakeFiles/test_concurrent_map.dir/tbb/test_concurrent_map.cpp.o
[97/326] Building CXX object test/CMakeFiles/test_join_node_key_matching_n_args.dir/tbb/test_join_node_key_matching_n_args.cpp.o
[98/326] Building CXX object test/CMakeFiles/test_join_node_msg_key_matching_n_args.dir/tbb/test_join_node_msg_key_matching_n_args.cpp.o
[99/326] Building CXX object test/CMakeFiles/test_concurrent_unordered_set.dir/tbb/test_concurrent_unordered_set.cpp.o
[100/326] Building CXX object test/CMakeFiles/test_concurrent_unordered_map.dir/tbb/test_concurrent_unordered_map.cpp.o
[101/326] Building CXX object test/CMakeFiles/test_join_node.dir/tbb/test_join_node.cpp.o
[102/326] Building CXX object test/CMakeFiles/test_eh_flow_graph.dir/tbb/test_eh_flow_graph.cpp.o
ninja: build stopped: subcommand failed.

Alexander-Wilms avatar Aug 19 '23 16:08 Alexander-Wilms

This appears to have been resolved with https://github.com/oneapi-src/oneTBB/commit/1ddebef8ac703ded4d5330f9d2135dfadbc992be. Can any others confirm?

cinerea0 avatar Sep 16 '23 01:09 cinerea0

I can build https://github.com/oneapi-src/oneTBB/commit/1ddebef8ac703ded4d5330f9d2135dfadbc992be using gcc 12.2.0 on x86_64, but aarch64 still fails:

[51/330] Building CXX object test/CMakeFiles/test_concurrent_monitor.dir/tbb/test_concurrent_monitor.cpp.o
FAILED: test/CMakeFiles/test_concurrent_monitor.dir/tbb/test_concurrent_monitor.cpp.o 
/usr/bin/c++  -I/run/build/onetbb/test/.. -I/run/build/onetbb/test -I/run/build/onetbb/src/tbb/../../include -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -fasynchronous-unwind-tables -fstack-clash-protection -fno-omit-frame-pointer -O2 -g -DNDEBUG -std=c++11 -Wall -Wextra -Werror -Wfatal-errors -Wshadow -Wcast-qual -Woverloaded-virtual -Wnon-virtual-dtor -fstack-clash-protection -fno-strict-overflow -fno-delete-null-pointer-checks -fwrapv -Wformat -Wformat-security -Werror=format-security -fstack-protector-strong -D_FORTIFY_SOURCE=2 -MD -MT test/CMakeFiles/test_concurrent_monitor.dir/tbb/test_concurrent_monitor.cpp.o -MF test/CMakeFiles/test_concurrent_monitor.dir/tbb/test_concurrent_monitor.cpp.o.d -o test/CMakeFiles/test_concurrent_monitor.dir/tbb/test_concurrent_monitor.cpp.o -c /run/build/onetbb/test/tbb/test_concurrent_monitor.cpp
In file included from /usr/include/c++/12.2.0/atomic:41,
                 from /run/build/onetbb/test/common/doctest.h:3223,
                 from /run/build/onetbb/test/common/test.h:32,
                 from /run/build/onetbb/test/tbb/test_concurrent_monitor.cpp:26:
In member function ‘void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]’,
    inlined from ‘void std::atomic<bool>::store(bool, std::memory_order)’ at /usr/include/c++/12.2.0/atomic:104:20,
    inlined from ‘void tbb::detail::r1::concurrent_monitor_base<Context>::notify_one_relaxed() [with Context = long unsigned int]’ at /run/build/onetbb/test/tbb/../../src/tbb/concurrent_monitor.h:293:53,
    inlined from ‘void tbb::detail::r1::concurrent_monitor_base<Context>::notify_one() [with Context = long unsigned int]’ at /run/build/onetbb/test/tbb/../../src/tbb/concurrent_monitor.h:276:27,
    inlined from ‘void DOCTEST_ANON_FUNC_41()’ at /run/build/onetbb/test/tbb/test_concurrent_monitor.cpp:87:44:
/usr/include/c++/12.2.0/bits/atomic_base.h:464:25: error: ‘void __atomic_store_1(volatile void*, unsigned char, int)’ writing 1 byte into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  464 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.
cc1plus: all warnings being treated as errors

Cf. https://buildbot.flathub.org/#/builders/6/builds/66282 for both build logs aarch64.log x86_64.log

Alexander-Wilms avatar Sep 16 '23 02:09 Alexander-Wilms

This should have been resolved with e131071. Can you confirm?

dnmokhov avatar Sep 16 '23 04:09 dnmokhov

Thanks, https://github.com/oneapi-src/oneTBB/commit/e131071769ee3df51b56b053ba6bfa06ae9eff25 builds fine on aarch64 and x86_64.

Alexander-Wilms avatar Sep 16 '23 10:09 Alexander-Wilms

I tested head a9d76a1721d2194bbbb9ecede34c601b217ca9de and it is successful. Using 2021.10.0 with just e131071769ee3df51b56b053ba6bfa06ae9eff25 still errors.

heitbaum avatar Sep 16 '23 12:09 heitbaum

You need both 1ddebef (as mentioned above) and e131071.

dnmokhov avatar Sep 18 '23 14:09 dnmokhov

Also, v2021.11.0-rc1 already includes 1ddebef.

dnmokhov avatar Sep 18 '23 15:09 dnmokhov

When using 2021.10.0 with both https://github.com/oneapi-src/oneTBB/commit/1ddebef8ac703ded4d5330f9d2135dfadbc992be and https://github.com/oneapi-src/oneTBB/commit/e131071769ee3df51b56b053ba6bfa06ae9eff25 as well as using 2021.11-rc1 with just the latter I get a build that goes further along, but still fails:

[ 48%] Built target test_tagged_msg
[ 48%] Built target test_semaphore
[ 48%] Building CXX object test/CMakeFiles/conformance_task_arena.dir/conformance/conformance_task_arena.cpp.o
[ 48%] Building CXX object test/CMakeFiles/conformance_collaborative_call_once.dir/conformance/conformance_collaborative_call_once.cpp.o
[ 49%] Linking CXX executable ../gnu_12.2_cxx11_64_release/test_sequencer_node
In file included from /nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/atomic:41,
                 from /build/source/test/common/doctest.h:3223,
                 from /build/source/test/common/test.h:32,
                 from /build/source/test/tbb/test_concurrent_monitor.cpp:26:
In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
    inlined from 'void std::atomic<bool>::store(bool, std::memory_order)' at /nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/atomic:104:20,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::abort_all_relaxed() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:440:53:
/nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:464:25: error: 'void __atomic_store_1(volatile void*, unsigned char, int)' writing 1 byte into a region of size 0 overflows the destination [8;;https://gcc.gnu.org/onlinedocs/gcc/Warni
ng-Options.html#index-Wstringop-overflow=-Werror=stringop-overflow=8;;]
  464 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
[ 49%] Built target test_task_arena
[ 50%] Building CXX object test/CMakeFiles/conformance_concurrent_lru_cache.dir/conformance/conformance_concurrent_lru_cache.cpp.o
[ 50%] Built target test_sequencer_node
[ 51%] Building CXX object test/CMakeFiles/conformance_concurrent_unordered_map.dir/conformance/conformance_concurrent_unordered_map.cpp.o
In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
    inlined from 'void std::atomic<bool>::store(bool, std::memory_order)' at /nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/atomic:104:20,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::notify_all_relaxed() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:333:53,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::notify_all() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:315:27,
    inlined from 'void DOCTEST_ANON_FUNC_41()' at /build/source/test/tbb/test_concurrent_monitor.cpp:92:44:
/nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:464:25: error: 'void __atomic_store_1(volatile void*, unsigned char, int)' writing 1 byte into a region of size 0 overflows the destination [8;;https://gcc.gnu.org/onlinedocs/gcc/Warni
ng-Options.html#index-Wstringop-overflow=-Werror=stringop-overflow=8;;]
  464 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
    inlined from 'void std::atomic<bool>::store(bool, std::memory_order)' at /nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/atomic:104:20,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::abort_all_relaxed() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:440:53,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::abort_all() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:423:26,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::destroy() [with Context = long unsigned int]' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:456:24,
    inlined from 'tbb::detail::r1::concurrent_monitor::~concurrent_monitor()' at /build/source/test/tbb/../../src/tbb/concurrent_monitor.h:487:16,
    inlined from 'void DOCTEST_ANON_FUNC_41()' at /build/source/test/tbb/test_concurrent_monitor.cpp:100:1:
/nix/store/jaac4nfl2h3654ibvmrkfpa4c4vr2f9p-gcc-12.2.0/include/c++/12.2.0/bits/atomic_base.h:464:25: error: 'void __atomic_store_1(volatile void*, unsigned char, int)' writing 1 byte into a region of size 0 overflows the destination [8;;https://gcc.gnu.org/onlinedocs/gcc/Warni
ng-Options.html#index-Wstringop-overflow=-Werror=stringop-overflow=8;;]
  464 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~

I've now resorted to removing -Werror and -Wfatal-errors from the GNU.cmake file.

mbpdt avatar Sep 20 '23 16:09 mbpdt

@mbpdt, could you please let me know which version of GCC are were using above?

dnmokhov avatar Sep 20 '23 16:09 dnmokhov

I was hoping it was clear from include dir, but this is gcc 12.2.0, from nix. This is default compiler for the 23.05 release of nixpkgs, which I'm only mentioning for completeness. (https://github.com/NixOS/nixpkgs/releases/tag/23.05)

mbpdt avatar Sep 20 '23 17:09 mbpdt

I'm getting a very similar error with gcc13.2, tbb 2021.11.0.

[  2%] Building CXX object src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.o
In file included from /usr/local/gcc-13.2.0/include/c++/13.2.0/atomic:41,
                 from /tbb/src/tbb/../../include/oneapi/tbb/detail/_utils.h:22,
                 from /tbb/src/tbb/address_waiter.cpp:17:
In member function 'void std::__atomic_base<_IntTp>::store(__int_type, std::memory_order) [with _ITp = bool]',
    inlined from 'void std::atomic<bool>::store(bool, std::memory_order)' at /usr/local/gcc-13.2.0/include/c++/13.2.0/atomic:104:20,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::abort_all_relaxed() [with Context = tbb::detail::r1::address_context]' at /tbb/src/tbb/concurrent_monitor.h:430:53,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::abort_all() [with Context = tbb::detail::r1::address_context]' at /tbb/src/tbb/concurrent_monitor.h:413:26,
    inlined from 'void tbb::detail::r1::concurrent_monitor_base<Context>::destroy() [with Context = tbb::detail::r1::address_context]' at /tbb/src/tbb/concurrent_monitor.h:446:24,
    inlined from 'void tbb::detail::r1::clear_address_waiter_table()' at /tbb/src/tbb/address_waiter.cpp:60:40:
/usr/local/gcc-13.2.0/include/c++/13.2.0/bits/atomic_base.h:481:25: error: 'void __atomic_store_1(volatile void*, unsigned char, int)' writing 1 byte into a region of size 0 overflows the destination [-Werror=stringop-overflow=]
  481 |         __atomic_store_n(&_M_i, __i, int(__m));
      |         ~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~
compilation terminated due to -Wfatal-errors.

Should I create a separate issue for this?

In the mean time, I've added -DTBB_STRICT=OFF to my cmake flags. This builds, but I haven't tested if it runs OK.

VirtualTim avatar Feb 13 '24 07:02 VirtualTim

@heitbaum is this issue still relevant?

nofuturre avatar Jul 11 '24 13:07 nofuturre

If anyone encounter this issue in the future please open new issue with a link to this one

nofuturre avatar Jul 23 '24 07:07 nofuturre