make runtest fails: symbol lookup error

693 views
Skip to first unread message

Jeff chen

unread,
Feb 26, 2015, 12:09:50 AM2/26/15
to caffe...@googlegroups.com
I am struggling to install caffe. Everything went well, until "make runtest". It seems other tests are OK, until:

[ RUN      ] ConcatLayerTest/0.TestNum
[       OK ] ConcatLayerTest/0.TestNum (0 ms)
[----------] 4 tests from ConcatLayerTest/0 (2 ms total)

[----------] 4 tests from ImageDataLayerTest/1, where TypeParam = caffe::DoubleCPU
[ RUN      ] ImageDataLayerTest/1.TestRead
.build_release/test/test_all.testbin: symbol lookup error: .build_release/test/test_all.testbin: undefined symbol: _ZN6google10LogMessage6streamEv
make: *** [runtest] Error 127

The error is probably related to glog and gflags library. I tried to ignore this error and compiled matlab interface. When I call the interface, similar error happens again:

Invalid MEX-file '/home/jeff/Downloads/caffe-rc2/matlab/caffe/caffe.mexa64':
/home/jeff/Downloads/caffe-rc2/matlab/caffe/caffe.mexa64: undefined symbol:
_ZN6google4base21CheckOpMessageBuilder7ForVar2Ev

Error in matcaffe_init (line 19)
if caffe('is_initialized') == 0

My system is Linux mint 17.1. I intially install glogs and gflags using package manager. Later I also tried to reinstall glogs and gflags from source without solving the above problems.

Thanks.
Message has been deleted

Jeff chen

unread,
Feb 27, 2015, 10:38:34 AM2/27/15
to caffe...@googlegroups.com
It turns out there are other versions of glog and gflags in my system. I adjusted the LD_LIBRARY_PATH and the problem is resolved. A helpful command is "ldd -d -r your_program" that will lists the paths of the libraries called by your program.

JP

unread,
Jul 8, 2016, 6:22:01 AM7/8/16
to Caffe Users
You need to include the directory of your library for glog, gflags and protobuf. For me the libraries were in `/usr/local/lib` and after exporting the `LD_LIBRARY_PATH`:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib:/usr/local/cuda/lib64

I could run make all, test, runtest without any problems :)
Reply all
Reply to author
Forward
0 new messages