relocation R_X86_64_32S against `.rodata' can not be used when making a shared object;

3,536 views
Skip to first unread message

georgi angelov

unread,
Apr 12, 2015, 12:37:02 PM4/12/15
to caffe...@googlegroups.com
So I get the following errors when I try and make Caffee:

...
LD -o .build_release/lib/libcaffe.so
/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: could not read symbols: Bad value
collect2: error: ld returned 1 exit status
make: *** [.build_release/lib/libcaffe.so] Error 1


Has anyone seen this error, and if so, how did you fix it?

Thanks!

Ashudeep Singh

unread,
Apr 12, 2015, 2:26:26 PM4/12/15
to caffe...@googlegroups.com

georgi angelov

unread,
Apr 12, 2015, 3:58:22 PM4/12/15
to caffe...@googlegroups.com
Thank you! Very helpful and it worked like a charm.
Message has been deleted

yangya...@gmail.com

unread,
May 7, 2015, 3:20:44 AM5/7/15
to caffe...@googlegroups.com
Hello, Everyone  I am a fresh man. I met the same problem.  I also see the https://github.com/BVLC/caffe/issues/2171 . Instead of using "CMake", I compile the caffe by modify the "Makefile.config"  file, then do 'make all'  command . Because I think it is  much convinient  for me to build the the python wrapper and to use MKL by modifying the" Makefile.config '' file.

I have been install caffe successufully without python wrapper by "cmake "method .I guess the dependcies have been installed rightly.

any comment will help , Thank you so much.
Message has been deleted

yangya...@gmail.com

unread,
May 7, 2015, 3:29:06 AM5/7/15
to caffe...@googlegroups.com
Is there a solution for using modify "Makefile.config" file instead of "Cmake" method ? Thank you guys :)


On Monday, April 13, 2015 at 12:37:02 AM UTC+8, georgi angelov wrote:

yangya...@gmail.com

unread,
May 7, 2015, 3:57:30 AM5/7/15
to caffe...@googlegroups.com
I also found that in the  352th line in  $(CAFFE_ROOT)/Makefile ,   It says "CXXFLAGS += -pthread -fPIC $(COMMON_FLAGS) $(WARNINGS)" ,  I think it contains the "-fPIC" option. It confuses me. Is there anyone kown about that , thank you. 


On Monday, April 13, 2015 at 12:37:02 AM UTC+8, georgi angelov wrote:

Amitav Mishra

unread,
Nov 20, 2015, 7:57:11 AM11/20/15
to Caffe Users
Hi,

I am new to this, while compiling httpd 2.4.17, when  I invoked Make command and got the similar error:

/usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libssl.a(s3_srvr.o)
: relocation R_X86_64_32 against `.rodata' can not be used when making a shared
object; recompile with -fPIC
/usr/lib/gcc/x86_64-redhat-linux/4.4.6/../../../libssl.a: could not read symbols
: Bad value
collect2: ld returned 1 exit status
make[4]: *** [mod_ssl.la] Error 1

But no where I could find out the file CMakeCache.txt instead I got CMakeList.txt

Can any one help me ...?

Regards,
Amitav

On Sunday, April 12, 2015 at 10:07:02 PM UTC+5:30, georgi angelov wrote:

Haneen Sader

unread,
Apr 6, 2016, 4:11:38 AM4/6/16
to Caffe Users
I am facing similar problem with libgflags:

/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

Did anyone find the problem?
Can you help?
Reply all
Reply to author
Forward
0 new messages