Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.

Not able to use TBB with Cmake

Ravishekhar_Banger_
1,015 Views

Hi,

   I am trying to use TBB through CMAKE. Using CMAKE I am trying to download TBB automatically and set the paths for various compilers. Bt when I try to so the following:

set( ext.TBB_URL "http://threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb41_20121003oss_win.zip" CACHE STRING "URL to download TBB from" )
ExternalProject_Add(
    TBB
    PREFIX ${CMAKE_CURRENT_BINARY_DIR}/external/tbb
    URL ${TBB_URL}
    URL_MD5 1b5024366b1e0434ed734f8b62f627a8
    UPDATE_COMMAND    ""
    BUILD_IN_SOURCE   1
    INSTALL_COMMAND   ""
    CONFIGURE_COMMAND ""
    BUILD_COMMAND     ""
)

The above command shall download TBB and install it in a particular location. Besides this it sets various paths for me. It gives me the following error:

2>------ Build started: Project: TBB, Configuration: Debug x64 ------

2> Building Custom Rule XXXXXXXXXXXXXX/superbuild/CMakeLists.txt

2> CMake does not need to re-run because XXXXXXXXXXXXXXXXX\test\CMakeFiles\generate.stamp is up-to-date.

2> Creating directories for 'TBB'

2> Performing download step (verify and extract) for 'TBB'

2> -- verifying file...

2> file="http://threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb41_20121003oss_win.zip"

2> -- verifying file... done

2> -- extracting...

2> src="http://threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb41_20121003oss_win.zip"

2> dst='XXXXXXXXXX/test/external/tbb/src/TBB'

2> -- extracting... [tar xfz]

2>CUSTOMBUILD : CMake error : Problem with archive_write_header(): Can't remove already-existing dir

2>CUSTOMBUILD : CMake error : Current file:tbb41_20121003oss/

2>CUSTOMBUILD : CMake error : Problem extracting tar: http://threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb41_20121003oss_win.zip

2> -- extracting... [error clean up]

2> CMake Error at TBB-stamp/extract-TBB.cmake:33 (message):

2>CUSTOMBUILD : error : extract of 'http://threadingbuildingblocks.org/sites/default/files/software_releases/windows/tbb41_20121003oss_win.zip' failed

2>

2>

/////////////////////////

This seems to be like a TBB archiving issue to me. Any solution for this. Some important libraries like boost do support zip format of automatic download.

 

0 Kudos
1 Reply
Vladimir_P_1234567890
1,015 Views

Hello,

What does this diagnostics mean? Doesn't cmake say that it can't delete local foder on the disk?
And second question: Are you trying to _untar_ ( [tar xfz]) ZIP-archive? should it work at all? 

--Vladimir

0 Kudos
Reply