0
我與在製備用於MEX MATLAB通過以下命令vlfeat-0.9.19 /工具箱/ MEX/mexa64/libvl.so:未定義符號:GOMP_parallel
make MEX=MATLABROOT/bin/mex
編譯在Linux(的archlinux)vlfeat 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
,我將它設置爲「是」,編譯和運行簡單的代碼。以上所有內容現在都可以執
但我想知道如果我將選項留給否,問題是什麼。生成文件評論說:
# 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".
我簡要地搜索在谷歌的一些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
預先感謝您的幫助!