Matconvnet出现Missing symbol '_ZNSt7__cxx1112basic_, Error in dagnn.Conv/forward (line 11)

在做tracking过程中,需要使用matcovnet工具包出现以下问题
Invalid MEX-file
'/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64':
Missing symbol
'_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE7reserveEm'
required by
'/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol
'_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_appendEPKcm'
required by
'/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol
'_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_assignERKS4_'
required by
'/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol
'_ZNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE9_M_createERmm'
required by
'/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_critical_end' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_critical_start' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_loop_dynamic_next' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_loop_dynamic_start' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_loop_end_nowait' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_parallel_end' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'GOMP_parallel_start' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'omp_get_max_threads' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'omp_get_num_threads' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol 'omp_get_thread_num' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libcusolver.so.8.0->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpusparse.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_allocate_exception' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_begin_catch' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_end_catch' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_guard_acquire' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_guard_release' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_pure_virtual' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_rethrow' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__cxa_throw' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '__gxx_personality_v0' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZdaPv' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZdlPv' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_Znam' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZNSt9exceptionD1Ev' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_Znwm' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZSt17__throw_bad_allocv' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZSt20__throw_length_errorPKc' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZSt20__throw_system_errori' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZTISt9exception' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZTVN10__cxxabiv117__class_type_infoE' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZTVN10__cxxabiv120__si_class_type_infoE' required
by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'
Missing symbol '_ZTVSt9exception' required by
'/usr/local/MATLAB/R2017b/bin/glnxa64/libmwmagma.so->/usr/local/MATLAB/R2017b/bin/glnxa64/libmwgpu.so->/home/ximao/paper_code/CREST-master/matconvnet/matlab/mex/vl_nnconv.mexa64'.

Error in dagnn.Conv/forward (line 11)
      outputs{1} = vl_nnconv(...

Error in dagnn.Layer/forwardAdvanced (line 85)
      outputs = obj.forward(inputs, {net.params(par).value}) ;

Error in dagnn.DagNN/eval (line 91)
  obj.layers(l).block.forwardAdvanced(obj.layers(l)) ;

Error in CREST_tracking (line 57)
net1.eval({'input',gpuArray(patch1)});

Error in Demo (line 33)
result=CREST_tracking(opts,varargin,config,display);
 

先说一下运行环境,unbuntu16.0.4,matlab2017b,gcc5.4,matconvnet编译没有问题但是运行时报错。

出现上一问题实际上就是gcc版本过高导致的,之前程序有时候能运行成功有时候运行失败,因为不是管理员用户所以不能更改gcc版本,最终通过添加本地软链接实现更改默认gcc版本,本服务器上存在gcc4.9,5.4版本,默认为5.4版本的,因此需要降级为4.9版本。

1.在home目录下新建bin文件

mkdir ~/bin

2.添加软链接

找到你的g++,gcc的目录

ln -s /usr/bin/g++-4.9  ./bin/g++

 ln -s /usr/bin/gcc-4.9  ./bin/gcc

3.添加之后通过

export PATH=$PATH:~/bin

source ~/.bashrc

完成更改gcc版本

可以通过gcc -v查看更改后的版本

最终解决问题

你可能感兴趣的:(Linux)