Windows 10 Pro Caffe Matlab build using Anaconda Python 3.5.5

64 views
Skip to first unread message

david allen

unread,
Mar 30, 2019, 4:40:52 PM3/30/19
to Caffe Users
In attempting to build Caffe on my Windows 10 Pro machine, I have been getting the following errors.

[ 1 ] no python, no cuda, no ninja, yes matlab:

[C:\Projects\caffe\build\Matlab\matlab.vcxproj]
  C:\Projects\caffe\matlab\+caffe\private\caffe_.cpp(230): note: see reference to function template instantiation 'mxArray *ptr_vec_to_handle_vec<caffe::Net<float>>(const std::vector<boost::shared_ptr<c
  affe::Net<float>>,std::allocator<_Ty>> &)' being compiled
          with
          [
              _Ty=boost::shared_ptr<caffe::Net<float>>
          ]
  c_mexapi_version.c
LINK : error LNK2001: unresolved external symbol mexCreateMexFunction [C:\Projects\caffe\build\Matlab\matlab.vcxproj]
LINK : error LNK2001: unresolved external symbol mexDestroyMexFunction [C:\Projects\caffe\build\Matlab\matlab.vcxproj]
LINK : error LNK2001: unresolved external symbol mexFunctionAdapter [C:\Projects\caffe\build\Matlab\matlab.vcxproj]
C:/Projects/caffe/build/Matlab/Release/caffe_.lib : fatal error LNK1120: 3 unresolved externals [C:\Projects\caffe\build\Matlab\matlab.vcxproj]
  Building Custom Rule C:/Projects/caffe/tools/CMakeLists.txt
  CMake does not need to re-run because C:/Projects/caffe/build/tools/CMakeFiles/generate.stamp is up-to-date.
  net_speed_benchmark.cpp
C:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\google/protobuf/message_lite.h(247): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data [
C:\Projects\caffe\build\tools\net_speed_benchmark.vcxproj]
C:\Projects\caffe\include\caffe/util/io.hpp(53): warning C4244: 'argument': conversion from 'uint64_t' to 'int', possible loss of data [C:\Projects\caffe\build\tools\net_speed_benchmark.vcxproj]
  net_speed_benchmark.vcxproj -> 

[ 2 ] no python, no cuda, yes ninja, yes matlab:

[101/157] Building CXX object tools\CMakeFiles\net_speed_benchmark.dir\net_speed_benchmark.cpp.obj
FAILED: tools/CMakeFiles/net_speed_benchmark.dir/net_speed_benchmark.cpp.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe  /nologo /TP -DBOOST_ALL_NO_LIB -DCAFFE_VERSION=1.0.0 -DCMAKE_WINDOWS_BUILD -DCPU_ONLY -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL=__declspec(dllimport) -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport) -DH5_BUILT_AS_DYNAMIC_LIB=1 -DUSE_LEVELDB -DUSE_LMDB -DUSE_OPENCV -Iinclude -I. -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\boost-1_61 -I..\include -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\opencv -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\Include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /FS /MD /O2 /Ob2 /DNDEBUG /FS /showIncludes /Fotools\CMakeFiles\net_speed_benchmark.dir\net_speed_benchmark.cpp.obj /Fdtools\CMakeFiles\net_speed_benchmark.dir\ /FS -c ..\tools\net_speed_benchmark.cpp
.\caffe/export.hpp(7): fatal error C1083: Cannot open include file: 'caffe/include_symbols.hpp': No such file or directory
[102/157] Building CXX object src\caffe\CMakeFiles\caffe.dir\solvers\adam_solver.cpp.obj
C:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\google/protobuf/message_lite.h(247): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
[103/157] Building CXX object src\caffe\CMakeFiles\caffe.dir\util\hdf5.cpp.obj
C:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\google/protobuf/message_lite.h(247): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
..\src\caffe\util\hdf5.cpp(192): warning C4244: 'return': conversion from 'hsize_t' to 'int', possible loss of data
..\include\caffe/blob.hpp(74): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
..\include\caffe/blob.hpp(74): note: while compiling class template member function 'int caffe::Blob<double>::num_axes(void) const'
..\src\caffe\util\hdf5.cpp(131): note: see reference to function template instantiation 'int caffe::Blob<double>::num_axes(void) const' being compiled
..\src\caffe\util\hdf5.cpp(100): note: see reference to class template instantiation 'caffe::Blob<double>' being compiled
..\src\caffe\util\hdf5.cpp(62): warning C4244: '=': conversion from 'unsigned __int64' to 'int', possible loss of data
..\src\caffe\util\hdf5.cpp(90): note: see reference to function template instantiation 'void caffe::hdf5_load_nd_dataset_helper<float>(hid_t,const char *,int,int,caffe::Blob<float> *,bool)' being compiled
[104/157] Building CXX object src\caffe\CMakeFiles\caffe.dir\util\math_functions.cpp.obj
..\src\caffe\util\math_functions.cpp(186): warning C4244: 'argument': conversion from 'const double' to 'const float', possible loss of data
[105/157] Building CXX object tools\CMakeFiles\extract_features.dir\extract_features.cpp.obj
FAILED: tools/CMakeFiles/extract_features.dir/extract_features.cpp.obj
C:\PROGRA~2\MICROS~1.0\VC\bin\amd64\cl.exe  /nologo /TP -DBOOST_ALL_NO_LIB -DCAFFE_VERSION=1.0.0 -DCMAKE_WINDOWS_BUILD -DCPU_ONLY -DGLOG_NO_ABBREVIATED_SEVERITIES -DGOOGLE_GLOG_DLL_DECL=__declspec(dllimport) -DGOOGLE_GLOG_DLL_DECL_FOR_UNITTESTS=__declspec(dllimport) -DH5_BUILT_AS_DYNAMIC_LIB=1 -DUSE_LEVELDB -DUSE_LMDB -DUSE_OPENCV -Iinclude -I. -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\boost-1_61 -I..\include -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\opencv -IC:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\Include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /FS /MD /O2 /Ob2 /DNDEBUG /FS /showIncludes /Fotools\CMakeFiles\extract_features.dir\extract_features.cpp.obj /Fdtools\CMakeFiles\extract_features.dir\ /FS -c ..\tools\extract_features.cpp
C:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\google/protobuf/message_lite.h(247): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
.\caffe/export.hpp(7): fatal error C1083: Cannot open include file: 'caffe/include_symbols.hpp': No such file or directory
[106/157] Building CXX object src\caffe\CMakeFiles\caffe.dir\solvers\rmsprop_solver.cpp.obj
C:\Users\CISL\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\google/protobuf/message_lite.h(247): warning C4267: 'return': conversion from 'size_t' to 'int', possible loss of data
ninja: build stopped: subcommand failed.
ERROR: Build failed

david allen

unread,
Mar 30, 2019, 4:42:00 PM3/30/19
to Caffe Users
What are the ways I can get this to build correctly?

[ d ]
Reply all
Reply to author
Forward
0 new messages