BRAINSia/BRAINSTools

BRAINSTools build fails to properly configure TBB

aghayoor opened this issue · 3 comments

Hi Hans @hjmjohnson

When I try to build BRAINSTools, I receive a build failure related to TBB:

[ 90%] Performing configure step for 'BRAINSTools'
Not searching for unused variables given on the command line.
loading initial cache file /Volumes/G-RAID4/Ali/apps/BS/release_20190220/BRAINSTools-prefix/tmp/BRAINSTools-cache-Release.cmake
-- Performing Test C_HAS_WARNING-Wformat=2
-- Performing Test C_HAS_WARNING-Wformat=2 - Success
-- Performing Test CXX_HAS_WARNING-Wformat=2
-- Performing Test CXX_HAS_WARNING-Wformat=2 - Success
-- BRAINSTools_VERSION_MAJOR 5
-- BRAINSTools_VERSION_MINOR 0
-- BRAINSTools_VERSION_PATCH 0
-- BRAINSTools_VERSION_TWEAK 
-- BRAINSTools_VERSION_RC    
-- BRAINSTools_VERSION_HASH  ac4da
-- BRAINSTools_VERSION_POST  116
-- BRAINSTools_VERSION_DEV   
-- Building BRAINSTools version "5.0.0..post116-gac4da"
### CMake Error at /Volumes/G-RAID4/Ali/apps/tbb/tbb2019_20181203oss_mac/tbb2019_20181203oss/cmake/TBBConfig.cmake:62 (add_library):
  add_library cannot create imported target "TBB::tbb" because another target
  with the same name already exists.
Call Stack (most recent call first):
  BRAINSTools.cmake:73 (find_package)
  CMakeLists.txt:104 (include)

It seems building TBB from the external build fails.
Therefore, I downloaded the latest release of TBB, and I used the following command for cmake configuration to pass a release build of TBB:

ccmake ../BRAINSTools -DCMAKE_PREFIX_PATH=/tbb2019_20181203oss

I am trying to build BRAINSTools on macOS 10.13.6.
Please let me know if you need further information or if you have any advice.

Thank you,
Ali

Hans,

@hjmjohnson : I tried to build several older patches back to the last November. All builds were failed because of the same TBB issue I explained earlier. Can you please refer me to a patch with no TBB issue?

Thank you,
Ali

I think this has been fixed recently.