Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object #65

Open
StanleyYake opened this issue Nov 19, 2015 · 11 comments

Comments

@StanleyYake
Copy link

Hello there:
I am using Hydro on Ubuntu 12.04 64 bit, and I have stucked on the relocation R_X86_64_32 against .rodata.str1.1 can not be used when making a shared object for couple of days, and still have no good solution, sounds like a platform problem. Here is what I have referenced:http://stackoverflow.com/questions/9637551/relocation-r-x86-64-32s-against-rodata-while-compiling-on-64-bit-platform

screenshot from 2015-11-18 19 20 58

can you give me some advice, thanks!

@VictorLamoine
Copy link
Contributor

Most probably you did not compile gflag, glog, ceres as shared libraries; the error does not seem to be related to ceres here but I think it's the root problem.

I've recently updated the instructions
http://wiki.ros.org/industrial_extrinsic_cal#Installation

Try re-compiling and installing the libraries after checking BUILD_SHARED_LIBS=ON in CMake wherever it exists.

@StanleyYake
Copy link
Author

VictorLamoine, Thanks for your reply. I have went to the gflag, glog, ceres directory to dosudo make uninstall and make clean , then re-compiling and installing as the url you pasted, but still the same problem.

@shaun-edwards
Copy link
Member

The install page for Ceres mentions some problems with SuiteSparse, see here.

@StanleyYake
Copy link
Author

@shaun-edwards Thank you for your infomation. Yes, I doubt the Ceres not compiled as a shared library, so I re-installed it again after add the PPA, but how can I check it trully installed from the PPA? I am not familiar with this. Here is apt-cache policy libsuitesparse-dev
screenshot from 2015-11-20 11 51 03

it is from the universe, dose it from PPA??

@sergiomb2
Copy link

I suspect that is hardened builds, looks like, to me, that is a similar problem of http://answers.opencv.org/question/67149/error-building-opencv-300-with-ffmpeg/?answer=83697#post-id-83697

@datomnurdin
Copy link

Any solutions?

@cumtchenchang
Copy link

I also encounter this error, how to solve it?

@yangxh31
Copy link

I also encounter this error, how to solve it?

i solved this problem as below in cmakefile.txt
set(Boost_USE_STATIC_LIBS OFF)
set(Boost_USE_NULTITHREADED OFF)
set(Boost_USE_STATIC_RUNTIME OFF)

@sergiomb2
Copy link

Relocation R_X86_64_PC32 against undefined symbol , usually happens when LDFLAGS are set with hardening and CFLAGS not .
Common fixes :
https://bugzilla.redhat.com/show_bug.cgi?id=1304277#c3
https://github.com/rpmfusion/lxdream/blob/master/lxdream-0.9.1-implicit.patch

https://stackoverflow.com/a/38579792/778517

@drchrislewis
Copy link
Member

@cumtchenchang @yangxh31 @sergiomb2 I've never seen this error. I'm not sure if you all have "fixed" it. If you think you have please submit a PR. I'll be glad to test it on my machine. I really don't understand the "hardening" or any what any of the set(BoostXX) commands might do.

@sergiomb2
Copy link

@drchrislewis when Fedora starts harden all packages [1], this error appears a lot and when I googled it I found this issue, is not a ROS specific problem.
So when we compile the software and add GCC building flags to hardening, but if cflags lose the harden flags and ldflags don't , we got this error ...
Or make sure that you add -fPIC to CFLAGS or CXXFLAGS for make-based projects.

[1]
https://fedoraproject.org/wiki/Changes/Harden_All_Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants