I have compiled vlfeat on linux (archlinux ) with making mex for matlab by the following command
make MEX=MATLABROOT/bin/mex
in the VLFEATROOT directory. Output seem well as no error was reported. BTW, I use gcc4.7 to compile the stuff above.
I execute the very simple code in my matlab:
VLFEATROOT = '~/user-libs/vlfeat/vlfeat-0.9.19/';
path_vlfeat = [VLFEATROOT 'toolbox/vl_setup'];
run(path_vlfeat);
vl_version;
the matlab report the following red lines:
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
I dont know much about openmp but it seems this is related to that. I noticed that in the makefile of vlfeat there is an option for switching off openmp:
# DISABLE_OPENMP=yes
and I set it to "yes", compiling and run the simple code. Everything above can execute without error now.
But I want to know what is the problem if I leave the option to no. The makefile comment says:
# 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".
I briefly search for some openmp knowledge on google and it seem that all my openmp or gomp are installed fine. see below: ldconfig -p | grep gomp the result is :
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
Thanks in advance for your help!