ROOT 6.10.8 - TBB Fails to Compile

Hello all,

I am upgrading our experiment’s software from ROOT 5 to ROOT 6. This has been fairly painless so far, but I’ve come across across a sticking issue I cannot seem to get around. TBB won’t compile correctly. Since multi-threading is one of the main objectives of the update, its important for us to use and install ROOT 6 with TBB. To achieve this, I use the builtin_tbb=ON flag.

The error looks as follows:

[ 73%] Performing build step for 'TBB'                                                                                                                           
CMake Error at $INSTALL_LOCATION/ROOT/Linux-x86_64/root-build/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.c
make:16 (message):
  Command failed: 2

   'make' 'compiler=gcc' 'CXXFLAGS= -mno-rtm' 'CPLUS=/usr/bin/c++' 'CONLY=/usr/bin/cc'

  See also


make[6]: *** [TBB-prefix/src/TBB-stamp/TBB-build] Error 1
make[5]: *** [CMakeFiles/TBB.dir/all] Error 2
make[4]: *** [all] Error 2
make[3]: *** [$INSTALL_LOCATION/ROOT/Linux-x86_64/ROOT.stamp] Error 2
make[2]: *** [ROOT] Error 2
make[1]: *** [common_target] Error 2
make: *** [check_config] Error 2

The error log have one line in them for the build.

$INSTALL_LOCATION/ROOT/Linux-x86_64/root-build/TBB-prefix/src/TBB-stamp/TBB-build-err.log :

build/ *** "first config all" is not supported. Add build/first config or build/first config file.  Stop.

The stdout file, $INSTALL_LOCATION/ROOT/Linux-x86_64/root-build/TBB-prefix/src/TBB-stamp/TBB-build-out.log, is empty.

I first saw this error on my local machine:

  • Ubuntu 17.10
  • gcc/g++ 6.4.0
  • cmake 3.10.0

The work around was to install the TBB libs from a package manager using sudo apt install tbb, and set builtin_tbb=OFF. This worked fine.

I then saw this error again on my institutions remote machines:

  • Centos 7
  • gcc/g++ 4.8.2
  • cmake 3.10.0

I cannot use the same workaround, since I cannot use the package manager on these machines. Since I will be installing this software on more than five different sites, it would be great to utilize the portability of builtin_tbb=ON.

Has anyone else come across this error message? What does it mean? Thank you!!


Could it be the version of TBB? (just trying to guess…)
You can try to change the TBB built_in version in root/cmake/modules/SearchInstalledSoftware.cmake:

  set(tbb_version 2017_U5)

Cheers, Bertrand.

Thanks, that is a good idea. Unfortunately, I tried these two versions as well (from

  • tbb2018_U1.tar.gz
  • tbb44_20160413oss_src.tgz

I get the same error. Is it possible it is the cmake version? I wouldn’t want to have to roll cmake back, but if its a likely culprit, it is worth a shot. Thanks again for your help.

I can also confirm that typing make under $INSTALL_LOCATION/ROOT/Linux-x86_64/root-build/TBB-prefix/src/TBB successfully builds TBB, albeit under the default build location (presumably): $INSTALL_LOCATION/ROOT/Linux-x86_64/root-build/TBB-prefix/src/TBB/build/linux_intel64_gcc_cc4.8.5_libc2.17_kernel3.10.0_release.

Well, everything is possible…

You’re very welcome!

It is most likely a problem with the CMake ExternalProject_Add() call in our cmake/modules/SearchInstalledSoftware.cmake file. I will try to reproduce and fix the problem.

I can confirm I get the same error with cmake 3.5.0.

Thanks for your help.

You’re welcome. In the mean time, would you mind trying ROOT-6.11/02? If the problem is already fixed there, you could just wait for the upcoming 6.12 release or use 6.11, as it is quite stable already.

I’ve tried 6.11/02 and the problem persists. Is there anything else I can try? Perhaps a previous version of ROOT 6 you can recommend for now? The main effort here is switching from ROOT 5 to ROOT 6, so as long as I can build with TBB? Alternatively, I can also disable TBB for now. Would this severely impact multi-thread performance? Which areas would it impact?

Thank you for testing! For now you do not need to do anything else. This is a bug and I’ll fix it for the 6.12 release. I will let you know here once it’s done. Cheers,

Okay, thanks for everything @amadio. I will disable TBB for now, and re-enable it when we update to 6.12.

Hi, I tried but cannot reproduce this. Could you please try running the script below and pasting the full output here? Everywhere I have tested it, it works.


cd /tmp && mkdir root-tbb-test && cd root-tbb-test
git clone
mkdir build && cd build
cmake ../root -Dbuiltin_tbb=ON
cmake --build . --target TBB

Okay, this worked, thanks. It must be something in my setup / build environment then. I am trying similar things in my own ROOT build, i.e. cmake --build . --target TBB. I will update if I find the culprit.

Okay, I think I have a better idea now. We are (still) compiling our experiment’s software with CMT, although this will change in a month or so. When I issue the build command make in the cmt directory, it does a few things, then calls a bash script, which then calls cmake to configure ROOT, then make to build ROOT. In this context, cmake --build . --target TBB breaks.

If I then cd into the build directory and run this command, it works.

All this is to say that my bug seems to be outside the scope of ROOT support, and should vanish once we switch the entire project to build using cmake. Unless you think its worth investigating further, I think we can close this now. Thanks again for all the help.

1 Like

Hi thank you for your testing. If you are satisfied with the answer, just please mark the post above as solution and we can close this. Don’t hesitate to start a new post if you get stuck again. Cheers,

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.