BVLC / caffe

Caffe: a fast open framework for deep learning.
http://caffe.berkeleyvision.org/
Other
34.04k stars 18.7k forks source link

Fatal error C1017 when compile on windows #6466

Open ycui123 opened 6 years ago

ycui123 commented 6 years ago

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

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]

zchrissirhcz commented 6 years ago

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

zchrissirhcz commented 6 years ago

@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
zchrissirhcz commented 6 years ago

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

mlosab3 commented 6 years ago

@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 .

zchrissirhcz commented 6 years ago

@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.

mlosab3 commented 6 years ago

@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

zchrissirhcz commented 6 years ago

@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.

mlosab3 commented 6 years ago

@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.