Caffe: opencl branch windows build CMake fails with pre-built dependencies

Created on 9 Mar 2017  路  5Comments  路  Source: BVLC/caffe

Issue summary

The Windows branch uses pre-built dependencies that are downloaded into
${CMAKE_CURRENT_BINARY_DIR}/libraries.
This causes problem for CMake as INTERFACE_INCLUDE_DIRECTORIES for protobuf is being set inside the build directory

Steps to reproduce

Update to the latest opencl branch and run build_win.cmd:

-- ***** Caffe Configuration Summary *****
-- General:
-- Version : 1.0.0-rc5
-- Git : unknown
-- System : Windows
-- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/amd64/cl.exe
-- Release CXX flags : /MD /O2 /Ob2 /DNDEBUG /FS /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MP /FS
-- Debug CXX flags : /D_DEBUG /MDd /Zi /Ob0 /Od /RTC1 /FS /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MP /FS

-- Build type : Release

-- BUILD_SHARED_LIBS : 0
-- BUILD_python : 1
-- BUILD_matlab : 0
-- BUILD_docs :
-- CPU_ONLY : 0
-- USE_OPENCV : ON
-- USE_FFT : OFF
-- USE_LEVELDB : ON
-- USE_LMDB : ON
-- USE_NCCL : 0
-- ALLOW_LMDB_NOLOCK : OFF

-- USE_HDF5 : ON

-- 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 : No

-- Python:
-- Interpreter : C:/apps/anaconda3/python.exe (ver. 3.5.2)
-- Libraries : C:/apps/anaconda3/libs/python35.lib (ver 3.5.2)

-- NumPy : C:/apps/anaconda3/lib/site-packages/numpy/core/include (ver 1.11.3)

-- Install:

-- Install path : /THE/Path/to/caffe-opencl/scripts/build/install

-- Configuring done
CMake Error in src/caffe/CMakeLists.txt:
Target "proto" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/THE/Path/to/caffe-opencl/scripts/build/libraries/include"
which is prefixed in the build directory.
CMake Error in src/caffe/CMakeLists.txt:
Target "proto" INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/THE/Path/to/caffe-opencl/scripts/build/libraries/include"
which is prefixed in the build directory.Target "proto"
INTERFACE_INCLUDE_DIRECTORIES property contains path:
"/THE/Path/to//caffe-opencl/scripts/build/libraries/include"
which is prefixed in the source directory.
-- Generating done
CMake Warning:
Manually-specified variables were not used by the project:
USE_CUDNN
USE_INDEX64
-- Build files have been written to: /THE/Path/to/caffe-opencl/scripts/build
ERROR: Configure failed

Your system configuration

Operating system: Win 8.1
Compiler: VS 2015
CUDA version (if applicable):N/A
CUDNN version (if applicable):N/A
BLAS: cblas (pre-built dependencies)
Python or MATLAB version (for pycaffe and matcaffe respectively):

The workaround is to disable USE_PREBUILT_DEPENDENCIES after they were downloaded, move libraries outside the build tree and update affected path variables.

OpenCL bug windows

All 5 comments

Thanks, I will check this issue today.

Should work now.

Thanks, it builds now

hi i have seem error

-- Build files have been written to: C:/Users/ali alaobali/Downloads/caffe/caffe/build
ERROR: Configure failed
operation sys windows 10 64-bit
python 3.5
cuda 8.0
vs 2015

cuda 9.1

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lixin7895123 picture lixin7895123  路  3Comments

prathmeshrmadhu picture prathmeshrmadhu  路  3Comments

dfotland picture dfotland  路  3Comments

FreakTheMighty picture FreakTheMighty  路  3Comments

weather319 picture weather319  路  3Comments