Issue compiling vlfeat on mac : further insight ?

Hello everyone,
I am currently trying to run vlfeat on Mac OS Sierra (10.12) with Matlab version 2017b. I am having a real struggle here because of libraries not found :
Invalid MEX-file : Library not loaded: @loader_path/libmex.dylib
Although I read carefully these explanations here or there about recompiling vlfeat, I can't make it work. Here is the error message I get when trying with Xcode 9 or Xcode 8 (tried both, same result) :
ld: symbol dyld_stub_binding_helper not found, normally in crt1.o/dylib1.o/bundle1.o for architecture x86_64
fatal error: /Users/paulkovacsik/Downloads/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: internal link edit command failed
make: *** [bin/maci64/libvl.dylib] Error 1
I understand it has to do with my compiler (probably gcc), but would anyone have some hints about how to fix this ? I would be greatly thankful, as I am right now quite desperate !
Thank you in advance
PS: commands used were (Xcode, 8 or 9)
make MEX=/Applications/MATLAB_R2017b.app/bin/mex ARCH=maci64

8 Comments

I am facing the same issue
same issue here :(
You must have gone through this link. After the initial setup, did you execute the following command:
vl_version verbose
to check whether VLFEAT has been successfully installed? Please include the output of this MATLAB command here.
Invalid MEX-file
'/Users/Keshav/Documents/MATLAB/vlfeat-0.9.20/toolbox/mex/mexmaci64/vl_version.mexmaci64':
dlopen(/Users/Keshav/Documents/MATLAB/vlfeat-0.9.20/toolbox/mex/mexmaci64/vl_version.mexmaci64,
6): Library not loaded: @loader_path/libmex.dylib
Referenced from:
/Users/Keshav/Documents/MATLAB/vlfeat-0.9.20/toolbox/mex/mexmaci64/vl_version.mexmaci64
Reason: image not found.
This is the output I get when I do vl_version verbose
Did you try the answer suggested below ?
I tried that and when verifying the path, I got:
-bash: $: command not found
$echo $ DYLD_LIBRARY_PATH
should have been written as
echo $DYLD_LIBRARY_PATH
Thanks, that let me verify the path, but I'm still getting the same error when running "vl_version verbose"

Sign in to comment.

Answers (2)

I had exactly the same problem and managed to solve it. Firs of all make sure you have the lates version of Xcode and Clang compiler. Then open up a terminal and 'cd' to the directory where you have stored the VLFeat:
cd /<your root>/vlfeat-0.9.20
Then:
make MEX=/<your root>/MATLAB_R2017b.app/bin/mex
I hope it works for you too.
It seems like some libraries may not be loaded since the DYLD_LIBRARY_PATH path may not be set properly. Try setting the DYLD_LIBRARY_PATH path from MAC terminal. For example:
DYLD_LIBRARY_PATH='/Applications/MATLAB_R2017b.app/bin/maci64:/Applications/MATLAB_R2017b.app/sys/os/maci64':$DYLD_LIBRARY_PATH
Verify the path:
$echo $ DYLD_LIBRARY_PATH

Categories

Asked:

PK
on 11 Oct 2017

Edited:

on 14 Nov 2017

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!