oneTBB icon indicating copy to clipboard operation
oneTBB copied to clipboard

Add option to build TBB statically

Open jdumas opened this issue 4 years ago • 26 comments

Hi all,

I appreciate the new CMake integration, it makes building TBB via add_subdirectory much more streamlined. I would like to build TBB into my app as a static library, in order to avoid having to move dll around on Windows. However, the new CMake hardcode the tbb lib to be a SHARED library: https://github.com/oneapi-src/oneTBB/blob/51c0b2f742920535178560f31c6e91065bf87b41/src/tbb/CMakeLists.txt#L15

It would be better to not put any keyword here, and let the user decide whether they want to build TBB as a shared/static library (CMake will graciously switch based on the value of the flag BUILD_SHARED_LIBS).

I know that it is not recommended to build TBB as a static library, due to possible duplicated scheduler. However, if I am building all my dependencies from source into the same app, then I should be able to build TBB as a static library. The hassle of moving dll around on Windows is simply not worth it.

jdumas avatar Oct 21 '20 19:10 jdumas

@jdumas, please try the source code from master branch, you should be able to build static libraries with BUILD_SHARED_LIBS=OFF.

AlexVeprev avatar Dec 24 '20 13:12 AlexVeprev

Hello,

The static build indeed works with BUILD_SHARED_LIBS=OFF, however when attempting to link the resulting library on Linux, linking fails with undefined reference to dlopen and such, coming from dynamic_link.cpp, which means it wants to be linked against dl (and maybe also rt?).

Our goal is to produce fully static standalone executables, so we cannot do this. I know that this is not recommended setup, but it is important for us to be able to redistribute our software to end users.

I am pretty sure we are not using any of this dynamic linking magic, because it was working with the old, Makefile-based v2020.3 and no dl somehow.

Any chance we can make it also work with v2021? For example, maybe the dynamic stuff can be disabled with a conditional macro?

Right now I am building the code tagged v2021.2.0-rc.

Linker log
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(dynamic_link.cpp.o): in function `tbb::detail::r1::init_dl_data()':
dynamic_link.cpp:(.text+0x27): undefined reference to `dladdr'
/usr/bin/ld: dynamic_link.cpp:(.text+0x149): undefined reference to `dlerror'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(dynamic_link.cpp.o): in function `tbb::detail::r1::dynamic_unlink_all()':
dynamic_link.cpp:(.text+0x252): undefined reference to `dlclose'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(dynamic_link.cpp.o): in function `tbb::detail::r1::dynamic_load(char const*, tbb::detail::r1::dynamic_link_descriptor const*, unsigned long)':
dynamic_link.cpp:(.text+0x34e): undefined reference to `dlopen'
/usr/bin/ld: dynamic_link.cpp:(.text+0x398): undefined reference to `dlsym'
/usr/bin/ld: dynamic_link.cpp:(.text+0x3a8): undefined reference to `dlclose'
/usr/bin/ld: dynamic_link.cpp:(.text+0x3e1): undefined reference to `dlerror'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(dynamic_link.cpp.o): in function `tbb::detail::r1::dynamic_link(char const*, tbb::detail::r1::dynamic_link_descriptor const*, unsigned long, void**, int)':
dynamic_link.cpp:(.text+0x503): undefined reference to `dlopen'
/usr/bin/ld: dynamic_link.cpp:(.text+0x55c): undefined reference to `dlsym'
/usr/bin/ld: dynamic_link.cpp:(.text+0x569): undefined reference to `dlclose'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(dynamic_link.cpp.o): in function `tbb::detail::r1::dynamic_unlink(void*)':
dynamic_link.cpp:(.text+0x20a): undefined reference to `dlclose'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(itt_notify.cpp.o): in function `__itt_fini_ittlib':
itt_notify.cpp:(.text+0x59b6): undefined reference to `dlsym'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(itt_notify.cpp.o): in function `__itt_init_ittlib':
itt_notify.cpp:(.text+0x60d3): undefined reference to `dlopen'
/usr/bin/ld: itt_notify.cpp:(.text+0x60df): undefined reference to `dlsym'
/usr/bin/ld: itt_notify.cpp:(.text+0x60ed): undefined reference to `dlclose'
/usr/bin/ld: itt_notify.cpp:(.text+0x620a): undefined reference to `dlopen'
/usr/bin/ld: itt_notify.cpp:(.text+0x6228): undefined reference to `dlsym'
/usr/bin/ld: itt_notify.cpp:(.text+0x6240): undefined reference to `dlsym'
/usr/bin/ld: itt_notify.cpp:(.text+0x6294): undefined reference to `dlerror'
/usr/bin/ld: itt_notify.cpp:(.text+0x62ba): undefined reference to `dlsym'
/usr/bin/ld: itt_notify.cpp:(.text+0x6317): undefined reference to `dlsym'
/usr/bin/ld: .conan/data/tbb/2021.2.0-rc/local/stable/package/b911f48570f9bb2902d9e83b2b9ebf9d376c8c56/lib/libtbb.a(itt_notify.cpp.o): in function `tbb::detail::r1::__TBB_load_ittnotify()':
itt_notify.cpp:(.text+0x6497): undefined reference to `dlopen'
collect2: error: ld returned 1 exit status

ivan-aksamentov avatar Feb 03 '21 19:02 ivan-aksamentov

You can try to use an internal macro to disable dynamic_link: __TBB_DYNAMIC_LOAD_ENABLED. You can add -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 to check if it works or not. Even if it works, it is not tested and might be changed in incompatible way in the future.

alexey-katranov avatar Feb 04 '21 06:02 alexey-katranov

Thanks @alexey-katranov ! The __TBB_DYNAMIC_LOAD_ENABLED worked!

ivan-aksamentov avatar Feb 04 '21 19:02 ivan-aksamentov

@jdumas , @ivan-aksamentov , is the issue resolved?

alexey-katranov avatar Feb 10 '21 07:02 alexey-katranov

@alexey-katranov I'd say no. But we have a decent workaround. The suggested macro worked for my particular case (we use a really simple parallel pipeline) on Linux and macOS.

I was not able to try it on Windows yet (our software uses some features VC++ does not support, and TBB's v2021 MinGW support seems to be broken, so we can't even build for Windows).

I had to modify TBB build to include the macro (I used a custom conanfile to do that). It would be nice to have a single CMake switch to enable everything needed to produce a static lib (maybe other parts of the lib require more than this macro?). Might also need some more testing by maintainers. I'd call that resolved then.

But it really depends on whether maintainers plan to support this feature officially.

ivan-aksamentov avatar Feb 10 '21 20:02 ivan-aksamentov

Hello, I want use c++17 parallel algorithm, like std::sort (with and header) using gcc (or clang) under Linux. This run well with gcc >=9 and dynamic tbb

Only one module will use tbb and I don't want ask user install new library, so I want use static link

I tried

export CXX=g++-11.1 ; export CC=gcc-11.1 ; export AR=gcc-ar-11.1 ; export RANLIB=gcc-ranlib-11.1 ; export CXXFLAGS=" -std=c++17 -std=c++17 " ;
cmake . -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DBUILD_SHARED_LIBS=OFF

I have these error

CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbb".
Call Stack (most recent call first):
  src/tbb/CMakeLists.txt:114 (tbb_install_target)


CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbbmalloc".
Call Stack (most recent call first):
  src/tbbmalloc/CMakeLists.txt:94 (tbb_install_target)


CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbbmalloc_proxy".
Call Stack (most recent call first):
  src/tbbmalloc_proxy/CMakeLists.txt:85 (tbb_install_target)

and make

gvollant@ametddev01:~/tsttbb/oneTBB-2021.3.0$ cd ..
gvollant@ametddev01:~/tsttbb$ make
make: *** No targets specified and no makefile found.  Stop.
gvollant@ametddev01:~/tsttbb$

gvollant avatar Jul 02 '21 08:07 gvollant

@gvollant what CMake version do you use? Have you tried oneTBB from master branch? BTW, consider -DCMAKE_CXX_STANDARD=17 to pass C++ standard.

AlexVeprev avatar Jul 02 '21 09:07 AlexVeprev

thank you for helping me.

I'm using standard debian 10 cmake : version 3.13.4

The -DCMAKE_CXX_STANDARD=17 is a good idea for future step , when I'll be able to compile :-)

gvollant avatar Jul 02 '21 09:07 gvollant

With master, I've


gvollant@ametddev01:~/tsttbb/oneTBB$ cmake . -DCMAKE_CXX_FLAGS=-D__TzzzBB_DYNAMIC_LOAD_ENABLED=0 -DBUILD_SHARED_LIBS=OFF -DMAKE_HWLOC_tbbbind_2_4_LIBRARY_PATH=. -DCMAKE_CXX_STANDARD=17
-- The CXX compiler identification is GNU 11.1.0
-- Check for working CXX compiler: /usr/local/gcc-11.1.0/bin/g++-11.1
-- Check for working CXX compiler: /usr/local/gcc-11.1.0/bin/g++-11.1 -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Warning at CMakeLists.txt:110 (message):
  You are building oneTBB as a static library.  This is highly discouraged
  and such configuration is not supported.  Consider building a dynamic
  library to avoid unforeseen issues.


-- CMAKE_BUILD_TYPE is not specified. Using default: RelWithDebInfo
-- Looking for C++ include pthread.h
-- Looking for C++ include pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Check if compiler accepts -pthread
-- Check if compiler accepts -pthread - yes
-- Found Threads: TRUE
-- Checking for one of the modules 'hwloc'
CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbb".
Call Stack (most recent call first):
  src/tbb/CMakeLists.txt:117 (tbb_install_target)


-- The C compiler identification is GNU 11.1.0
-- Check for working C compiler: /usr/local/gcc-11.1.0/bin/gcc-11.1
-- Check for working C compiler: /usr/local/gcc-11.1.0/bin/gcc-11.1 -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbbmalloc".
Call Stack (most recent call first):
  src/tbbmalloc/CMakeLists.txt:102 (tbb_install_target)


CMake Error at cmake/utils.cmake:39 (install):
  install TARGETS given no ARCHIVE DESTINATION for static library target
  "tbbmalloc_proxy".
Call Stack (most recent call first):
  src/tbbmalloc_proxy/CMakeLists.txt:85 (tbb_install_target)


-- 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 incomplete, errors occurred!
See also "/home/gvollant/tsttbb/oneTBB/CMakeFiles/CMakeOutput.log".
See also "/home/gvollant/tsttbb/oneTBB/CMakeFiles/CMakeError.log".

gvollant avatar Jul 02 '21 09:07 gvollant

Despite the fact that it fails here: https://github.com/oneapi-src/oneTBB/blob/734f0bc0be3f76f45984cb9adf2f93cab603fe94/cmake/utils.cmake#L39 this fail should be prevented by this section https://github.com/oneapi-src/oneTBB/blob/734f0bc0be3f76f45984cb9adf2f93cab603fe94/cmake/utils.cmake#L35

And I was not able to reproduce it on Fedora 34 and Ubuntu 20.04. I will continue investigation.

AlexVeprev avatar Jul 02 '21 21:07 AlexVeprev

wiith ubuntu 20.04

gillesvollant@gv-w81x64:/mnt/f/trytbb$ git clone https://github.com/oneapi-src/oneTBB.git
Cloning into 'oneTBB'...
remote: Enumerating objects: 20434, done.
remote: Counting objects: 100% (1745/1745), done.
remote: Compressing objects: 100% (500/500), done.
remote: Total 20434 (delta 1500), reused 1266 (delta 1243), pack-reused 18689
Receiving objects: 100% (20434/20434), 42.18 MiB | 14.73 MiB/s, done.
Resolving deltas: 100% (15456/15456), done.
Updating files: 100% (928/928), done.
gillesvollant@gv-w81x64:/mnt/f/trytbb$ cd oneTBB/
gillesvollant@gv-w81x64:/mnt/f/trytbb/oneTBB$ mkdir build
gillesvollant@gv-w81x64:/mnt/f/trytbb/oneTBB$ cd build/
gillesvollant@gv-w81x64:/mnt/f/trytbb/oneTBB/build$ ls
gillesvollant@gv-w81x64:/mnt/f/trytbb/oneTBB/build$ cmake .. -DCMAKE_CXX_FLAGS=-D__TBB_DYNAMIC_LOAD_ENABLED=0 -DBUILD_SHARED_LIBS=OFF

cmake just say

-- 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

and make fail

mnt/f/trytbb/oneTBB/test/tbbmalloc/test_malloc_lib_unload.cpp: In member function ‘void Run::operator()(std::size_t) const’:
/mnt/f/trytbb/oneTBB/test/tbbmalloc/test_malloc_lib_unload.cpp:143:16: error: ‘LIBRARY_HANDLE’ is not a member of ‘utils’
  143 |         utils::LIBRARY_HANDLE lib = utils::OpenLibrary(actual_name = MALLOCLIB_NAME1);
      |                ^~~~~~~~~~~~~

gvollant avatar Jul 03 '21 05:07 gvollant

-- 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

these messages are ok unless you want to build tbbbind targets.

@alexey-katranov, @isaevil could you please comment on test_malloc_lib_unload.cpp:143:16: error?

AlexVeprev avatar Jul 05 '21 18:07 AlexVeprev

@gvollant, you may want to add -DTBB_TEST=OFF to skip tests build, in this case you should be able to build without errors on Ubuntu 20.04

AlexVeprev avatar Jul 05 '21 18:07 AlexVeprev

thank you, compile is done under ubuntu. What is the problem with debian 10 ? cmake is too old?

gvollant avatar Jul 08 '21 21:07 gvollant

Hmm, yes, looks like it depends on CMake version. I was able to reproduce the same failure on Ubuntu 18.04 with CMake 3.10.2. I'm investigating possible solution.

AlexVeprev avatar Jul 12 '21 15:07 AlexVeprev

I think the failure is related to the following change introduced in CMake 3.14:

The install(TARGETS) command learned how to install to an appropriate default directory for a given target type, based on variables from the GNUInstallDirs module and built-in defaults, in lieu of a DESTINATION argument.

Note that in the following code:

macro(tbb_install_target target)
    install(TARGETS ${target}
        EXPORT TBBTargets
        LIBRARY
            DESTINATION ${CMAKE_INSTALL_LIBDIR}
            NAMELINK_SKIP
            COMPONENT runtime
        RUNTIME
            DESTINATION ${CMAKE_INSTALL_BINDIR}
            COMPONENT runtime
        ARCHIVE
            DESTINATION ${CMAKE_INSTALL_LIBDIR}
            COMPONENT devel)

    install(TARGETS ${target}
        LIBRARY
            DESTINATION ${CMAKE_INSTALL_LIBDIR}
            NAMELINK_ONLY
            COMPONENT devel)
endmacro()

The devel and runtime components can be installed separately. I think CMake is complaining that if you try to install the runtime component it doesn't know where to put the ARCHIVE for tbb, tbbmalloc, etc. After CMake 3.14 it should default to a default path.

jdumas avatar Jul 12 '21 15:07 jdumas

@jdumas, thank you for the idea!

Removal of COMPONENT param doesn't help, while removal of the second install(TARGETS ...) helps. I assume that each install(TARGETS ...) call is validated separately, so even if I set ARCHIVE in the first install(TARGETS ...) it still fails in the second. I don't remember why it is split into two calls, probably NAMELINK_ONLY and NAMELINK_SKIP can't be used in one install(TARGETS ...)... I need to recheck.

AlexVeprev avatar Jul 12 '21 15:07 AlexVeprev

I would try to add another line to specify the ARCHIVE DESTINATION with the COMPONENT runtime in your case, rather than removing the second line altogether.

jdumas avatar Jul 12 '21 16:07 jdumas

I don't think the problem in COMPONENT:

this doesn't resolve the error (changed component in the first install):

diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index ec7346f..5757981 100644
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -34,7 +34,7 @@ macro(tbb_install_target target)
             COMPONENT runtime
         ARCHIVE
             DESTINATION ${CMAKE_INSTALL_LIBDIR}
-            COMPONENT devel)
+            COMPONENT runtime)

     install(TARGETS ${target}
         LIBRARY

while this resolves (added archive to the second install, even with devel component):

diff --git a/cmake/utils.cmake b/cmake/utils.cmake
index ec7346f..6e4f953 100644
--- a/cmake/utils.cmake
+++ b/cmake/utils.cmake
@@ -40,5 +40,8 @@ macro(tbb_install_target target)
         LIBRARY
             DESTINATION ${CMAKE_INSTALL_LIBDIR}
             NAMELINK_ONLY
+            COMPONENT devel
+        ARCHIVE
+            DESTINATION qwer
             COMPONENT devel)
 endmacro()

That's why I assume that CMake checks ARCHIVE parameter for each install(TARGETS ...) call in case of static libraries.

AlexVeprev avatar Jul 12 '21 16:07 AlexVeprev

Seems I got it. From https://cmake.org/cmake/help/latest/command/install.html:

A target may be installed more than once to different locations

So, it is expected that CMake validates the second call of install independently on the first call. And in new versions it works because of change that @jdumas mentioned. Older versions of CMake will require patching of oneTBB cmake/utils.cmake in case of static build.

@isaevil, you may want to take a look.

AlexVeprev avatar Jul 12 '21 16:07 AlexVeprev

@AlexVeprev Thanl you a lot, your patch solved my problem with Cmake 3.13 (Debian 10)

I suggest you consider creating a pull request to integrate this patch

gvollant avatar Jul 19 '21 05:07 gvollant

The patch above is rather workaround, I'd consider another solution, we'll work on it with @isaevil.

AlexVeprev avatar Jul 19 '21 09:07 AlexVeprev

For some reason, linking OneTBB statically in Release mode doesn't work with GCC 9.3.1 on CentOS 7. It works in Debug mode, but fails in Release with the following message:

[2022-02-18T00:31:56.105Z] [1/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o
[2022-02-18T00:31:56.433Z] [2/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.o
[2022-02-18T00:31:56.433Z] [3/38] Building CXX object tmp/CMakeFiles/foo.dir/foo.cpp.o
[2022-02-18T00:31:57.139Z] [4/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/arena_slot.cpp.o
[2022-02-18T00:31:57.139Z] [5/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/concurrent_bounded_queue.cpp.o
[2022-02-18T00:31:57.467Z] [6/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/arena.cpp.o
[2022-02-18T00:31:57.796Z] [7/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/dynamic_link.cpp.o
[2022-02-18T00:31:57.796Z] [8/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/exception.cpp.o
[2022-02-18T00:31:58.123Z] [9/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/itt_notify.cpp.o
[2022-02-18T00:31:58.451Z] [10/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/governor.cpp.o
[2022-02-18T00:31:58.784Z] [11/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/global_control.cpp.o
[2022-02-18T00:31:59.112Z] [12/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/main.cpp.o
[2022-02-18T00:31:59.443Z] [13/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/market.cpp.o
[2022-02-18T00:31:59.443Z] [14/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/misc.cpp.o
[2022-02-18T00:31:59.772Z] [15/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/misc_ex.cpp.o
[2022-02-18T00:32:00.102Z] [16/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/observer_proxy.cpp.o
[2022-02-18T00:32:00.429Z] [17/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/private_server.cpp.o
[2022-02-18T00:32:00.429Z] [18/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/parallel_pipeline.cpp.o
[2022-02-18T00:32:00.429Z] [19/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rml_tbb.cpp.o
[2022-02-18T00:32:00.760Z] [20/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/profiling.cpp.o
[2022-02-18T00:32:01.086Z] [21/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rtm_mutex.cpp.o
[2022-02-18T00:32:01.415Z] [22/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rtm_rw_mutex.cpp.o
[2022-02-18T00:32:01.415Z] [23/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/semaphore.cpp.o
[2022-02-18T00:32:01.415Z] [24/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/version.cpp.o
[2022-02-18T00:32:02.268Z] [25/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task.cpp.o
[2022-02-18T00:32:02.268Z] [26/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/small_object_pool.cpp.o
[2022-02-18T00:32:02.595Z] [27/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task_dispatcher.cpp.o
[2022-02-18T00:32:02.926Z] [28/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/queuing_rw_mutex.cpp.o
[2022-02-18T00:32:03.252Z] [29/38] Building CXX object _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task_group_context.cpp.o
[2022-02-18T00:32:03.252Z] [30/38] Linking CXX static library gnu_9.3_cxx11_64_release/libtbb.a
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/address_waiter.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/allocator.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/arena.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/arena_slot.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/concurrent_bounded_queue.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/dynamic_link.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/exception.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/governor.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/global_control.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/itt_notify.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/main.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/market.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/misc.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/misc_ex.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/observer_proxy.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/parallel_pipeline.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/private_server.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/profiling.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rml_tbb.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rtm_mutex.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/rtm_rw_mutex.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/semaphore.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/small_object_pool.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task_dispatcher.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/task_group_context.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/version.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbb/CMakeFiles/tbb.dir/queuing_rw_mutex.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(address_waiter.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(allocator.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(arena.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(arena_slot.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(concurrent_bounded_queue.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(dynamic_link.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(exception.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(governor.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(global_control.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(itt_notify.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(main.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.252Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(market.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(misc.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(misc_ex.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(observer_proxy.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(parallel_pipeline.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(private_server.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(profiling.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(rml_tbb.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(rtm_mutex.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(rtm_rw_mutex.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(semaphore.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(small_object_pool.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(task.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(task_dispatcher.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(task_group_context.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(version.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbb.a(queuing_rw_mutex.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:03.253Z] [31/38] Linking CXX executable tmp/foo
[2022-02-18T00:32:03.253Z] FAILED: tmp/foo 
[2022-02-18T00:32:03.253Z] : && /opt/rh/devtoolset-9/root/usr/bin/c++ -O3 -DNDEBUG  tmp/CMakeFiles/foo.dir/foo.cpp.o -o tmp/foo  gnu_9.3_cxx11_64_release/libtbb.a  -pthread  -ldl && :
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: tmp/CMakeFiles/foo.dir/foo.cpp.o: in function `tbb::detail::d1::start_for<tbb::detail::d1::blocked_range<unsigned long>, tbb::detail::d1::parallel_for_body_wrapper<main::{lambda(unsigned long)#1}, unsigned long>, tbb::detail::d1::auto_partitioner const>::cancel(tbb::detail::d1::execution_data&)':
[2022-02-18T00:32:03.253Z] foo.cpp:(.text+0x55): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x7c): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x9d): undefined reference to `tbb::detail::r1::notify_waiters(unsigned long)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: tmp/CMakeFiles/foo.dir/foo.cpp.o: in function `tbb::detail::d1::start_for<tbb::detail::d1::blocked_range<unsigned long>, tbb::detail::d1::parallel_for_body_wrapper<main::{lambda(unsigned long)#1}, unsigned long>, tbb::detail::d1::auto_partitioner const>::execute(tbb::detail::d1::execution_data&)':
[2022-02-18T00:32:03.253Z] foo.cpp:(.text+0x142): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x1ea): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x21a): undefined reference to `tbb::detail::r1::spawn(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x299): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x2c0): undefined reference to `tbb::detail::r1::deallocate(tbb::detail::d1::small_object_pool&, void*, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x4ad): undefined reference to `tbb::detail::r1::is_group_execution_cancelled(tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x4ec): undefined reference to `tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x4fd): undefined reference to `tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x518): undefined reference to `tbb::detail::r1::execution_slot(tbb::detail::d1::execution_data const*)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x571): undefined reference to `tbb::detail::r1::notify_waiters(unsigned long)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x5ac): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x64f): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long, tbb::detail::d1::execution_data const&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text+0x67e): undefined reference to `tbb::detail::r1::spawn(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: tmp/CMakeFiles/foo.dir/foo.cpp.o: in function `main.cold':
[2022-02-18T00:32:03.253Z] foo.cpp:(.text.unlikely+0x6): undefined reference to `tbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: tmp/CMakeFiles/foo.dir/foo.cpp.o: in function `main':
[2022-02-18T00:32:03.253Z] foo.cpp:(.text.startup+0xa9): undefined reference to `tbb::detail::r1::initialize(tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text.startup+0xc1): undefined reference to `tbb::detail::r1::allocate(tbb::detail::d1::small_object_pool*&, unsigned long)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text.startup+0x115): undefined reference to `tbb::detail::r1::max_concurrency(tbb::detail::d1::task_arena_base const*)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text.startup+0x184): undefined reference to `tbb::detail::r1::execute_and_wait(tbb::detail::d1::task&, tbb::detail::d1::task_group_context&, tbb::detail::d1::wait_context&, tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] /opt/rh/devtoolset-9/root/usr/libexec/gcc/x86_64-redhat-linux/9/ld: foo.cpp:(.text.startup+0x18e): undefined reference to `tbb::detail::r1::destroy(tbb::detail::d1::task_group_context&)'
[2022-02-18T00:32:03.253Z] collect2: error: ld returned 1 exit status
[2022-02-18T00:32:03.582Z] [32/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.o
[2022-02-18T00:32:03.582Z] [33/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.o
[2022-02-18T00:32:03.911Z] [34/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.o
[2022-02-18T00:32:04.238Z] [35/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.o
[2022-02-18T00:32:04.238Z] [36/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.o
[2022-02-18T00:32:04.238Z] [37/38] Building CXX object _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.o
[2022-02-18T00:32:04.238Z] [38/38] Linking C static library gnu_9.3_cxx11_64_release/libtbbmalloc.a
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backend.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/backref.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/frontend.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/large_objects.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/tbbmalloc.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ar: _deps/tbb-build/src/tbbmalloc/CMakeFiles/tbbmalloc.dir/__/tbb/itt_notify.cpp.o: plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(backend.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(backref.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(frontend.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(large_objects.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(tbbmalloc.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] /opt/rh/devtoolset-9/root/usr/bin/ranlib: gnu_9.3_cxx11_64_release/libtbbmalloc.a(itt_notify.cpp.o): plugin needed to handle lto object
[2022-02-18T00:32:04.239Z] ninja: build stopped: cannot make progress due to previous errors.
script returned exit code 1

This is tested on a simple project:

#include <tbb/parallel_for.h>

#include <vector>
#include <numeric>
#include <iostream>

int foo() {
    std::vector<int> x(10);
    std::iota(x.begin(), x.end(), 0);
    std::atomic_int sum(0);
    tbb::parallel_for(size_t(0), x.size(), [&](size_t i) {
        sum += x[i];
    });
    std::cout << sum << std::endl;
    return 0;
}

Strangely enough, the problem doesn't appear with GCC 10.2.1 on CentOS 7.

jdumas avatar Feb 18 '22 00:02 jdumas

There are multiple messages like plugin needed to handle lto object, have you tried to disable lto (TBB_ENABLE_IPO=OFF)?

alexey-katranov avatar Feb 18 '22 06:02 alexey-katranov

Indeed, if I update to v2021.6.0-rc1, with the proper CMake check for IPO support, the problem goes away.

jdumas avatar Feb 18 '22 16:02 jdumas

@jdumas is this issue still relevant? Could you please respond or close issue if it is not?

isaevil avatar Oct 05 '22 14:10 isaevil

Hmm yeah since v2021.6.0-rc1 (and now v2021.6.0) I think we're good. Let me close the issue then.

jdumas avatar Oct 05 '22 16:10 jdumas