我用的是KML,操作系统是redhat6.4,在装完各种依赖之后。开始编译CAFFE。最后报错:
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemm<float>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, float const*, float, float*)':
math_functions.cpp:(.text+0x1ae): undefined reference to `cblas_sgemm'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemm<double>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const*, double const*, double, double*)':
math_functions.cpp:(.text+0x20e): undefined reference to `cblas_dgemm'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemv<float>(CBLAS_TRANSPOSE, int, int, float, float const*, float const*, float, float*)':
math_functions.cpp:(.text+0x24f): undefined reference to `cblas_sgemv'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemv<double>(CBLAS_TRANSPOSE, int, int, double, double const*, double const*, double, double*)':
math_functions.cpp:(.text+0x28f): undefined reference to `cblas_dgemv'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<float>(int, float, float const*, float, float*)':
math_functions.cpp:(.text+0x38f): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<double>(int, double, double const*, double, double*)':
math_functions.cpp:(.text+0x401): undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x5d7): undefined reference to `cblas_scopy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x627): undefined reference to `cblas_dcopy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_axpy<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x2af): undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_axpy<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x2cf): undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_scal<float>(int, float, float*)':
math_functions.cpp:(.text+0x346): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_scal<double>(int, double, double*)':
math_functions.cpp:(.text+0x356): undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<float>(int, float, float const*, float, float*)':
math_functions.cpp:(.text+0x3c2): undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<double>(int, double, double const*, double, double*)':
math_functions.cpp:(.text+0x435): undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `float caffe::caffe_cpu_strided_dot<float>(int, float const*, int, float const*, int)':
math_functions.cpp:(.text+0x441): undefined reference to `cblas_sdot'
.build_release/lib/libcaffe.a(math_functions.o): In function `double caffe::caffe_cpu_strided_dot<double>(int, double const*, int, double const*, int)':
math_functions.cpp:(.text+0x451): undefined reference to `cblas_ddot'
.build_release/lib/libcaffe.a(math_functions.o): In function `float caffe::caffe_cpu_asum<float>(int, float const*)':
math_functions.cpp:(.text+0x596): undefined reference to `cblas_sasum'
.build_release/lib/libcaffe.a(math_functions.o): In function `double caffe::caffe_cpu_asum<double>(int, double const*)':
math_functions.cpp:(.text+0x5a6): undefined reference to `cblas_dasum'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x5f9): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x649): undefined reference to `cblas_dscal'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/compute_image_mean.bin] Error 1
---------------------------------------------------------------------------------------------
我的CBLAS也装过了。但还是有这种错误。求问!
求问各位大神,有没有人遇到过这种问题?
或者该怎么解决?
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemm<float>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, float, float const*, float const*, float, float*)':
math_functions.cpp:(.text+0x1ae): undefined reference to `cblas_sgemm'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemm<double>(CBLAS_TRANSPOSE, CBLAS_TRANSPOSE, int, int, int, double, double const*, double const*, double, double*)':
math_functions.cpp:(.text+0x20e): undefined reference to `cblas_dgemm'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemv<float>(CBLAS_TRANSPOSE, int, int, float, float const*, float const*, float, float*)':
math_functions.cpp:(.text+0x24f): undefined reference to `cblas_sgemv'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_gemv<double>(CBLAS_TRANSPOSE, int, int, double, double const*, double const*, double, double*)':
math_functions.cpp:(.text+0x28f): undefined reference to `cblas_dgemv'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<float>(int, float, float const*, float, float*)':
math_functions.cpp:(.text+0x38f): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<double>(int, double, double const*, double, double*)':
math_functions.cpp:(.text+0x401): undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x5d7): undefined reference to `cblas_scopy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x627): undefined reference to `cblas_dcopy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_axpy<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x2af): undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_axpy<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x2cf): undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_scal<float>(int, float, float*)':
math_functions.cpp:(.text+0x346): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_scal<double>(int, double, double*)':
math_functions.cpp:(.text+0x356): undefined reference to `cblas_dscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<float>(int, float, float const*, float, float*)':
math_functions.cpp:(.text+0x3c2): undefined reference to `cblas_saxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_axpby<double>(int, double, double const*, double, double*)':
math_functions.cpp:(.text+0x435): undefined reference to `cblas_daxpy'
.build_release/lib/libcaffe.a(math_functions.o): In function `float caffe::caffe_cpu_strided_dot<float>(int, float const*, int, float const*, int)':
math_functions.cpp:(.text+0x441): undefined reference to `cblas_sdot'
.build_release/lib/libcaffe.a(math_functions.o): In function `double caffe::caffe_cpu_strided_dot<double>(int, double const*, int, double const*, int)':
math_functions.cpp:(.text+0x451): undefined reference to `cblas_ddot'
.build_release/lib/libcaffe.a(math_functions.o): In function `float caffe::caffe_cpu_asum<float>(int, float const*)':
math_functions.cpp:(.text+0x596): undefined reference to `cblas_sasum'
.build_release/lib/libcaffe.a(math_functions.o): In function `double caffe::caffe_cpu_asum<double>(int, double const*)':
math_functions.cpp:(.text+0x5a6): undefined reference to `cblas_dasum'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x5f9): undefined reference to `cblas_sscal'
.build_release/lib/libcaffe.a(math_functions.o): In function `void caffe::caffe_cpu_scale<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x649): undefined reference to `cblas_dscal'
collect2: error: ld returned 1 exit status
make: *** [.build_release/tools/compute_image_mean.bin] Error 1
---------------------------------------------------------------------------------------------
我的CBLAS也装过了。但还是有这种错误。求问!
求问各位大神,有没有人遇到过这种问题?
或者该怎么解决?