make runtest errro: libhdf5_hl.10.dylib

207 views
Skip to first unread message

Junhao Wen

unread,
Oct 19, 2016, 12:14:10 PM10/19/16
to Caffe Users

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 :

Verify anaconda location, sometimes it's in root.

ANACONDA_HOME := $(HOME)/anaconda2
PYTHON_INCLUDE := $(ANACONDA_HOME)/include \
$(ANACONDA_HOME)/include/python2.7 \
$(ANACONDA_HOME)/lib/python2.7/site-packages/numpy/core/include \

We need to be able to find libpythonX.X.so or .dylib.

#PYTHON_LIB := /usr/lib
PYTHON_LIB := $(ANACONDA_HOME)/lib

Whatever else you find you need goes here.

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

fulun tan

unread,
Jan 24, 2017, 5:07:13 AM1/24/17
to Caffe Users
I have got the same problem, and i will try this answer “https://groups.google.com/forum/#!searchin/caffe-users/Library$20not$20loaded$3A$20libhdf5_hl$2010|sort:relevance/caffe-users/MFmdpuId8e0/_eruoq1sWD4J”.

wish me luck

在 2016年10月20日星期四 UTC+8上午12:14:10,Junhao Wen写道:
Message has been deleted

Ben Xu

unread,
Jul 26, 2018, 12:23:13 PM7/26/18
to Caffe Users
I ran into almost the same problem. From my research on similar issues this seems to be due to your .build_release/tools/caffe not linking to your anaconda libraries. I referenced and took from http://akmetiuk.com/posts/2016-03-29-compiling-caffe.html and https://blog.csdn.net/taigw/article/details/71057119 where they provide solutions to the same issue. Their solutions work for me.
Reply all
Reply to author
Forward
0 new messages