ROOT 6.12.06 - TBB Fails to Compile

Dear experts:
I have the same problem as in the post:
“ROOT 6.10.8 - TBB Fails to Compile”
I’ve tried the command:
cmake -D builtin_tbb=ON -D roofit=ON -D minuit2=ON -D gsl_shared=ON …/
and then
cmake --build . --target TBB
and I get the following error message:

Performing build step for 'TBB'
cd /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB && /Applications/CMake.app/Contents/bin/cmake -P /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake
CMake Error at /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake:16 (message):
  Command failed: 2

   'make' 'compiler=clang' 'CXXFLAGS= -mno-rtm' 'CPLUS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++' 'CONLY=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc'

  See also

    /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log


make[3]: *** [TBB-prefix/src/TBB-stamp/TBB-build] Error 1
make[2]: *** [CMakeFiles/TBB.dir/all] Error 2
make[1]: *** [CMakeFiles/TBB.dir/rule] Error 2
make: *** [TBB] Error 2

Many thanks for your help.

  • Mauro.

ROOT Version: 6.12.06
Platform: MACOS 10.13.4
Compiler: Xcode 9.3.1


Hi,
what does /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log say?

Are you building without an active internet connection? It’s required to build TBB, as we only download it if needed.

Cheers,
Enrico

Hi,
the first lof file says:

iHulk:myBuild dinardo$ more /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-err.log 
make[5]: ../../build/Makefile.tbb: No such file or directory
make[5]: *** No rule to make target `../../build/Makefile.tbb'.  Stop.
make[4]: *** [tbb] Error 2

The second log file says:

iHulk:myBuild dinardo$ more /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-err.log 
make[5]: ../../build/Makefile.tbb: No such file or directory
make[5]: *** No rule to make target `../../build/Makefile.tbb'.  Stop.
make[4]: *** [tbb] Error 2
iHulk:myBuild dinardo$ more /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-out.log 
Created ./build/macos_intel64_clang_cc9.1.0 Found CUDA installation: /usr/local/cuda, version unknown_os10.13.4_release and ..._debug directories
/Applications/Xcode.app/Contents/Developer/usr/bin/make -C "./build/macos_intel64_clang_cc9.1.0 Found CUDA installation: /usr/local/cuda, version unknown_os10.13.4_debug"  -r -f ../../build/Makefile.tbb cfg=debug

The third log file says:

iHulk:myBuild dinardo$ more /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-RelWithDebInfo.cmake 

set(command "make;compiler=clang;CXXFLAGS= -mno-rtm;CPLUS=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++;CONLY=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc")
execute_process(
  COMMAND ${command}
  RESULT_VARIABLE result
  OUTPUT_FILE "/Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-out.log"
  ERROR_FILE "/Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-err.log"
  )
if(result)
  set(msg "Command failed: ${result}\n")
  foreach(arg IN LISTS command)
    set(msg "${msg} '${arg}'")
  endforeach()
  set(msg "${msg}\nSee also\n  /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log")
  message(FATAL_ERROR "${msg}")
else()
  set(msg "TBB build command succeeded.  See also /Users/dinardo/root_v6.12.06/myBuild/TBB-prefix/src/TBB-stamp/TBB-build-*.log")
  message(STATUS "${msg}")
endif()

I am building with an active internet connection.
Do you have further suggestions or things to check?

  • Mauro.

After the failure, apply the following patch in the build directory:

*** TBB-prefix-moved.1/src/TBB/build/macos.inc	2017-03-03 05:34:15.000000000 -0600
--- TBB-prefix/src/TBB/build/macos.inc	2017-10-18 15:16:33.000000000 -0500
*************** ifndef arch
*** 49,55 ****
  endif
  
  ifndef runtime
!   clang_version:=$(shell clang -v 2>&1 >/dev/null | grep version | sed -e "s/.*version \(.*[0-9]\) .*/\1/")
    ifndef os_version
      os_version:=$(shell /usr/bin/sw_vers -productVersion)
    endif
--- 49,55 ----
  endif
  
  ifndef runtime
!   clang_version:=$(shell clang -v 2>&1 >/dev/null | grep 'LLVM version' | sed -e "s/.*version \(.*[0-9]\) .*/\1/")
    ifndef os_version
      os_version:=$(shell /usr/bin/sw_vers -productVersion)
    endif

Cheers,
Philippe.

Dear Philippe,
many thanks.

Forgive me I’m not super expert about this,
what is the patch supposed to do?

How to should I apply the patch?
Shall I copy and paste it somewhere?

Many thanks,

  • Mauro.

When in /Users/dinardo/root_v6.12.06/myBuild, create a file named tbb.patch containing the snippet above and do

patch -p0 < tbb.patch

Cheers,
Philippe.

Dear pacanal,
it worked ! Many thanks.

Just for my curiosity, what was the problem?

Is the patch going to be included in the next release?
Cheers,

  • Mauro.

This is a problem in TBB where they do not detect properly the platform when the CUDA compiler is installed.

@amadio any idea on how to improve the situation?

@pcanal I will look into applying the patch with ExternalProject_Add's PATCH step, like we used to do for Davix.

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