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

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/zhangtaolmq/article/details/70227427

编译环境是:

[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:










展开阅读全文

没有更多推荐了,返回首页