Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could NOT find Boost (missing: system thread filesystem) (found suitable version "1.70.0", minimum required is "1.54") #6802

Open
movie3105 opened this issue Jul 18, 2019 · 18 comments

Comments

@movie3105
Copy link

CMake Error at C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find Boost (missing: system thread filesystem) (found suitable
version "1.70.0", minimum required is "1.54")
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.15/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files/CMake/share/cmake-3.15/Modules/FindBoost.cmake:2142 (find_package_handle_standard_args)
cmake/Dependencies.cmake:8 (find_package)
CMakeLists.txt:80 (include)

-- Configuring incomplete, errors occurred!
See also "E:/Program/caffe/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed

can someone tell me how to solve this error ?

@firebrain7
Copy link

have you solved it now?
I met it too.

@seanquijote
Copy link

I also have this issue with version 1.71.0.

@josthoma
Copy link

Same issue here with 1.71.0

@juliuskittler
Copy link

Same issue with 1.71.0 when trying to install lightGBM for GPU:

Found OpenCL: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/lib/x64/OpenCL.lib (found version "1.2")
OpenCL include directory: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.2/include
CMake Error at C:/Program Files (x86)/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:146 (message):
Could NOT find Boost (missing: filesystem system) (found suitable version
"1.71.0", minimum required is "1.56.0")
Call Stack (most recent call first):
C:/Program Files (x86)/CMake/share/cmake-3.16/Modules/FindPackageHandleStandardArgs.cmake:393 (_FPHSA_FAILURE_MESSAGE)
C:/Program Files (x86)/CMake/share/cmake-3.16/Modules/FindBoost.cmake:2165 (find_package_handle_standard_args)
CMakeLists.txt:100 (find_package)

@juliuskittler
Copy link

This helped: https://stackoverflow.com/questions/57870032/cmake-v3-15-3-cannot-find-boost-v1-71-0

I had to specify my path C:\boost\boost_1_71_0 as boost directory.

@npav5057
Copy link

npav5057 commented Mar 5, 2020

Where to Specify??

@ghost
Copy link

ghost commented Apr 15, 2020

Same issue here with 1.72.0

@zavodnyrichard
Copy link

I'm having the same issue with 1.72.0, and I tried everything, but it still doesn't work.

@cupofjava2
Copy link

cupofjava2 commented May 3, 2020

I have my Windows to locate the Boost with CMake by adding below in the Windows Environment Variables:

Variable name: Boost_INCLUDE_DIR
Variable value: \libs\headers
eg. C:\local\boost_1_73_0\libs\headers

Variable name: BOOST_ROOT
Variable value:
eg. C:\local\boost_1_73_0

Open a new Command prompt and install the lightgbm (gpu mode) again.

@Necktschnagge
Copy link

Necktschnagge commented Nov 2, 2020

Today I had the same problem and I just added

set(Boost_USE_STATIC_LIBS ON)

to my CMakeLists.txt which solved the issue for me. Perhaps this is necessary to tell CMake since regex is one of the few Boost components which is not header-only. Therefore you need to link against something which is not required in case of header-only libraries.

Also, in my opinion it is bad to specify host dependent paths, like @juliuskittler told in his solution. This blows up manually tackled set up phases.

EDIT: Equivalent to my suggestion is passing an argument like here: https://stackoverflow.com/a/57875055/6346852

@niva-xx-zz
Copy link

Today Same problem with CMake 3.20 Boost 1.75.0 under windows 10 and got this error:

Selecting Windows SDK version 10.0.19041.0 to target Windows 10.0.19042.
CMake Error at C:/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find Boost (missing: chrono system) (found version "1.75.0")
Call Stack (most recent call first):
  C:/CMake/share/cmake-3.20/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  C:/CMake/share/cmake-3.20/Modules/FindBoost.cmake:2344 (find_package_handle_standard_args)
  CMakeLists.txt:88 (FIND_PACKAGE)

Have tried these kind of things but same error.
BOOST_DIR
Boost_INCLUDE_DIRS - Boost include directories
Boost_LIBRARY_DIRS - Link directories for Boost libraries

set(Boost_USE_STATIC_LIBS ON) in CMakeLists.txt

@JustBeLeo
Copy link

I met the same problem in 1.72.0

@ntd252
Copy link

ntd252 commented May 14, 2021

Hi everyone. I ran into this problem. Openning the CMakeCache.txt gave me this line

//The directory containing a CMake configuration file for Boost.
Boost_DIR:PATH=Boost_DIR-NOTFOUND

You guys should check this line. From the line, we can see the Cmake can't fine the cmake configuration of boost, which should be some where called "boost_dir".

I follow this tutorial because I don't have Visual Studio to build the libraries. You can build yourself with gcc https://gist.github.com/sim642/29caef3cc8afaa273ce6
After that, I have a "cmake" folder inside the lib folder after building.

I set the environment variable: BOOST_DIR with value "C:\development\boost\lib\cmake" . Remember "lib" is the folder of built libraries.
I hope this helps.

@tothedistance
Copy link

for those who install boost using vcpkg, dont forget to add the toolchain. while the error seems to find the boost, it's file structure is totally different, thus producing confusing results making you think you need to add use_static=on. just add vcpkg.cmake toolchain. add vcpkg to path is not enough.

@winkee01
Copy link

Hi, I am using macOS 12.3
Even if I set set(Boost_USE_STATIC_LIBS ON) in CMakeLists.txt
The errors are still there :

-- The C compiler identification is AppleClang 13.1.6.13160021
-- The CXX compiler identification is AppleClang 13.1.6.13160021
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/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: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:120 (find_package):
  Found package configuration file:

    /usr/local/lib/cmake/boost_filesystem-1.72.0/boost_filesystem-config.cmake

  but it set boost_filesystem_FOUND to FALSE so package "boost_filesystem" is
  considered to be NOT FOUND.  Reason given by package:

  No suitable build variant has been found.

  The following variants have been tried and rejected:

  * libboost_filesystem-clang-darwin100-mt-d-x64-1_72.dylib (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

  * libboost_filesystem-clang-darwin100-mt-d-x64-1_72.a (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

  * libboost_filesystem-clang-darwin100-mt-s-x64-1_72.a (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

  * libboost_filesystem-clang-darwin100-mt-sd-x64-1_72.a (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

  * libboost_filesystem-clang-darwin100-mt-x64-1_72.dylib (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

  * libboost_filesystem-clang-darwin100-mt-x64-1_72.a (clang-darwin100,
  detected clang-darwin131, set Boost_COMPILER to override)

Call Stack (most recent call first):
  /usr/local/lib/cmake/Boost-1.72.0/BoostConfig.cmake:185 (boost_find_component)
  /usr/local/Cellar/cmake/3.21.4/share/cmake/Modules/FindBoost.cmake:594 (find_package)
  CMakeLists.txt:8 (find_package)

@lovie123
Copy link

lovie123 commented Mar 31, 2022 via email

@winkee01
Copy link

and finally, I have to use -DBoost_NO_BOOST_CMAKE=ON

@xiaolin1990
Copy link

xiaolin1990 commented Mar 31, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests