Caffe配置过程中的一些问题
参考链接:
https://groups.google.com/forum/#!topic/caffe-users/x8Y26vf-or8
http://blog.csdn.net/striker_v/article/details/52890747
http://www.echojb.com/cuda/2017/05/05/375103.html
http://www.caffecn.cn/?/question/1113
https://blog.csdn.net/dym755833564/article/details/77965966
1、GCC版本太新
在make过程中可能 string.h ‘memcy’ was not declared in this scope的错误,这是因为ubuntu中gcc编译器版本太新,解决方法是打开Makefile文件,找到下面这行代码(大概在409行左右):
NVCCFLAGS += -ccbin=(CXX)−Xcompiler−fPIC(COMMON_FLAGS)
将其改为:
NVCCFLAGS += -D_FORCE_INLINES -ccbin=(CXX)−Xcompiler−fPIC(COMMON_FLAGS)
2、make matcaffe时报错
/home/zkk/caffe/matlab/+caffe/private/caffe_.cpp: In function ‘void delete_solver(int, mxArray**, int, const mxArray**)’:
/home/zkk/caffe/matlab/+caffe/private/caffe_.cpp:208:3: warning: lambda expressions only available with -std=c++11 or -std=gnu++11 [enabled by default]
/home/zkk/caffe/matlab/+caffe/private/caffe_.cpp:208:4: error: no matching function for call to ‘remove_if(std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, std::vector<boost::shared_ptr<caffe::Solver<float> > >::iterator, delete_solver(int, mxArray**, int, const mxArray**)::<lambda(const boost::shared_ptr<caffe::Solver<float> >&)>)’
/home/zkk/caffe/matlab/+caffe/private/caffe_.cpp:208:4: note: candidate is