Caffe: Cmake can't find boost

Created on 31 Oct 2016  路  11Comments  路  Source: BVLC/caffe

I try to build the setup using this command:

cmake -G%CMAKE_GENERATOR% -DBLAS=Open -DCMAKE_BUILD_TYPE=%CMAKE_CONFIGURATION% -DBUILD_SHARED_LIBS=OFF -DCMAKE_INSTALL_PREFIX=C:\Users\Mustafa\Source\Repos\caffe\build -DCUDNNROOT=C:\cudnn -C C:\Users\Mustafa\Source\Repos\caffe\libraries\caffe-builder-config.cmake ..\

I keep getting:

Unable to find the requested Boost libraries.

Boost version: 1.61.0

Boost include path:
C:/Users/Mustafa/Source/Repos/caffe/libraries/include/boost-1_61

Could not find the following static Boost libraries:

      boost_system
      boost_thread
      boost_filesystem

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:68 (include)

Most helpful comment

I didn't know that I could add this flag --msvc_version v140. I only had a problem with OpenVC. I downloaded OpenVC libraries built by VS2015.. I will try a free start and run the prebuild dependencies for 2015

All 11 comments

@mustafaahmedhussien Can you confirm that you have all the required libs in C:\Users\Mustafa\Source\Repos\caffe\libraries\lib. You should look for boost.lib and boost.dll.

Also please post your CMakeCache.txt.

@willyd Yes I can confirm that.

You have Boost_USE_STATIC_LIBS:BOOL=ON try with Boost_USE_STATIC_LIBS:BOOL=OFF. Either edit the cache with a text editor or use cmake-gui.

CMakeCache.txt

I did but still it fails.

Can you post the output of the above CMake command?

(C:\Miniconda2) C:\Users\Mustafa\Source\Repos\caffe\build>cmake -G%CMAKE_GENERATOR% -DBLAS=Open -DCMAKE_BUILD_TYPE=%CMAKE_CONFIGURATION% -DBUILD_SHARED_LIBS=off -DCMAKE_INSTALL_PREFIX=C:\Users\Mustafa\Source\Repos\caffe\build -DCUDNNROOT=C:\cudnn -C C:\Users\Mustafa\Source\Repos\caffe\libraries\caffe-builder-config.cmake ..\
loading initial cache file C:\Users\Mustafa\Source\Repos\caffe\libraries\caffe-builder-config.cmake
CMake Error at C:/Miniconda2/Library/share/cmake-3.6/Modules/FindBoost.cmake:1753 (message):
Unable to find the requested Boost libraries.

Boost version: 1.61.0

Boost include path:
C:/Users/Mustafa/Source/Repos/caffe/libraries/include/boost-1_61

Could not find the following Boost libraries:

      boost_thread
      boost_filesystem

Some (but not all) of the required Boost libraries were found. You may
need to install these additional Boost libraries. Alternatively, set
BOOST_LIBRARYDIR to the directory containing Boost libraries or BOOST_ROOT
to the location of Boost.
Call Stack (most recent call first):
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:68 (include)

-- Found gflags (include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include, library: gflags_shared)
-- Found glog (include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include, library: glog)
-- Found PROTOBUF Compiler: C:/Users/Mustafa/Source/Repos/caffe/libraries/bin/protoc.exe
-- Found lmdb (include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include, library: lmdb)
-- Found LevelDB (include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include, library: leveldb)
-- Found Snappy (include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include, library: snappy_static;optimized;C:/Users/Mustafa/Source/Repos/caffe/libraries/lib/caffezlib.lib;debug;C:/Users/Mustafa/Source/Repos/caffe/libraries/lib/caffezlibd.lib)
-- CUDA detected: 8.0
-- Found cuDNN: ver. 5.1.5 found (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v8.0/lib/x64/cudnn.lib)
-- Added CUDA NVCC flags for: sm_30
-- OpenCV found (C:/Users/Mustafa/Source/Repos/caffe/libraries)
-- Found OpenBLAS libraries: C:/Users/Mustafa/Source/Repos/caffe/libraries/lib/libopenblas.dll.a
-- Found OpenBLAS include: C:/Users/Mustafa/Source/Repos/caffe/libraries/include
-- NumPy ver. 1.11.2 found (include: C:/Miniconda2/lib/site-packages/numpy/core/include)
-- Could NOT find Boost

-- Python interface is disabled or not all required dependencies found. Building without it...

-- ****** Caffe Configuration Summary ******
-- General:
-- Version : 1.0.0-rc3
-- Git : rc3-272-g6491504-dirty
-- System : Windows
-- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
-- Release CXX flags : /FS /FS
-- Debug CXX flags : /FS /FS

-- Build type : Release

-- BUILD_SHARED_LIBS : off
-- BUILD_python : ON
-- BUILD_matlab :
-- BUILD_docs :
-- CPU_ONLY : OFF
-- USE_OPENCV : ON
-- USE_LEVELDB : ON
-- USE_LMDB : ON

-- ALLOW_LMDB_NOLOCK : OFF

-- Dependencies:
-- BLAS : Yes (Open)
-- Boost : Yes (ver. 1.61)
-- glog : Yes
-- gflags : Yes
-- protobuf : Yes (ver. 3.1.0)
-- lmdb : Yes (ver. 0.9.70)
-- LevelDB : Yes (ver. 1.18)
-- Snappy : Yes (ver. 1.1.1)
-- OpenCV : Yes (ver. 3.1.0)

-- CUDA : Yes (ver. 8.0)

-- NVIDIA CUDA:
-- Target GPU(s) : Auto
-- GPU arch(s) : sm_30

-- cuDNN : Yes (ver. 5.1.5)

-- Install:

-- Install path : C:/Users/Mustafa/Source/Repos/caffe/build

-- Configuring incomplete, errors occurred!
See also "C:/Users/Mustafa/Source/Repos/caffe/build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Mustafa/Source/Repos/caffe/build/CMakeFiles/CMakeError.log".

Looks like you are using VS 2015? How did you obtain the dependencies? Did you build them yourself? Did you download the right prebuilt dependencies for VS 2015, by passing the --msvc_version v140 to the download script?

I didn't know that I could add this flag --msvc_version v140. I only had a problem with OpenVC. I downloaded OpenVC libraries built by VS2015.. I will try a free start and run the prebuild dependencies for 2015

Yeah sorry about that. I merged the changes for VS 2015 but did not update the REAME. Let me know.

it worked. thanks

Was this page helpful?
0 / 5 - 0 ratings

Related issues

inferrna picture inferrna  路  3Comments

sdemyanov picture sdemyanov  路  3Comments

iamhankai picture iamhankai  路  3Comments

dfotland picture dfotland  路  3Comments

malreddysid picture malreddysid  路  3Comments