runtest compiling error on OS X 10.9

688 views
Skip to first unread message

Hongyang Li

unread,
Oct 22, 2014, 11:31:56 AM10/22/14
to caffe...@googlegroups.com
hi guys,
i have successfully compiled the make all and make test, but when i did the make runtest,
an error appears,

LeedeMacBook-Pro:caffe leefrancis$ make runtest
.build_release/test/test_all.testbin 0 --gtest_shuffle 
dyld: Library not loaded: @rpath/libcudart.5.5.dylib
  Referenced from: /Users/leefrancis/research/caffe/.build_release/test/test_all.testbin
  Reason: image not found
make: *** [runtest] Trace/BPT trap: 5

it seems that libcudart5.5.dylib is missing, but i am pretty sure i have installed the latest cuda 6.5 (two times),
here's my environment variable setting:

export PATH=/Applications/MATLAB_R2014a.app/bin:/Developer/NVIDIA/CUDA-6.5/bin:$PATH
export DYLD_FALLBACK_LIBRARY_PATH=/Users/leefrancis/anaconda/lib:/usr/local/lib:/usr/lib:$DYLD_FALLBACK_LIBRARY_PATH
export DYLD_LIBRARY_PATH=/usr/local/Cellar/protobuf/2.6.0/lib:/Developer/NVIDIA/CUDA-6.5/lib:$DYLD_LIBRARY_PATH
# added by Anaconda 2.1.0 installer
export PATH="/Users/leefrancis/anaconda/bin:$PATH"
export DYLD_FALLBACK_LIBRARY_PATH="/Developer/NVIDIA/CUDA-6.5/lib:$DYLD_FALLBACK_LIBRARY_PATH"

i have tried out all the possible solutions online, but none of them works, could anyone tell me where is wrong??
thanks very much!



Jay Mahadeokar

unread,
Nov 3, 2014, 8:06:48 AM11/3/14
to caffe...@googlegroups.com
Hi,

I was facing similar issue. 

Editing the Makefile on line 272 and adding: 

LDFLAGS="\$$LDFLAGS -Wl,-rpath,/usr/local/cuda/lib"

to the mex command did the trick for me.   Reference: https://devtalk.nvidia.com/default/topic/418143/dyld-library-not-loaded-rpath-libcudart-dylib-/

Hope this helps!

-Jay. 

deep samal

unread,
Apr 15, 2015, 3:08:12 AM4/15/15
to caffe...@googlegroups.com
Hi,
I am having the same problem and even tried the above mentioned line in mex command of my makefile, but the same error appears-

.build_release/tools/caffe

dyld: Library not loaded: @rpath/libcudart.7.0.dylib

  Referenced from: /Users/deepsamal/Desktop/Research/caffe/.build_release/tools/caffe

  Reason: image not found

make: *** [runtest] Trace/BPT trap: 5


But I think the problem I am having is not in mex command but in runtest. I also made sure that libcudart.7.0.dylib is indeed in /usr/local/cuda/lib and this path is part of DYLD_FALLBACK_LIBRARY_PATH.

Any help appreciated.

Mac OS 10.9, Cuda 7.0

Da Cao

unread,
Oct 11, 2015, 8:51:08 PM10/11/15
to Caffe Users
Hi, have you solved the issue? 
I am having the exact same problem with  dyld: Library not loaded: @rpath/libcudart.7.5.dylib, I've tried for a long time and it's really frustrating.
I winder how many people are having this issue...
Message has been deleted

Grayson Adkins

unread,
Oct 12, 2015, 4:53:20 AM10/12/15
to Caffe Users
I have the same problem and all the solutions I've found to change DYLD_LIBRARY_PATH and DYLD_FALLBACK_LIBRARY_PATH aren't working for me.
Reply all
Reply to author
Forward
0 new messages