Caffe: Fatal error C1017 when compile on windows

Created on 16 Jul 2018  路  8Comments  路  Source: BVLC/caffe

Issue summary

Fatal error C1017 when compile on windows. Can't compile

Steps to reproduce

Followed the instruction. Failed at scripts\build_win.cmd.

System configuration

  • Operating system: Windows10
  • Compiler: MSVS2015
  • CUDA version (if applicable): 9.0
  • CUDNN version (if applicable): v7
  • BLAS:
  • Python version (if using pycaffe): 3.5
  • MATLAB version (if using matcaffe):

Issue checklist

"E:\caffe\build\ALL_BUILD.vcxproj" (default target) (1) ->
"E:\caffe\build\src\caffe\caffe.vcxproj" (default target) (3) ->
(CustomBuild target) ->
C:/Users/Jack/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include/boost-1_61\boost/config/compiler/nv
cc.hpp(22): fatal error C1017: invalid integer constant expression [E:\caffe\build\src\caffe\caffe.vcxproj]

windows

Most helpful comment

@ycui123 @Noiredd see https://github.com/BVLC/caffe/issues/5994, since cuda7.5 it use __CUDACC_VER_MAJOR__ and __CUDACC_VER_MINOR__. Thus for windows branch, the dependency file C:\Users\chris\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\boost-1_61\boost\config\compiler\nvcc.hpp's last three lines should be removed or commented:

#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
#   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif

All 8 comments

@ycui123 Hi, did you solve this problem? I'm same here.

@ycui123 @Noiredd see https://github.com/BVLC/caffe/issues/5994, since cuda7.5 it use __CUDACC_VER_MAJOR__ and __CUDACC_VER_MINOR__. Thus for windows branch, the dependency file C:\Users\chris\.caffe\dependencies\libraries_v140_x64_py27_1.1.0\libraries\include\boost-1_61\boost\config\compiler\nvcc.hpp's last three lines should be removed or commented:

#if !defined(__CUDACC_VER__) || (__CUDACC_VER__ < 70500)
#   define BOOST_NO_CXX11_VARIADIC_TEMPLATES
#endif

For people who met this problem when build caffe with cmake and cuda on windows, you can refer to my Chinese blog for the whole successful steps: Windows涓嬬敤cmake缂栬瘧Caffe

@ycui123 - did you try to use ck tool? I managed to build Caffe for Windows with VS 2015 and CUDA 9.0 as described in #5675 .

@mlosab3 I didn't use ck tools, since I was on half way of using willyd's provided dependencies. With some modifications in cmake related config files, I can successfully build the windows branch of caffe, you may refer to my blog.

@zchrissirhcz - my school started using Ck because it detects or installs all required software for windows branch of caffe without the need to modify config files - that's neat. It is also recommended by several conferences where we publish our papers. Check it out at http://www.cknowledge.org

@mlosab3 Thanks for you recommendation on Ck. Actually, I think the official Caffe's windows branch is not that hard to be configured, but forks such as SSD or faster rcnn are difficult, especially on windows. To use the original user's code, I think I still need to use Linux instead of Windows.

@zchrissirhcz - that's right. We were suggested to use ck mainly because we do not have much time and have to concentrate on improving classification for our assignment rather than on installing Caffe. Ck just provided the same "front end" for all students to install Caffe on laptops with different operating systems. But we did not yet look at other forks so I actually do not know how or if they are supported by the ck.

Was this page helpful?
0 / 5 - 0 ratings