2

I've linked all the required libraries and the caffee confige ran smoothly. But when I want to make the library I get this error:

/usr/bin/ld: /usr/local/lib/libgflags.a(gflags.cc.o): relocation R_X86_64_32S against `std::basic_string, std::allocator >::_Rep::_S_empty_rep_storage' can not be used when making a shared object; recompile with -fPIC /usr/local/lib/libgflags.a: could not read symbols: Bad value

I found a 'workaround' for this problem at the libgflags and glog troubleshooting websites: https://code.google.com/p/google-glog/issues/detail?id=201

But I tried them and it doesn't seem to work. Am I missing something? Maybe I haven't uncommented a line in my original Makefile.config file? *I am installing caffe on my laptop with no CUDA or parallel computing for now.

Arturo
  • 3,679
  • 6
  • 34
  • 43

2 Answers2

1

Try recompiling the gflags library with -fPIC compiler flag.

Did the caffe work using gflags shared library instead of using the static one?

Anoop K. Prabhu
  • 5,417
  • 2
  • 26
  • 43
0

Try to choose 'BUILD SHARED LIBS' option when using Cmake