Home | Tutorials | Wiki | Issues
Ask Your Question
0

Gazebo install error when linking shared library

asked 2016-12-07 06:22:24 -0500

SamanthaTraynor65 gravatar image

updated 2016-12-08 11:39:35 -0500

chapulina gravatar image

I'm trying to install Gazebo from sources, because I need DART. Now I'm doing the step of make -j4 and having this error

[ 16%] Linking CXX shared library libgazebo_common.so
/usr/bin/ld: /usr/local/lib/libtar.a(handle.o): relocation R_X86_64_32 against `.data' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libtar.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
gazebo/common/CMakeFiles/gazebo_common.dir/build.make:1204: recipe for target 'gazebo/common/libgazebo_common.so.8.0.0' failed
make[2]: *** [gazebo/common/libgazebo_common.so.8.0.0] Error 1
CMakeFiles/Makefile2:2461: recipe for target 'gazebo/common/CMakeFiles/gazebo_common.dir/all' failed
make[1]: *** [gazebo/common/CMakeFiles/gazebo_common.dir/all] Error 2
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2

What should I do with this error?

edit retag flag offensive close merge delete

Comments

I've tried to recompile libtar with fPIC "make COMPILE_FLAGS+=-fPIC" "sudo make install" but error with Gazebo is still here

SamanthaTraynor65 gravatar imageSamanthaTraynor65 ( 2016-12-07 06:43:07 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
1

answered 2016-12-08 07:26:50 -0500

SamanthaTraynor65 gravatar image

Yep, I just used wrong way to add compiler options. The right way was "make CFLAGS+='-fPIC'"

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-07 06:21:36 -0500

Seen: 181 times

Last updated: Dec 08 '16