caffe-builder icon indicating copy to clipboard operation
caffe-builder copied to clipboard

protobuf compilation errors

Open Strateus opened this issue 9 years ago • 5 comments

Hi, i have some protobuf similar errors in VS2012: C:!DOWNLOAD\Caffe\WILLYD\build\DownloadCache\protobuf\gtest\include\gtest/gtest-printers.h(550): error C2977: std::tuple: C:!DOWNLOAD\Caffe\WILLYD\build\DownloadCache\protobuf\gtest\include\gtest/internal/gtest-param-util-generated.h(4338): error C2977: std::tuple:

And i can't choose 64bit release, there is 32bit only in solution.

At the end of compilation:

-- Boost version: 1.58.0 -- Found the following Boost libraries: -- system -- thread -- Looking for pthread.h -- Looking for pthread.h - not found -- Found Threads: TRUE
-- Using custom FindGFlags module -- Using custom FindGlog module -- Could NOT find PROTOBUF (missing: PROTOBUF_LIBRARY PROTOBUF_INCLUDE_DIR) CMake Error at cmake/ProtoBuf.cmake:13 (message): Could not find PROTOBUF Compiler Call Stack (most recent call first): cmake/Dependencies.cmake:27 (include) CMakeLists.txt:28 (include)

Any ideas what's wrong here?

Strateus avatar Oct 27 '15 12:10 Strateus

I only tested with VS2013. Your problem looks related to std::tuple. Look for any differences between VS2013 and VS2012 on MSDN. I had a problem with GTest in caffe and I fixed it with the following lines of CMake code:

if(NOT MSVC) # rely on gtest header to determine what to do
add_definitions(-DGTEST_USE_OWN_TR1_TUPLE)
endif(NOT MSVC)

Maybe you can try to add this to the protobuf CMakeLists.txt?

And i can't choose 64bit release, there is 32bit only in solution.

CMake does not make multi platform solution. You have to select Visual Studio 11 2012 Win64 to get the 64 bit platform.

willyd avatar Oct 27 '15 12:10 willyd

Installed VS2013 and recompiled everything.

Boost log:

     No install step for 'Boost'
     Completed 'Boost'
 1>Done Building Project "C:\Caffe\build\Boost.vcxproj" (Build target(s)) -- FAILED.

Build FAILED.

Time Elapsed 00:28:05.19

Protobuf log:

 1>Done Building Project "C:\Caffe\build\protobuf.vcxproj" (Build target(s)).

Build succeeded.

Time Elapsed 00:20:19.89

Caffe log:

     -- Could NOT find PROTOBUF (missing:  PROTOBUF_LIBRARY) 
     CMake Error at cmake/ProtoBuf.cmake:13 (message):
       Could not find PROTOBUF Compiler
     Call Stack (most recent call first):
       cmake/Dependencies.cmake:27 (include)
       CMakeLists.txt:28 (include)
     -- Configuring incomplete, errors occurred!
     See also "C:/Caffe/build/Caffe-prefix/src/Caffe-build/CMakeFiles/CMakeOutput.log".
     See also "C:/Caffe/build/Caffe-prefix/src/Caffe-build/CMakeFiles/CMakeError.log".
 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(170,5): error MSB6006: "cmd.exe" exited with code 1.
 1>Done Building Project "C:\Caffe\build\Caffe.vcxproj" (Build target(s)) -- FAILED.

  Build FAILED.

There were 1459 warnings and 6 errors now:

Error   343 error C1189: #error :  "Not ARM"        C:\Caffe\build\libs\config\checks\architecture\arm.cpp  Boost
Error   344 error C1189: #error :  "Not MIPS1"  C:\Caffe\build\libs\config\checks\architecture\mips1.cpp    Boost
Error   345 error C1189: #error :  "Not PPC"    C:\Caffe\build\libs\config\checks\architecture\power.cpp    Boost
Error   346 error C1189: #error :  "Not SPARC"  C:\Caffe\build\libs\config\checks\architecture\sparc.cpp    Boost
Error   347 error C1083: Cannot open include file: 'unicode/uversion.h': No such file or directory  C:\Caffe\build\libs\regex\build\has_icu_test.cpp    Boost
Error   1465    error MSB6006: "cmd.exe" exited with code 1.    C:\Program Files  (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets 170 5   Caffe

So basically only 2 failed: Boost and Caffe, but Caffe says that it cant fine Protobuf, so im confused. Rest of the dependencies succeeded to build.

Any hints now? Where i could check to get more info?

Strateus avatar Oct 27 '15 18:10 Strateus

Boost actually succeeded. These are known issues, see the README.md.

As for why caffe fails to find protobuf, can you confirm that you have the protoc.exe somewhere in your build directory? Should be located under install. Once you find them you can manually set the required variables using the CMake GUI. See FindProtobuf.cmake.

willyd avatar Oct 28 '15 12:10 willyd

Could NOT find PROTOBUF (missing: PROTOBUF_LIBRARY)

I had same problem and solved it. protoc.exe and libprotobuf.lib are located at caffe-builder\build\install\vsprojects\Release. I just copied the files to caffe-builder\build\install\bin and caffe-builder\build\install\lib.

nagadomi avatar Mar 22 '16 15:03 nagadomi

I am getting the following error on trying to install Caffe on Windows 10 with 2015 Visual Studio

The system cannot find the drive specified. The system cannot find the drive specified. INFO: ============================================================ INFO: Summary: INFO: ============================================================ INFO: MSVC_VERSION = 14 INFO: WITH_NINJA = 0 INFO: CMAKE_GENERATOR = "Visual Studio 14 2015 Win64" INFO: CPU_ONLY = 0 INFO: CUDA_ARCH_NAME = Auto INFO: CMAKE_CONFIG = Release INFO: USE_NCCL = 0 INFO: CMAKE_BUILD_SHARED_LIBS = 0 INFO: PYTHON_VERSION = 3 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: ============================================================ -- Selecting Windows SDK version to target Windows 10.0.15063. -- Boost version: 1.61.0 -- Found the following Boost libraries: -- system -- thread -- filesystem -- chrono -- date_time -- atomic -- Found gflags (include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include, library: gflags_shared) -- Found glog (include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include, library: glog) -- Found PROTOBUF Compiler: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/bin/protoc.exe -- Found lmdb (include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include, library: lmdb) -- Found LevelDB (include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include, library: leveldb) -- Found Snappy (include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include, library: snappy_static;optimized;C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/lib/caffezlib.lib;debug;C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/lib/caffezlibd.lib) -- CUDA detected: 8.0 -- Found cuDNN: ver. 6.0.21 found (include: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/cuda/include, library: C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/cuda/lib/x64/cudnn.lib) -- Added CUDA NVCC flags for: sm_61 -- OpenCV found (C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries) -- Found OpenBLAS libraries: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/lib/libopenblas.dll.a -- Found OpenBLAS include: C:/Users/aashi/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include -- NumPy ver. 1.13.3 found (include: C:/Users/aashi/Anaconda3/envs/pycaffe/lib/site-packages/numpy/core/include) -- Boost version: 1.61.0 -- Found the following Boost libraries: -- python

-- ******************* Caffe Configuration Summary ******************* -- General: -- Version : 1.0.0 -- Git : 1.0-109-g28ca8145-dirty -- System : Windows -- C++ compiler : C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- Release CXX flags : /MD /O2 /Ob2 /DNDEBUG /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- Debug CXX flags : /MDd /Zi /Ob0 /Od /RTC1 /DWIN32 /D_WINDOWS /W3 /GR /EHsc -- Build type : Release

-- BUILD_SHARED_LIBS : 0 -- BUILD_python : 1 -- BUILD_matlab : 0 -- BUILD_docs : -- CPU_ONLY : 0 -- USE_OPENCV : ON -- USE_LEVELDB : ON -- USE_LMDB : ON -- USE_NCCL : 0 -- 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_61 -- cuDNN : Yes (ver. 6.0.21)

-- Python: -- Interpreter : C:/Users/aashi/Anaconda3/envs/pycaffe/python.exe (ver. 3.5.4) -- Libraries : C:/Users/aashi/Anaconda3/envs/pycaffe/libs/python35.lib (ver 3.5.4) -- NumPy : C:/Users/aashi/Anaconda3/envs/pycaffe/lib/site-packages/numpy/core/include (ver 1.13.3)

-- Install: -- Install path : C:/Users/aashi/Downloads/caffe/build/install

-- Configuring done -- Generating done -- Build files have been written to: C:/Users/aashi/Downloads/caffe/build Microsoft (R) Build Engine version 14.0.25420.1 Copyright (C) Microsoft Corporation. All rights reserved.

Build started 2017-12-18 7:08:08 PM. Project "C:\Users\aashi\Downloads\caffe\build\ALL_BUILD.vcxproj" on node 1 (default targets). Project "C:\Users\aashi\Downloads\caffe\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\aashi\Downloads\caffe\build\ZERO_CHECK.vcxproj" (2) on node 1 (default targets). InitializeBuildStatus: Creating "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild" because "AlwaysCreate" was specified. CustomBuild: All outputs are up-to-date. FinalizeBuildStatus: Deleting file "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\unsuccessfulbuild". Touching "x64\Release\ZERO_CHECK\ZERO_CHECK.tlog\ZERO_CHECK.lastbuildstate". Done Building Project "C:\Users\aashi\Downloads\caffe\build\ZERO_CHECK.vcxproj" (default targets).

Project "C:\Users\aashi\Downloads\caffe\build\ALL_BUILD.vcxproj" (1) is building "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffe.vcxproj" (3) on node 1 (default targets). Project "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffe.vcxproj" (3) is building "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffeproto.vcxproj" (4) on node 1 (default targets). InitializeBuildStatus: Touching "caffeproto.dir\Release\caffeproto.tlog\unsuccessfulbuild". CustomBuild: Building Custom Rule C:/Users/aashi/Downloads/caffe/src/caffe/CMakeLists.txt CMake does not need to re-run because C:/Users/aashi/Downloads/caffe/build/src/caffe/CMakeFiles/generate.stamp is up-to-date. Running C++/Python protocol buffer compiler on C:/Users/aashi/Downloads/caffe/src/caffe/proto/caffe.proto C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515. [C:\Users\aashi\Downloads\caffe\build\src\caffe\caffeproto.vcxpr oj] Done Building Project "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffeproto.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffe.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\aashi\Downloads\caffe\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.

Build FAILED.

"C:\Users\aashi\Downloads\caffe\build\ALL_BUILD.vcxproj" (default target) (1) -> "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffe.vcxproj" (default target) (3) -> "C:\Users\aashi\Downloads\caffe\build\src\caffe\caffeproto.vcxproj" (default target) (4) -> (CustomBuild target) -> C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\v140\Microsoft.CppCommon.targets(171,5): error MSB6006: "cmd.exe" exited with code -1073741515. [C:\Users\aashi\Downloads\caffe\build\src\caffe\caffeproto.vcx proj]

0 Warning(s)
1 Error(s)

Time Elapsed 00:00:01.61 ERROR: Build failed

Any suggestion regarding this would be helpful !

aashimasingh avatar Dec 19 '17 00:12 aashimasingh