I'm getting an error when I try to install Caffe on Linux Ubuntu 64. The error is as follows:
/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S against `.rodata' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgflags.a: error adding symbols: Bad value
I tried recompile the gflags library with -fPIC
, but the error changed to as follow:
src/caffe/common.cpp: In function ‘void caffe::GlobalInit(int*, char***)’:
src/caffe/common.cpp:35:5: error: ‘::gflags’ has not been declared
::gflags::ParseCommandLineFlags(pargc, pargv, true);
I also tried to change the CMakeCache.txt of caffe to set the -fPIC
, but do not work either.