Description of problem: When compiling ROS (http://www.ros.org), the following error happens when compiling a component which requires gazebo: /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::printVersion()' /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::addPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<boost::shared_ptr<gazebo::SystemPlugin>, std::allocator<boost::shared_ptr<gazebo::SystemPlugin> > >&)' /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::setup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, char**, std::vector<boost::shared_ptr<gazebo::SystemPlugin>, std::allocator<boost::shared_ptr<gazebo::SystemPlugin> > >&)' After removing the -fvisibility=hidden flag from CMakeLists.txt of Gazebo and rebuild the RPM, the bug is solved. Version-Release number of selected component (if applicable): gazebo-6.5.1-4.fc24 How reproducible: Always Steps to Reproduce: 1. Install gazebo and other dependencies for ROS. 2. Download ROS source code. 3. Compile ROS Actual results: Fail to compile, the following error happens: /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::printVersion()' /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::addPlugin(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<boost::shared_ptr<gazebo::SystemPlugin>, std::allocator<boost::shared_ptr<gazebo::SystemPlugin> > >&)' /usr/lib64/player/libgazebo_player.so: undefined reference to `gazebo_shared::setup(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, int, char**, std::vector<boost::shared_ptr<gazebo::SystemPlugin>, std::allocator<boost::shared_ptr<gazebo::SystemPlugin> > >&)' Expected results: Compiles successfully Additional info: There is another bug of the cmake script of gazebo which lacks the "/usr/lib64/player" library directory, which causes the libgazebo_player.so cannot be found.
Thanks for the report. I'm pretty sure the root cause of the problem is that gazebo-config.cmake is including gazebo_player in its list of gazebo libraries. gazebo_player is a plugin library meant to be dlopened by Player at runtime; it shouldn't ever be linked to anything building against gazebo. I moved libgazebo_player to Player's private plugin folder (/usr/lib64/player) for that reason, but didn't remove a reference to gazebo_player in Gazebo's CMakeLists.txt (which resulted in it being added to gazebo-config.cmake) The fact that gazebo_player is trying to access private symbols is also a bug, and prevents it from being dlopened by Player. I was able to reproduce what you're seeing with libgazebo_player: $ ldd -r /usr/lib64/player/libgazebo_player.so |grep undefined undefined symbol: _ZNK5boost16re_detail_10600031cpp_regex_traits_implementationIcE17transform_primaryEPKcS4_ (/lib64/libsdformat.so.3) undefined symbol: _ZNK5boost16re_detail_10600031cpp_regex_traits_implementationIcE9transformEPKcS4_ (/lib64/libsdformat.so.3) undefined symbol: _ZN6gazebo7physics10init_worldEN5boost10shared_ptrINS0_5WorldEEE (/usr/lib64/player/libgazebo_player.so) undefined symbol: _ZN6gazebo7physics4loadEv (/usr/lib64/player/libgazebo_player.so) undefined symbol: _ZN6gazebo7physics10load_worldEN5boost10shared_ptrINS0_5WorldEEENS2_IN3sdf7ElementEEE (/usr/lib64/player/libgazebo_player.so)... The first bug is easy to fix - I will verify that gazebo_player is removed from gazebo-config.cmake and push an update. The second problem is less straightforward, I will coordinate with upstream and make sure the symbols gazebo_player is using are visible. Gazebo and sdformat are also both affected by rhbz#1331983 which I just discovered, so I need to rebuilt sdformat as well.
gazebo-6.5.1-5.fc24 sdformat-3.7.0-4.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2016-3074c529e4
gazebo-6.5.1-5.fc24, sdformat-3.7.0-4.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-3074c529e4
gazebo-6.5.1-5.fc24, sdformat-3.7.0-4.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.