scipopt / papilo

Parallel Presolve for Integer and Linear Optimization
GNU Lesser General Public License v3.0
64 stars 17 forks source link

Compilation issue with CMake: Could NOT find TBB (missing: TBB_DIR) #65

Closed avinashresearch1 closed 3 weeks ago

avinashresearch1 commented 2 months ago

I'm looking to compile scipoptsuite-9.1.0.tgz from scratch with CMake following the instructions here.

Even though I had an updated version of TBB installed on my system. I got a missing TBB_DIR error. I believe the file >papilo>cmake>modules>FindTBB.cmake may need to be updated to avoid making reference to TBB_DIR.

I was able to solve this problem by replacing it with: https://github.com/Kitware/VTK/blob/master/CMake/FindTBB.cmake (and adding the include(FindPackageHandleStandardArgs) at the top)

cmake .. -DCMAKE_INSTALL_PREFIX=<install_dir> -DAUTOBUILD=on
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.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
CMake Warning at CMakeLists.txt:45 (message):
  You are using the automatic build option to find and use dependencies
  automatically.  The following flags are ignored: IPOPT, ZLIB, GMP, PAPILO,
  ZIMPL, READLINE, WORHP.

-- Found BISON: /usr/bin/bison (found suitable version "3.8.2", minimum required is "2.4.0") 
-- Found FLEX: /usr/bin/flex (found version "2.6.4") 
-- Found GMP: /usr/include/x86_64-linux-gnu  
-- Build type: Release
-- Found ZLIB: /usr/lib/x86_64-linux-gnu/libz.so (found version "1.2.11") 
-- Could NOT find TBB (missing: TBB_DIR)
-- Found TBB: TBB::tbb;TBB::tbbmalloc (found suitable version "2021.5", minimum required is "2018") found components:  tbb tbbmalloc 
-- Could NOT find TBB (missing: TBB_DIR)
CMake Error at soplex/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find TBB (missing: TBB_IMPORTED_TARGETS tbb tbbmalloc) (found
  suitable version "2021.5", minimum required is "2018")
Call Stack (most recent call first):
  soplex/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  papilo/cmake/Modules/FindTBB.cmake:158 (find_package_handle_standard_args)
  CMakeLists.txt:97 (find_package)

-- Configuring incomplete, errors occurred!
alexhoen commented 1 month ago

thanks for reporting, we will look into it but before integrating it we must assure that the build of the SCIPOptSuite does not break.

alexhoen commented 1 month ago

we merged it to the develop branch: https://github.com/scipopt/papilo/commit/be5763abcf29102df980e5c6fbdd165a14b12177

Could you please verify that this fixes the issue for you?