CAFFE深度学习交流群:532629018
root@ubuntu:/usr/local/fast-rcnn/caffe-fast-rcnn# make -j16
CXX src/caffe/syncedmem.cpp
CXX src/caffe/net.cpp
CXX src/caffe/blob.cpp
CXX src/caffe/layer_factory.cpp
CXX .build_release/src/caffe/proto/caffe.pb.cc
CXX src/caffe/data_transformer.cpp
CXX src/caffe/solver.cpp
CXX src/caffe/util/upgrade_proto.cpp
CXX src/caffe/util/im2col.cpp
CXX src/caffe/util/math_functions.cpp
CXX src/caffe/util/io.cpp
CXX src/caffe/layers/prelu_layer.cpp
CXX src/caffe/layers/absval_layer.cpp
CXX src/caffe/layers/window_data_layer.cpp
CXX src/caffe/layers/data_layer.cpp
CXX src/caffe/layers/hdf5_output_layer.cpp
src/caffe/layers/hdf5_output_layer.cpp:3:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/layers/hdf5_output_layer.o’ failed
make: *** [.build_release/src/caffe/layers/hdf5_output_layer.o] Error 1
make: *** Waiting for unfinished jobs….
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from src/caffe/syncedmem.cpp:4:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/syncedmem.o’ failed
make: *** [.build_release/src/caffe/syncedmem.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from src/caffe/util/im2col.cpp:6:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/util/im2col.o’ failed
make: *** [.build_release/src/caffe/util/im2col.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/layer.hpp:8,
from src/caffe/net.cpp:9:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/net.o’ failed
make: *** [.build_release/src/caffe/net.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/layer.hpp:8,
from src/caffe/layer_factory.cpp:3:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/layer_factory.o’ failed
make: *** [.build_release/src/caffe/layer_factory.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/filler.hpp:10,
from src/caffe/layers/prelu_layer.cpp:4:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/layers/prelu_layer.o’ failed
make: *** [.build_release/src/caffe/layers/prelu_layer.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/layer.hpp:8,
from src/caffe/layers/absval_layer.cpp:3:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/layers/absval_layer.o’ failed
make: *** [.build_release/src/caffe/layers/absval_layer.o] Error 1
In file included from src/caffe/util/upgrade_proto.cpp:10:0:
./include/caffe/util/io.hpp:8:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/net.hpp:10,
from src/caffe/solver.cpp:7:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/solver.o’ failed
make: *** [.build_release/src/caffe/solver.o] Error 1
Makefile:501: recipe for target ‘.build_release/src/caffe/util/upgrade_proto.o’ failed
make: *** [.build_release/src/caffe/util/upgrade_proto.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from src/caffe/blob.cpp:4:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/blob.o’ failed
make: *** [.build_release/src/caffe/blob.o] Error 1
In file included from src/caffe/layers/data_layer.cpp:9:0:
./include/caffe/data_layers.hpp:9:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
In file included from src/caffe/layers/window_data_layer.cpp:15:0:
./include/caffe/data_layers.hpp:9:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/layers/window_data_layer.o’ failed
make: *** [.build_release/src/caffe/layers/window_data_layer.o] Error 1
Makefile:501: recipe for target ‘.build_release/src/caffe/layers/data_layer.o’ failed
make: *** [.build_release/src/caffe/layers/data_layer.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from ./include/caffe/syncedmem.hpp:7,
from ./include/caffe/blob.hpp:10,
from ./include/caffe/data_transformer.hpp:6,
from src/caffe/data_transformer.cpp:6:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/data_transformer.o’ failed
make: *** [.build_release/src/caffe/data_transformer.o] Error 1
In file included from src/caffe/util/io.cpp:18:0:
./include/caffe/util/io.hpp:8:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/util/io.o’ failed
make: *** [.build_release/src/caffe/util/io.o] Error 1
In file included from ./include/caffe/util/math_functions.hpp:11:0,
from src/caffe/util/math_functions.cpp:7:
./include/caffe/util/mkl_alternate.hpp:11:19: fatal error: cblas.h: No such file or directory
compilation terminated.
Makefile:501: recipe for target ‘.build_release/src/caffe/util/math_functions.o’ failed
make: *** [.build_release/src/caffe/util/math_functions.o] Error 1
*************************************原因分析*********************************************
我在caffe-fast-rcnn 文件夹下使用命令make -j16时,出现了上述错误,我分析 是没有安装CBLAS的缘故。接下来安装CBLAS看看能不能解决这个问题。
没有装cblas,参考:http://blog.csdn.net/cleverysm/article/details/1925549,http://www.linuxidc.com/Linux/2015-02/113169.htm
http://www.netlib.org/blas/blast-forum/cblas.tgz
具体:
1. 编译blas,进入BLAS目录执行下面的命令
gfortran -c -O3 *.f # 编译所有的 .f 文件,生成 .o文件
ar rv libblas.a *.o # 链接所有的 .o文件,生成 .a 文件
2. 编译cblas,进入CBLAS目录,首先根据自己的操作系统平台,将某个Makefiel.XXX复制为Makefile.in,XXX表示操作系统。如果是Linux,那么就将Makefile.LINUX 复制为 Makefile.in。
cp ../BLAS/libblas.a testing # 将上一步编译成功的 libblas.a 复制到 CBLAS目录下的testing子目录
make # 编译所有的目录
此时会在CBLAS安装目录下的lib目录中产生一个静态链接库文件cblas_LINUX.a,这个库文件和上面得到的libblas.a文件就是我们所需要的。另外还需要的就是CBLAS/include中的cblas.h头文件。将三个文件全部拷贝到,你需调用的应用程序源码目录中。
拷贝到路径下:
cp include/cblas.h /usr/include/
cp lib/cblas_LINUX.a /usr/local/libcblas.a
cp testing/libblas.a /usr/local/lib
照着上面几步走,就可以解决没有cblas.h的问题。
可是又出现了一个问题。
./include/caffe/util/io.hpp:8:18: fatal error: hdf5.h: No such file or directory
compilation terminated.
找不到hdf5.h这个目录,看来CAFFE 的配置就是一个大大的坑啊。
怎么办,继续填坑呗。
请看下一个博客,如何找hdf5.h这个文件 。