Uploaded image for project: 'ROOT'
  1. ROOT
  2. ROOT-10816

-Werror=class-memaccess with GCC10.1 and builtin TBB

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: master
    • Fix Version/s: None
    • Component/s: Build System
    • Labels:
      None
    • Environment:

      Linux 4.19.125-1-MANJARO

      GCC 10.1

      Description

      I get the following error while building with GCC 10.1 and builtin TBB:

       
      $ ninja -j4
       
      [4/1963] Building CXX object core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o
      FAILED: core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o
       
       
      /usr/bin/c++ -I/home/vincenzo/Programs/rootproject/root/core/imt/inc -Iginclude -I/home/vincenzo/Programs/rootproject/root/core/thread/inc -I/home/vincenzo/Programs/rootproject/root/core/base/inc -I/home/vincenzo/Programs/rootproject/root/core/foundation/inc -I/home/vincenzo/Programs/rootproject/root/core/cont/inc -I/home/vincenzo/Programs/rootproject/root/core/gui/inc -I/home/vincenzo/Programs/rootproject/root/core/meta/inc -I/home/vincenzo/Programs/rootproject/root/core/clib/inc -I/home/vincenzo/Programs/rootproject/root/core/rint/inc -I/home/vincenzo/Programs/rootproject/root/core/zip/inc -I/home/vincenzo/Programs/rootproject/root/core/textinput/inc -I/home/vincenzo/Programs/rootproject/root/core/unix/inc -fdiagnostics-color=always -std=c++11 -Wno-implicit-fallthrough -Wno-noexcept-type -Werror -gsplit-dwarf -pipe -Wshadow -Wall -W -Woverloaded-virtual -fsigned-char -pthread -g -fPIC -DTBB_SUPPRESS_DEPRECATED_MESSAGES=1 -std=c++11 -MD -MT core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o -MF core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o.d -o core/imt/CMakeFiles/Imt.dir/src/TThreadExecutor.cxx.o -c /home/vincenzo/Programs/rootproject/root/core/imt/src/TThreadExecutor.cxx
       
      In file included from ginclude/tbb/tbb.h:48,
       from /home/vincenzo/Programs/rootproject/root/core/imt/src/TThreadExecutor.cxx:11:
      ginclude/tbb/concurrent_hash_map.h: In constructor ‘tbb::interface5::internal::hash_map_base::hash_map_base()’:
      ginclude/tbb/concurrent_hash_map.h:131:76: error: ‘void* memset(void*, int, size_t)’ clearing an object of type ‘struct tbb::interface5::internal::hash_map_base::bucket’ with no trivial copy-assignment; use value-initialization instead [-Werror=class-memaccess]
       131 | std::memset(my_embedded_segment, 0, sizeof(my_embedded_segment));
       | ^
      ginclude/tbb/concurrent_hash_map.h:93:16: note: ‘struct tbb::interface5::internal::hash_map_base::bucket’ declared here
       93 | struct bucket : tbb::internal::no_copy {
       | ^~~~~~
      
      

      Build command is `cmake -GNinja -Ddev=ON -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_STANDARD=11 ../root`

       

      The error is the same discussed here https://github.com/oneapi-src/oneTBB/issues/134 and it should be fixed upstream. In fact, I have succesfully built ROOT with my system TBB (2020.2)

        Attachments

          Activity

            People

            Assignee:
            axel Axel Naumann
            Reporter:
            vpadulan Vincenzo Eduardo Padulano
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: