ros_gz
ros_gz copied to clipboard
Build Failure on Ubuntu 22.04 with Protobuf Error
Environment
- OS Version: Ubuntu 22.04
- Source or binary build? Source build, humble branch
Description
- Expected behaviour: Successful build
- Actual behaviour: Build fails with (what I think is) a protobuf error
Steps to reproduce
- Create workspace
- Update rosdep keys from https://github.com/osrf/osrf-rosdep, and install dependencies via rosdep
- Run a colcon build
Output
Starting >>> ros_gz_interfaces
Finished <<< ros_gz_interfaces [58.4s]
Starting >>> ros_gz_sim
Finished <<< ros_gz_sim [24.0s]
Starting >>> ros_gz_bridge
--- stderr: ros_gz_bridge
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libprotobuf.a(arena.o): relocation R_X86_64_TPOFF32 against symbol `_ZN6google8protobuf8internal9ArenaImpl13thread_cache_E' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: failed to set dynamic section sizes: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [CMakeFiles/ros_gz_bridge.dir/build.make:936: libros_gz_bridge.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:183: CMakeFiles/ros_gz_bridge.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed <<< ros_gz_bridge [4min 49s, exited with code 2]
Summary: 2 packages finished [6min 12s]
1 package failed: ros_gz_bridge
1 package had stderr output: ros_gz_bridge
10 packages not processed