Centos6.3 源码级别编译Caffe库笔记

前端之家收集整理的这篇文章主要介绍了Centos6.3 源码级别编译Caffe库笔记前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

编译环境是:

[zhangtao@192.168.1.113 caffe_prj]$ cat /etc/issue
CentOS release 6.3 (Final)
Kernel \r on an \m

zhangtao@192.168.1.113 caffe_prj]$ gcc --version
gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-18)


完成此次编译需要的包见截图:



编译的流程参考:

主要是参考了这个文档:

Centos6.5下安装caffe 链接:http://www.ttlsa.com/linux/install-caffe-on-centos6-5/

因为我只需 cpu模式,所以直接从文中的 《6、安装blas》开始执行


这里首先一定要参考http://caffe.berkeleyvision.org/installation.html 说明书,确定要安装的每个依赖包的版本问题!



问题之一:遇到安装cmake的问题

参考了:http://hezuyou.blog.163.com/blog/static/78497415201311734452972/ 解决cmake的安装


问题之二:遇到安装opencv的问题:

参考了:http://blog.csdn.net/solomon1558/article/details/51967280 解决opencv的安装


问题之三:遇到依赖atlas的问题:

我刚开始参考了:http://blog.csdn.net/mlnotes/article/details/9676269 《Linux安装cblas,lapack,lapacke》

还因为安装了yum install gcc-gfortran 解决gfortran问题,但是最后还是出现了:

.build_release/lib/libcaffe.so: undefined reference to `dgemm_'
.build_release/lib/libcaffe.so: undefined reference to `dscal_'
.build_release/lib/libcaffe.so: undefined reference to `sscal_'
.build_release/lib/libcaffe.so: undefined reference to `sdot_'
.build_release/lib/libcaffe.so: undefined reference to `daxpy_'
.build_release/lib/libcaffe.so: undefined reference to `dcopy_'
.build_release/lib/libcaffe.so: undefined reference to `sasum_'
.build_release/lib/libcaffe.so: undefined reference to `saxpy_'
.build_release/lib/libcaffe.so: undefined reference to `sgemm_'
.build_release/lib/libcaffe.so: undefined reference to `dasum_'
.build_release/lib/libcaffe.so: undefined reference to `ddot_'
.build_release/lib/libcaffe.so: undefined reference to `sgemv_'
.build_release/lib/libcaffe.so: undefined reference to `scopy_'
.build_release/lib/libcaffe.so: undefined reference to `dgemv_'


最后怎么解决的呢,一行命令,与修改caffe-master/Makefile:

sudo yum install atlas-devel


针对Makefile:


针对Makefile.config,做如下修改



最后成功编译完caffe:

猜你在找的CentOS相关文章