我已经在linux (archlinux )上编译了vlfeat,并通过以下命令为matlab制作了mex
make MEX=MATLABROOT/bin/mex在VLFEATROOT目录中。输出看起来很好,因为没有报告错误。顺便说一句,我使用gcc4.7来编译上面的东西。
我在我的matlab中执行非常简单的代码:
VLFEATROOT = '~/user-libs/vlfeat/vlfeat-0.9.19/';
path_vlfeat = [VLFEATROOT 'toolbox/vl_setup'];
run(path_vlfeat);
vl_version;matlab报告了以下红线:
Invalid MEX-file '/home/bingqingqu/user-libs/vlfeat/vlfeat-0.9.19/toolbox/mex/mexa64/vl_version.mexa64':
/home/bingqingqu/user-libs/vlfeat/vlfeat-0.9.19/toolbox/mex/mexa64/libvl.so: undefined symbol: GOMP_parallel我对openmp了解不多,但这似乎与此有关。我注意到在vlfeat的makefile中有一个关闭openmp的选项:
# DISABLE_OPENMP=yes 我将其设置为"yes",编译并运行简单的代码。现在,上面的一切都可以正确地执行了。
但是我想知道如果我把选项设为no会有什么问题。makefile注释写道:
# If defined to anything other than "no", the following falgs disable
# specific features in the library. By defaults, all the features are
# enabled. If the makefile finds that the environment is unable to
# support some of them, it may decide to disable them automatically
# (in this case it will print a message). This behaviour can be
# overriden by defining the flag to be "no".我在google上简单地搜索了一些openmp知识,似乎我所有的openmp或gomp都安装得很好。如下所示: ldconfig -p | grep gomp结果如下:
libgomp.so.1 (libc6,x86-64) => /usr/lib/libgomp.so.1
libgomp.so.1 (libc6) => /usr/lib32/libgomp.so.1
libgomp.so (libc6,x86-64) => /usr/lib/libgomp.so
libgomp.so (libc6) => /usr/lib32/libgomp.so提前感谢您的帮助!
发布于 2015-11-05 14:40:37
https://stackoverflow.com/questions/28429568
复制相似问题