gazebosim/gz-msgs

Compilation Error related to shared library

osrf-migration opened this issue · 1 comments

Original report (archived issue) by rishabh lal (Bitbucket: Riss0).


[X] Put an X between the brackets on this line if you have done all of the following:
    * Checked the Q&A board for common solutions: http://answers.gazebosim.org
    * Checked that your issue isn't already filed.
    * Checked that there is not already an Ignition package that provides the described functionality: https://ignitionrobotics.org/libs
# Description 

[Compilation Error, when linking of shared library libignition-msgs5.so starts]
# Steps to Reproduce
Just followed the installation instructions
**Expected behavior:**  

[100% compilation, without any error]
**Actual behavior:**

[
[ 97%] Linking CXX shared library ../lib/libignition-msgs5.so
/usr/bin/ld: /usr/local/lib/libprotobufd.a(arena.cc.o): relocation R_X86_64_32 against `_ZN6google8protobuf8internal9ArenaImpl23lifecycle_id_generator_E' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libprotobufd.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
src/CMakeFiles/ignition-msgs5.dir/build.make:4109: recipe for target 'lib/libignition-msgs5.so.5.0.0' failed
make[2]: *** [lib/libignition-msgs5.so.5.0.0] Error 1
CMakeFiles/Makefile2:1134: recipe for target 'src/CMakeFiles/ignition-msgs5.dir/all' failed
make[1]: *** [src/CMakeFiles/ignition-msgs5.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2
]
**Reproduces how often:** 

[Occurs at last, always]
# Versions

[My protobuf is 3.7.1 on ubuntu 16.04 with ignition-msgs5]

Original comment by rishabh lal (Bitbucket: Riss0).


  • changed state from "new" to "resolved"

just had to recompile protobuf with -fPIC