Caffe compilation fails due to unsupported gcc compiler version

倖福魔咒の 提交于 2019-12-04 09:50:39

cmake -D CUDA_NVCC_FLAGS="-ccbin gcc-4.8" .. && make causes successful compilation.


Now another problem showed up: linking Google's libgflags or libprotobuf fails probably due to fact that it was compiled with newer gcc version but it's not related to asked question.

My machine runs Ubuntu 15.10, and my default compiler version is gcc 5.2.1 .

Commenting out the #error directive in line 115 of file

/usr/local/cuda-7.5/include/host_config.h 

(or whatever the path on your system is) did the trick for me. Caffe compiled fine, all tests ran smoothly.

On the other hand, if one chooses to ignore this and proceed to compile part of the project with one compiler version, part of the project with another (for me it was gcc-4.8 and gcc-5.2.1), linking problems will arise. The linking problems of protobuf and libgflags another answer mentions are not unrelated to this.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!