-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile matcaffe issue #2040
Comments
Got rid of the above errors by using MATLAB 2013b, and add /usr/include into the Makefile.config INCLUDE_DIRS variables. unfortunately the nightmare is not over. When I try to run the matlab demo, I receive: Invalid MEX-file |
Got the above fixed by setting a symbolic link from /usr/lib/cuda/libcurand.7.0.dylib to /Applications/MATLAB_R2013b.app/sys/os/maci64//libcurand.7.0.dylib. Now, I am really stuck on this: Invalid MEX-file I think this error is raised because matlab uses a different library then the one used when I compile the mex. Unfortunately, I really don't know how to find out which version is the correct one. I follow this caffe installation tutorial: so OpenCV is installed by homebrew as I setup the prerequisites. running brew list opencv gives me the following: /usr/local/Cellar/opencv/2.4.9/bin/opencv_createsamples checking /usr/local/lib, I found that there are two versions of opencv installed. libopencv_highgui.2.4.9.dylib Based on the error message shown in the beginning of this ticket, matlab was looking for 2.4, but homebrew installed 2.4.9. But simply rename 2,4,9 to 2,4 will not satisfy matlab. Is there any other hacks to rescue the situation? Thanks |
fixed..... solution is to add another symbolic link for libtoff.5.dylib If anyone knows how to get matlab2014b work, please let me know the solution. |
I compiled caffe, and tried to compile matlab wrapper.
In the first try, I receive error as follows:
MEX matlab/caffe/matcaffe.cpp
Building with 'Xcode Clang++'.
Undefined symbols for architecture x86_64:
"_mxArrayToString", referenced from:
init(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
read_mean(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
_mexFunction in matcaffe.o
"_mxCreateCellArray_700", referenced from:
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxCreateCellMatrix_700", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxCreateDoubleScalar", referenced from:
init(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
is_initialized(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
get_init_key(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxCreateNumericArray_700", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
read_mean(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxCreateString", referenced from:
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxCreateStructArray_700", referenced from:
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxFree", referenced from:
init(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
_mexFunction in matcaffe.o
"_mxGetCell_700", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxGetDimensions_700", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxGetNumberOfElements", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxGetPr", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
read_mean(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxGetScalar", referenced from:
set_device(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxIsSingle", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxSetCell_700", referenced from:
forward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
backward(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
"_mxSetField_700", referenced from:
get_weights(int, mxArray_tag**, int, mxArray_tag const**) in matcaffe.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [matlab/caffe/caffe.mexmaci64] Error 255
Following the tutorial mentioned in: #915, I did the following:
This time I got the following error:
MEX matlab/caffe/matcaffe.cpp
Warning: Legacy MEX infrastructure is provided for compatibility; it will be removed in a future version of MATLAB. For more information, consult the MEX release notes http://www.mathworks.com/help/matlab/release-notes.html.
clang: warning: no such sysroot directory: '-mmacosx-version-min=10.8'
In file included from matlab/caffe/matcaffe.cpp:6:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/sstream:174:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ostream:131:
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/ios:215:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/iosfwd:90:10: fatal error:
'wchar.h' file not found
include <wchar.h> // for mbstate_t
1 error generated.
make: *** [matlab/caffe/caffe.mexmaci64] Error 255
My system environment is as follows:
OSX10.10
MATLAB 2014b
Thanks for helping
The text was updated successfully, but these errors were encountered: