"Invalid integer constant expression" Error during Installation

527 views
Skip to first unread message

Amish Suchak

unread,
Feb 17, 2018, 2:08:49 AM2/17/18
to Caffe Users
Hello, I tried following this guide on the installation : http://www.shaneahmed.com/2017/07/build-caffe-pycaffe-and-matcaffe-on.html

But I keep getting the following error after I run scripts\build_win.cmd

Done Building Project "C:\Users\amish\Downloads\caffe\caffe\build\src\caffe\caffeproto.vcxproj" (default targets).

InitializeBuildStatus:
  Touching "caffe.dir\Release\caffe.tlog\unsuccessfulbuild".
CustomBuild:
  Building NVCC (Device) object src/caffe/CMakeFiles/cuda_compile_1.dir/layers/Release/cuda_compile_1_generated_absval_layer.cu.obj
C:/Users/amish/.caffe/dependencies/libraries_v140_x64_py35_1.1.0/libraries/include/boost-1_61\boost/config/compiler/nvcc.hpp(22): fatal error C1017: invalid integer constant expression [C:\Users\amish\Downloads
\caffe\caffe\build\src\caffe\caffe.vcxproj]
  CMake Error at cuda_compile_1_generated_absval_layer.cu.obj.Release.cmake:219 (message):
    Error generating
    C:/Users/amish/Downloads/caffe/caffe/build/src/caffe/CMakeFiles/cuda_compile_1.dir/layers/Release/cuda_compile_1_generated_absval_layer.cu.obj


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

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


Build FAILED.

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

    0 Warning(s)
    1 Error(s)

I don't understand what the problem is here or what I could do to fix it.Any help or tips on what I could do would be highly appreciated.

Thank you. 

Дмитрий Денисенко

unread,
Mar 30, 2018, 4:00:41 PM3/30/18
to Caffe Users
Hi! 
I faced simillar problem. I'm trying to install caffe with MSVC 2015 for a week I guess... 
I have CUDA 9.1 and I think that the problem is that boost handle CUDA 9.x since 1.65 version. But prerequisites automatic installation force me to install 1.61 version.
I want to try setting BOOST_ROOT variable to the boost 1.65. I'll write later if it helps

суббота, 17 февраля 2018 г., 10:08:49 UTC+3 пользователь Amish Suchak написал:

Дмитрий Денисенко

unread,
Mar 30, 2018, 5:05:22 PM3/30/18
to Caffe Users
I didn't manage to make it work, but it seems like my assumption is correct. See https://github.com/BVLC/caffe/issues/5654

пятница, 30 марта 2018 г., 23:00:41 UTC+3 пользователь Дмитрий Денисенко написал:
Reply all
Reply to author
Forward
0 new messages