DevelopmentalImagingMCRI / MCRIBS

Surface version of the M-CRIB atlases.
12 stars 6 forks source link

Allow building with latest TBB #10

Open mgxd opened 1 year ago

mgxd commented 1 year ago

I am working on Docker-izing the MIRTK build (see https://github.com/nipreps-containers/mirtk/blob/main/Dockerfile), and want to include your changes to the recon-neonatal-cortex command. I was able to build from the official repo, but am having trouble building the copy included in MCRIBS.

Error ``` cmake \ -D CMAKE_INSTALL_PREFIX=/opt/mirtk \ -D CMAKE_BUILD_TYPE=Release \ -D BUILD_SHARED_LIBS=ON \ -D MODULE_Deformable=ON \ -D MODULE_DrawEM=ON \ -D MODULE_Mapping=ON \ -D MODULE_Scripting=ON \ -D WITH_ARPACK=ON \ -D WITH_FLANN=OFF \ -D WITH_MATLAB=OFF \ -D WITH_NiftiCLib=ON \ -D WITH_PNG=ON \ -D WITH_PROFILING=ON \ -D WITH_TBB=ON \ -D WITH_UMFPACK=ON \ -D WITH_ITK=ON \ -D WITH_VTK=ON \ -D WITH_ZLIB=ON \ /tmp/MIRTK -- Not using ccache for compilation of C++ code (WITH_CCACHE=OFF) -- The C compiler identification is GNU 11.3.0 -- The CXX compiler identification is GNU 11.3.0 -- Detecting C compiler ABI info -- Detecting C compiler ABI info - done -- Check for working C compiler: /usr/bin/cc - skipped -- Detecting C compile features -- Detecting C compile features - done -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- MIRTK b2023.02.02 (21:25 UTC) -- Found Perl: /usr/bin/perl (found version "5.34.0") Enabled module PointSet, needed by [Deformable;Mapping]. -- Enabled modules [Common;Numerics;Image;IO;Transformation;PointSet;Deformable;Registration;Mapping;DrawEM;Scripting]. -- Configuring module ThirdParty/LBFGS... -- Configuring module ThirdParty/LBFGS... - done -- Configuring module Common... -- Looking for VTK [vtkCommonCore;vtkCommonDataModel] (optional)... -- Looking for VTK [vtkCommonCore;vtkCommonDataModel] (optional)... - found v9.2.2 -- Looking for TBB [tbb] (optional)... -- Looking for TBB [tbb] (optional)... - not found CMake Error at CMake/Basis/CommonTools.cmake:840 (message): Module Common was requested to be build with TBB. Please ensure that the package is installed in a standard system location or set DEPENDS_TBB_DIR to the installation prefix (i.e., root directory of the installation). To disable features which require this optional dependency, set the WITH_TBB option to OFF and try again. The DEPENDS_TBB_DIR variable can alternatively be set to the directory containing a TBBConfig.cmake or tbb-config.cmake file. If no such file exists, contact either the developer of this project or CMake BASIS to provide a FindTBB.cmake file. Call Stack (most recent call first): CMake/Basis/ProjectTools.cmake:2188 (basis_find_package) CMake/Basis/ProjectTools.cmake:2475 (basis_find_packages) CMake/Modules/mirtkProjectBegin.cmake:90 (basis_project_begin) CMake/Modules/mirtkConfigureModule.cmake:41 (mirtk_project_begin) Modules/Common/CMakeLists.txt:20 (mirtk_configure_module) ```

Applying this upstream commit seems to get by it: https://github.com/BioMedIA/MIRTK/pull/779/commits/ae00c8e358bc67ad25178361ee2ae1fe13330ccc

chrisadamsonmcri commented 4 months ago

Thanks for this.

I will put it in into my version of MIRTK.