Problems in building matcaffe on Linux (Manjaro KDE)
Show older comments
Hey, I was able to build caffe from source using make all, and then i ran make test and make runtest. All of them worked properly and showed no error. However when I do make matcaffe I'm getting this error from console. I'm really new to building software from source and hence I don't know how can I fix this, I want to use this caffe interface in matlab and hence This is important for me, please do help.
I have matlab R2020_b version installed (this is the latest version, Downloaded yesterday) and I have academic matlab license.
Logs:
MEX matlab/+caffe/private/caffe_.cpp
Building with 'g++'.
Warning: gcc version '10.2.0' not supported. See https://www.mathworks.com/support/compilers/current_release.
/usr/bin/ld: .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+0x137): undefined reference to `cblas_sgemm'
/usr/bin/ld: .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+0x187): undefined reference to `cblas_dgemm'
/usr/bin/ld: .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+0x1bc): undefined reference to `cblas_sgemv'
/usr/bin/ld: .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+0x1ec): undefined reference to `cblas_dgemv'
/usr/bin/ld: .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+0x2e3): undefined reference to `cblas_sscal'
/usr/bin/ld: .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+0x344): undefined reference to `cblas_dscal'
/usr/bin/ld: .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+0x3e1): undefined reference to `cblas_scopy'
/usr/bin/ld: .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+0x431): undefined reference to `cblas_dcopy'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `void caffe::caffe_axpy<float>(int, float, float const*, float*)':
math_functions.cpp:(.text+0x20f): undefined reference to `cblas_saxpy'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `void caffe::caffe_axpy<double>(int, double, double const*, double*)':
math_functions.cpp:(.text+0x22f): undefined reference to `cblas_daxpy'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `void caffe::caffe_scal<float>(int, float, float*)':
math_functions.cpp:(.text+0x2a6): undefined reference to `cblas_sscal'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `void caffe::caffe_scal<double>(int, double, double*)':
math_functions.cpp:(.text+0x2b6): undefined reference to `cblas_dscal'
/usr/bin/ld: .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+0x30d): undefined reference to `cblas_saxpy'
/usr/bin/ld: .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+0x36f): undefined reference to `cblas_daxpy'
/usr/bin/ld: .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+0x381): undefined reference to `cblas_sdot'
/usr/bin/ld: .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+0x391): undefined reference to `cblas_ddot'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `float caffe::caffe_cpu_asum<float>(int, float const*)':
math_functions.cpp:(.text+0x3a6): undefined reference to `cblas_sasum'
/usr/bin/ld: .build_release/lib/libcaffe.a(math_functions.o): in function `double caffe::caffe_cpu_asum<double>(int, double const*)':
math_functions.cpp:(.text+0x3b6): undefined reference to `cblas_dasum'
/usr/bin/ld: .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+0x3fd): undefined reference to `cblas_sscal'
/usr/bin/ld: .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+0x44d): undefined reference to `cblas_dscal'
collect2: error: ld returned 1 exit status
make: *** [Makefile:541: matlab/+caffe/private/caffe_.mexa64] Error 255
Answers (0)
Categories
Find more on Deploy to C++ Applications Using MATLAB Data API (C++11) in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!