BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.09k stars 18.7k forks source link

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

Open movie3105 opened 5 years ago

movie3105 commented 5 years ago

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 commented 5 years ago

have you solved it now? I met it too.

seanquijote commented 4 years ago

I also have this issue with version 1.71.0.

josthoma commented 4 years ago

Same issue here with 1.71.0

juliuskittler commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

Where to Specify??

ghost commented 4 years ago

Same issue here with 1.72.0

zavodnyrichard commented 4 years ago

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

cupofjava2 commented 4 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

I met the same problem in 1.72.0

ntd252 commented 3 years ago

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 commented 2 years ago

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 commented 2 years ago

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 commented 2 years ago

您好,邮件已收到,谢谢!

winkee01 commented 2 years ago

and finally, I have to use -DBoost_NO_BOOST_CMAKE=ON

xiaolin1990 commented 2 years ago

这是来自QQ邮箱的假期自动回复邮件。 谢谢,您的邮件已收到,尽快给您回复。