ubuntu 14.04配置matconvnet(CPU)错误解决办法

前端之家收集整理的这篇文章主要介绍了ubuntu 14.04配置matconvnet(CPU)错误解决办法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

/matlab/mex/.build/bits/impl/tinythread.o: undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5’//lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status

1.在vl_compilenn.m中修改
% Compiler flags

flags.cc = {} ;
flags.link = {} ;

为:

flags.link = {'-lpthread'};

2.修改Makefile

MEXFLAGS_LD := $(MEXFLAGS) \

CLIBS='$$CLIBS $(LDFLAGS)' \

CXXLIBS='$$CXXLIBS $(LDFLAGS)' \

LDOPTIMFLAGS='$$LDOPTIMFLAGS   $(LDOPTIMFLAGS)'

还有,

flags.mexlink = horzcat(flags.cc,flags.link,...
{'-largeArrayDims'},...
{['LDFLAGS=\$LDFLAGS ',strjoin(flags.linkpass)]},...
{['CLIBS=\$CLIBS ',strjoin(flags.linklibs)]},...
{['CXXLIBS=\$CXXLIBS ',...
{['LINKLIBS=\$LINKLIBS ',strjoin(flags.linklibs)]}) ;

/usr/bin/ld:/home/jere/Documents/MATLAB/matconvnet-1.0-beta20/matlab/mex/.build/vl_nnconv.o: relocation R_X86_64_32S against `.rodata’ can not be used when making a shared object; recompile with -fPIC/home/jere/Documents/MATLAB/matconvnet-1.0-beta20/matlab/mex/.build/vl_nnconv.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status

在vl_compilenn.m中

flags.ccoptim = {'-fPIC'} ;
原文链接:https://www.f2er.com/ubuntu/350307.html

猜你在找的Ubuntu相关文章