test environment:
ubuntu18.04
matlab:R2018b
cuda:10.0+cudnn7.6.5
opencv:3.4.4
gcc/g++:7.5.0
Compiling matcaffe is still normal:
make mat
MEX matlab/+caffe/private/caffe_.cpp
compile with'g ++'.
Warning: The gcc version you are using is '7.5.0'. This version of gcc is not supported. The version currently supported by MEX is '6.3.x'. For a list of currently supported compilers, see: https://www.mathworks.com/support/compilers/current_release.
MEX has completed successfully.
But the following error is reported when make mattest
MEX file'/home/fut/ai/caffe/matlab/+caffe/private/caffe_.mexa64' is invalid:
/usr/local/lib/libopencv_imgcodecs.so.3.4: undefined symbol:
_ZN2cv6detail17check_failed_autoEmmRKNS0_12CheckContextE.
出错 caffe.set_mode_cpu (line 5)
caffe_('set_mode_cpu');
Error caffe.run_tests (line 6)
caffe.set_mode_cpu(); For
this error, I tried many methods and ended up in failure. The only one with more discussion is in this issue:
https://github.com/BVLC/caffe/issues/3934
Although it failed, I will continue to study in the follow-up, and I will archive it now. If anyone has solved this problem, you can leave a comment below.