So I have just tested the new build_win.cmd vs. one of the older version, and the new one does not seem to download all the required dependencies.
In my case, this results in caffe not being able to build. However, when I use previous build_win.cmd. The new one seems to be missing:
:: Download dependencies from VS x64
echo INFO: Downloading dependencies
"%PYTHON_EXE%" "%~dp0\download_prebuilt_dependencies.py" --msvc_version v%MSVC_VERSION%0
if ERRORLEVEL 1 (
echo ERROR: Downloading dependencies failed
exit /b 1
)
:: Add the dependencies to the PATH
if EXIST "%cd%\libraries\prependpath.bat" (
call "%cd%\libraries\prependpath.bat"
)
@filipendo125 I moved the dependency download in the CMake build. See this file.
In my case, this results in caffe not being able to build
Do you get any kind of error message? Could post the output of your CMake command?
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:77 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:77 (include)
CMake Warning at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:744 (message):
Imported targets not available for Boost version
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:848 (_Boost_COMPONENT_DEPENDENCIES)
C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1435 (_Boost_MISSING_DEPENDENCIES)
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:77 (include)
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message):
Unable to find the requested Boost libraries.
Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost's headers.
Call Stack (most recent call first):
cmake/Dependencies.cmake:5 (find_package)
CMakeLists.txt:77 (include)
-- Could NOT find GFlags (missing: GFLAGS_INCLUDE_DIR GFLAGS_LIBRARY)
-- Could NOT find Glog (missing: GLOG_INCLUDE_DIR GLOG_LIBRARY)
-- Found Protobuf: C:/Users/fkini/Anaconda2/Library/lib/libprotobuf.lib (found version "3.0.0")
-- Found PROTOBUF Compiler: C:/Users/fkini/Anaconda2/Library/bin/protoc.exe
-- Found HDF5: C:/Users/fkini/Anaconda3/Library/lib/hdf5_cpp.lib;C:/Users/fkini/Anaconda3/Library/lib/hdf5.lib (found version "1.8.15.1") found components: HL
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:138 (message):
Could NOT find LMDB (missing: LMDB_INCLUDE_DIR LMDB_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.7/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLMDB.cmake:23 (find_package_handle_standard_args)
cmake/Dependencies.cmake:50 (find_package)
CMakeLists.txt:77 (include)
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
Boost_INCLUDE_DIR (ADVANCED)
used as include directory in directory C:/Users/fkini/Downloads/caffe
used as include directory in directory C:/Users/fkini/Downloads/caffe
used as include directory in directory C:/Users/fkini/Downloads/caffe
used as include directory in directory C:/Users/fkini/Downloads/caffe
-- Configuring incomplete, errors occurred!
See also "C:/Users/fkini/Downloads/caffe/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure `failed`
@willyd I am using the guide that you have in your readme.
The error that I am getting right now is slightly different from the one, I was getting yesterday( yesterday it was saying that OPEN_CV flag has been set to FALSE...), and I don't seem to be able to replicate it.
Can you post the full output? There must be something wrong when CMake tries to download the dependencies. You see something like:
-- Downloading file dependencies
CMake Warning (dev) at cmake/WindowsDownloadPrebuiltDependencies.cmake:54 (file):
Unexpected argument: 1
Call Stack (most recent call first):
CMakeLists.txt:74 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- [download 0% complete]
-- [download 1% complete]
-- [download 2% complete]
...
-- Extracting dependencies
You should also end up with a .tar.bz2 file and folder named libraries in your build folder.
@willyd Sorry, I have been away for couple days. So this is the full log:
INFO: ============================================================
INFO: Summary:
INFO: ============================================================
INFO: MSVC_VERSION = 14
INFO: WITH_NINJA = 1
INFO: CMAKE_GENERATOR = "Ninja"
INFO: CPU_ONLY = 0
INFO: CMAKE_CONFIG = Release
INFO: CMAKE_BUILD_SHARED_LIBS = 0
INFO: PYTHON_VERSION = 2
INFO: BUILD_PYTHON = 1
INFO: BUILD_PYTHON_LAYER = 1
INFO: BUILD_MATLAB = 0
INFO: PYTHON_EXE = "python"
INFO: RUN_TESTS = 0
INFO: RUN_LINT = 0
INFO: RUN_INSTALL = 0
INFO: ============================================================
-- The C compiler identification is GNU 5.3.0
-- The CXX compiler identification is GNU 5.3.0
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/MinGW/bin/c++.exe
-- Check for working CXX compiler: C:/MinGW/bin/c++.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - found
-- Found Threads: TRUE
-- Found GFlags: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include
-- Found gflags (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/gflags.dll)
-- Found Glog: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include
-- Found glog (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/glog.lib)
-- Found Protobuf: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/libprotobuf.lib (found version "3.1.0")
-- Found PROTOBUF Compiler: C:/Users/fkini/Desktop/caffe-windows/build/libraries/bin/protoc.exe
-- Found HDF5: C:/Users/fkini/Anaconda3/Library/lib/hdf5_cpp.lib;C:/Users/fkini/Anaconda3/Library/lib/hdf5.lib (found version "1.8.16") found components: HL
-- Found LMDB: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include
-- Found lmdb (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/lmdb.lib)
-- Found LevelDB: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include
-- Found LevelDB (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/leveldb.lib)
-- Found Snappy: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include
-- Found Snappy (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/snappy.lib)
-- CUDA detected: 8.0
-- Added CUDA NVCC flags for: sm_52
-- OpenCV ARCH: x86
-- OpenCV RUNTIME: mingw
-- OpenCV STATIC: ON
-- Configuring incomplete, errors occurred!
See also "D:/caffe/build/CMakeFiles/CMakeOutput.log".
ERROR: Configure failed
Continuation:
CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message):
Unable to find the requested Boost libraries.
Boost version: 1.61.0
Boost include path:
C:/Users/fkini/Desktop/caffe-windows/build/libraries/include/boost-1_61
Could not find the following 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.
info: ============================================================INFO: Summary:INFO: ============================================================INFO: MSVC_VERSION = 14INFO: WITH_NINJA = 1INFO: CMAKE_GENERATOR = "Ninja"INFO: CPU_ONLY = 0INFO: CMAKE_CONFIG = ReleaseINFO: CMAKE_BUILD_SHARED_LIBS = 0INFO: PYTHON_VERSION = 2INFO: BUILD_PYTHON = 1INFO: BUILD_PYTHON_LAYER = 1INFO: BUILD_MATLAB = 0INFO: PYTHON_EXE = "python"INFO: RUN_TESTS = 0INFO: RUN_LINT = 0INFO: RUN_INSTALL = 0INFO: ============================================================-- The C compiler identification is GNU 5.3.0-- The CXX compiler identification is GNU 5.3.0-- Check for working C compiler: C:/MinGW/bin/gcc.exe-- Check for working C compiler: C:/MinGW/bin/gcc.exe -- works-- Detecting C compiler ABI info-- Detecting C compiler ABI info - done-- Detecting C compile features-- Detecting C compile features - done-- Check for working CXX compiler: C:/MinGW/bin/c++.exe-- Check for working CXX compiler: C:/MinGW/bin/c++.exe -- works-- Detecting CXX compiler ABI info-- Detecting CXX compiler ABI info - done-- Detecting CXX compile features-- Detecting CXX compile features - done-- Looking for pthread.h-- Looking for pthread.h - found-- Looking for pthread_create-- Looking for pthread_create - found-- Found Threads: TRUE -- Found GFlags: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include -- Found gflags (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/gflags.dll)-- Found Glog: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include -- Found glog (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/glog.lib)-- Found Protobuf: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/libprotobuf.lib (found version "3.1.0") -- Found PROTOBUF Compiler: C:/Users/fkini/Desktop/caffe-windows/build/libraries/bin/protoc.exe-- Found HDF5: C:/Users/fkini/Anaconda3/Library/lib/hdf5_cpp.lib;C:/Users/fkini/Anaconda3/Library/lib/hdf5.lib (found version "1.8.16") found components: HL -- Found LMDB: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include -- Found lmdb (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/lmdb.lib)-- Found LevelDB: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include -- Found LevelDB (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/leveldb.lib)-- Found Snappy: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include -- Found Snappy (include: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include, library: C:/Users/fkini/Desktop/caffe-windows/build/libraries/lib/snappy.lib)-- CUDA detected: 8.0-- Added CUDA NVCC flags for: sm_52-- OpenCV ARCH: x86-- OpenCV RUNTIME: mingw-- OpenCV STATIC: ON-- Configuring incomplete, errors occurred!See also "D:/caffe/build/CMakeFiles/CMakeOutput.log".ERROR: Configure failedContinuation:```CMake Error at C:/Program Files/CMake/share/cmake-3.7/Modules/FindBoost.cmake:1793 (message): Unable to find the requested Boost libraries. Boost version: 1.61.0 Boost include path: C:/Users/fkini/Desktop/caffe-windows/build/libraries/include/boost-1_61 Could not find the following 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:77 (include)
CMake Warning at C:/Users/fkini/Desktop/caffe-windows/build/libraries/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.
You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
cmake/Dependencies.cmake:91 (find_package)
CMakeLists.txt:77 (include)
CMake Error at cmake/Dependencies.cmake:91 (find_package):
Found package configuration file:
C:/Users/fkini/Desktop/caffe-windows/build/libraries/OpenCVConfig.cmake
but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be
NOT FOUND.
Call Stack (most recent call first):
CMakeLists.txt:77 (include)
Moreover, Dependencies do not download for me and I am using the guiide in README - I have also just tested it on the latest commit. and still same issue.
Your build is picking up gcc instead of cl.exe as your compiler. You can:
Either of these should fix your problem.
hi all,
i'm also facing issue with cmake (GUI)
after selecting source, destination folder, i hit config button, i get following output( error)
Boost version: 1.61.0
Found the following Boost libraries:
system
thread
filesystem
chrono
date_time
atomic
Found gflags (include: C:/Users/Admin/Desktop/Caffe Build/libraries/include, library: gflags_shared)
CMake Warning at cmake/Modules/FindGlog.cmake:21 (find_package):
Could not find a configuration file for package "glog" that is compatible
with requested version "".
The following configuration files were considered but not accepted:
C:/Users/Admin/Desktop/Caffe Build/libraries/lib/cmake/glog/glog-config.cmake, version: 0.3.4 (64bit)
Call Stack (most recent call first):
cmake/External/glog.cmake:8 (find_package)
cmake/Dependencies.cmake:21 (include)
CMakeLists.txt:77 (include)
Could NOT find Glog (missing: GLOG_LIBRARY)
CMake Error at cmake/ProtoBuf.cmake:6 (find_package):
Could not find a configuration file for package "Protobuf" that is
compatible with requested version "".
The following configuration files were considered but not accepted:
C:/Users/Admin/Desktop/Caffe Build/libraries/CMake/protobuf-config.cmake, version: 3.1.0 (64bit)
Call Stack (most recent call first):
cmake/Dependencies.cmake:31 (include)
CMakeLists.txt:77 (include)
Configuring incomplete, errors occurred!
See also "C:/Users/Admin/Desktop/Caffe Build/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Admin/Desktop/Caffe Build/CMakeFiles/CMakeError.log".
it looks like something wrong with Glog/protobuf
how did you all overcome this issue?
Thanks
I also have an "issue" building Caffe on Windows 10 with CUDA 8.0. Making the solution completes with no errors using CMake 3.4 but i get 6900-something warnings, which make me a bit concerned for the overall solution to be built. Anyone else get this many warnings? Is this okay?
Yes the warnings are very annoying (and normal). I would gladly accept PRs that deal with them!
The glog issue is not solved, which may be different than the one this issue was opened for. I looked for an answer and this came up: https://stackoverflow.com/questions/25676277/cmake-target-include-directories-prints-an-error-when-i-try-to-add-the-source
It occurs when building glog from source, and CMake for VS2015 32-bit.
Hi @deepdad,
We build glog from sources and then caffe on Windows without issues. Here is our script with CMAKE GLOG variables for Caffe:
Hope it's of any help ...
Most helpful comment
Hi @deepdad,
We build glog from sources and then caffe on Windows without issues. Here is our script with CMAKE GLOG variables for Caffe:
Hope it's of any help ...