Skip to content
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

Matlab (R2015b) Compilation of Caffe-0.999 #61

Open
deeptigp opened this issue Sep 20, 2015 · 3 comments
Open

Matlab (R2015b) Compilation of Caffe-0.999 #61

deeptigp opened this issue Sep 20, 2015 · 3 comments

Comments

@deeptigp
Copy link

Hi,

I've successfully installed Caffe in $RCNN/external/caffe . However, when I run make matcaffe, I get the below error:

/usr/local/MATLAB/R2015b/bin/mex matlab/caffe/matcaffe.cpp build/lib/libcaffe.a
CXXFLAGS="$CXXFLAGS -pthread -fPIC -DNDEBUG -O2 -I/usr/include/python2.7 -I/usr/lib/python2.7/dist-packages/numpy/core/include -I/usr/local/include -Ibuild/src -I./src -I./include -I/usr/local/cuda/include -Wall"
CXXLIBS="$CXXLIBS -L/usr/lib -L/usr/local/lib -L/usr/lib -L/usr/local/cuda/lib64 -L/usr/local/cuda/lib -lcudart -lcublas -lcurand -lpthread -lglog -lprotobuf -lleveldb -lsnappy -lboost_system -lhdf5_hl -lhdf5 -lopencv_core -lopencv_highgui -lopencv_imgproc -lopenblas" -o matlab/caffe/caffe.mexa64
Unknown MEX argument '-o'.
make: *** [matlab/caffe/caffe.mexa64] Error 255

I am using Ubuntu 14.04 and Matlab R2015b. My LD_LIBRARY_PATH includes path to cuda.

export LD_LIBRARY_PATH=/usr/local:/usr/local/cuda-7.5/lib64:/usr/lib/nvidia-352:

Is this issue because of my Matlab version and Caffe-0.999? I was able to successfully compile the latest version of Caffe (obtained from https://github.com/BVLC/caffe)

Any help would be appreciated. Thanks!

@ivanDonadello
Copy link

Hi deeptigp,

I had the same problem with Matlab R2014a, our versions seem to updated for caffe 0.999. I fixed the problem by changing the Makefile like this:

change the line $(MATLAB_DIR)/bin/mex $(MAT$(PROJECT)_SRC) $(STATIC_NAME)
with $(MATLAB_DIR)/bin/mex $(MAT$(PROJECT)_SRC)
this remains the same: CXXFLAGS="$$CXXFLAGS $(MATLAB_CXXFLAGS)"
change CXXLIBS="$$CXXLIBS $(LDFLAGS)" -o $@
with CXXLIBS="$$CXXLIBS $(STATIC_NAME) $(LDFLAGS)" -output $@

see also rbgirshick/caffe@c28823f

@VisionTheta
Copy link

Hi, @deeptigp

I had the same problem with Matlab R2014b, Linux 14.04, caffe v0.999. I fixed the problem by changing the Makefile like this,

change CXXLIBS="$$CXXLIBS $(LDFLAGS)" -o $@
to CXXLIBS="$$CXXLIBS $(STATIC_NAME) $(LDFLAGS)" -output $@

which meaning add $(STATIC_NAME) before $(LDFLAGS) and change -o to -output

It works for me!

@aamirshaikh86
Copy link

why i can't start matlab being in R-CNN directory , in installation guide it is mentioned that we have to start matlab being in R-CNN directory but i m unable to locate matlab in r-cnn, any help will be appreciated. thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants