I use Anaconda2 Python, HDF5 is bundled.( at the beginning, I install HDF5 with brew, they give me some warning, the vision of lib and header are different .
so I unistall it)
and when I use make runtest. Caffe can't find the path of HDF5 lib.
$ make runtest
.build_release/tools/caffe
dyld: Library not loaded: libhdf5_hl.10.dylib
Referenced from: /Users/junhao.wen/Hao/Docker/Caffe/Caffe_source/caffe/.build_release/tools/caffe
Reason: image not found
make: *** [runtest] Trace/BPT trap: 5
And in anaconda lib, libhdf5_hl.10.dylib is exit. What's wrong?
In makefile.config :
ANACONDA_HOME := $(HOME)/anaconda2
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \
#PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib
INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
and
$ echo $DYLD_FALLBACK_LIBRARY_PATH
/Users/junhao.wen/anaconda2/lib:/usr/local/lib:/usr/lib
Solution 1)
I know there is another post which has the same problem with me, but the answer install_name_tool does not work for me, maybe I use the command in the run way:
sudo install_name_tool -change /Users/junhao.wen/anaconda2/lib/libhdf5_hl.10.dylib @rpath/./libhdf5_hl.10.dylib /libhdf5_hl.10.dylib
here is the output:
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/install_name_tool: can't open file: /libhdf5_hl.10.dylib (No such file or directory)
so I guess I use the command in the wrong way:)
Solution 2)
Many people said that we should set the environment variable DYLD_FALLBACK_LIBRARY_PATH, and Ive tried, it doest not work.
Please help me, i have wasted one day to install caffe for my Mac, and I have been stucked by this problem...
Thanks in advance