Ubuntu 16.04+CUDA8.0+cuDNN7.5+Caffe安装过程(2)

sudo apt-get install python-dev python-pip
-----------------------

15 安装其他

sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler

15 安装MKL

//////////////////

1\

许多未定义

重新使用GCC5编译protobuf glog lbd  lbboost  opencv

未成功

2\

使用初始Makefile 重新开始 , 然后修改 hdf5.h:INCLUDE_DIRS:=$(PYTHON_INCLUDE) /usr/local/include/ usr/include/hdf5/serial/

编译过程中可能会遇到错误,比如./include/caffe/util/cudnn.hpp:8:34: fatal error: caffe/proto/caffe.pb.h: No such file or director,这是因为protobuf和pillow没有安装,或者是通过apt-get安装的。使用pip重新安装一遍即可解决问题。删除caffe-mast(提前保存Makefile.config和Makefile),解压,解压重新编译。

<code>pip install protobuf --upgrade -i <span>.douban</span><span>.com</span>/simple pip install pillow --upgrade -i <span>.douban</span><span>.com</span>/simple </code>

3\

You could try to pass an argument (CXX_FLAGS) to the compiler -D_FORCE_INLINES by editing the CMAKE files (for example: set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FORCE_INLINES")) or makefiles.

So, Open the Makefile and changing the line

NVCCFLAGS += -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

into

NVCCFLAGS += -D_FORCE_INLINES -ccbin=$(CXX) -Xcompiler -fPIC $(COMMON_FLAGS)

For me this was on line 406

真正解决看另一篇文章: caffe 未定义的引用问题

解决之后:
make
all -j4
make test
make runtest

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/14559.html