Skip to content

Downstream packages may have ABI issues if GZ_*_VERSION_NAMESPACE is not defined #412

@scpeters

Description

@scpeters

Environment

  • OS Version:
  • Source or binary build?

Description

  • Expected behavior: The GZ_*_VERSION_NAMESPACE macro should be defined in the config.hh.in file for each package
  • Actual behavior: It is not defined in some packages, and then when you add it in, it can change ABI (first noticed in Merge 6 ➡️ 7 gz-physics#594 (comment)

Fixes needed on main

Output

I have several gz-* packages installed on my macOS laptop, and gripping for VERSION_NAMESPACE in the output of nm shows that this macro definition is missing for several packages:

$ for lib in $(ls /usr/local/lib/libgz-* | grep -v '[0-9]\.[0-9]' | grep -v '\.[0-9]*\.dylib' | grep 'libgz-[a-z0-9]*.dylib'); do echo $lib;  nm $lib | c++filt | grep VERSION_NAMESPACE; done
libgz-common5.dylib
libgz-common6.dylib
libgz-gui7.dylib
libgz-gui8.dylib
libgz-gui9.dylib
000000000004a15e T gz::gui::GZ_GUI_VERSION_NAMESPACE::getInstallPrefix()
000000000002791c T gz::gui::GZ_GUI_VERSION_NAMESPACE::getPluginInstallDir()
libgz-launch7.dylib
00000000000045fe T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::Stop()
0000000000003be6 T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::RunConfig(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
0000000000003b26 T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::Manager()
00000000000038e0 T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::Manager()
0000000000003bdc T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::~Manager()
0000000000003b30 T gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Manager::~Manager()
000000000000d4da t gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>::SpecializedPlugin()
000000000000d578 t gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>::~SpecializedPlugin()
000000000000d56a t gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>::~SpecializedPlugin()
000000000000d95e t gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>::TemplatePluginPtr(gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&)
000000000000d468 t gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>::TemplatePluginPtr<gz::plugin::Plugin>(gz::plugin::TemplatePluginPtr<gz::plugin::Plugin> const&)
000000000000d8d0 t gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>::Hash() const
000000000000d924 t gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>::operator==(gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&) const
0000000000007c14 t std::__1::unordered_set<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::hash<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::equal_to<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> gz::plugin::Loader::PluginsImplementing<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>() const
000000000000dacc t void std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::__do_rehash<true>(unsigned long)
0000000000008ed8 t std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::__deallocate_node(std::__1::__hash_node_base<std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>*>*)
000000000000d846 t std::__1::unique_ptr<std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>, std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>>>> std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::__construct_node_hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&>(unsigned long, gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&)
000000000000d5d8 t std::__1::pair<std::__1::__hash_iterator<std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>*>, bool> std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::__emplace_unique_key_args<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&>(gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&, gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>> const&)
0000000000008e8a t std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::clear()
000000000000d9d8 t void std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::__rehash<true>(unsigned long)
0000000000008f16 t std::__1::__hash_table<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, std::__1::hash<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::equal_to<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>, std::__1::allocator<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>>>::~__hash_table()
000000000000dbfc t std::__1::__hash_node_destructor<std::__1::allocator<std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>>>::operator()[abi:v15006](std::__1::__hash_node<gz::plugin::TemplatePluginPtr<gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>>, void*>*)
0000000000010280 S typeinfo for gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>
000000000000f377 S typeinfo name for gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin
000000000000f3a8 S typeinfo name for gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>
0000000000010230 s vtable for gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>
000000000000d5ae t virtual thunk to gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>::~SpecializedPlugin()
000000000000d598 t virtual thunk to gz::plugin::SpecializedPlugin<gz::launch::GZ_LAUNCH_VERSION_NAMESPACE::Plugin>::~SpecializedPlugin()
libgz-math7.dylib
libgz-math8.dylib
libgz-msgs10.dylib
libgz-msgs11.dylib
libgz-msgs9.dylib
libgz-physics6.dylib
0000000000004238 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::checkWindowsPath(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)
000000000000ec40 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getInstallPrefix()
00000000000048f5 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getEngineInstallDir()
000000000000468f T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
0000000000004190 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::separator(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
00000000000047ec t gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)::$_0::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool) const
libgz-physics7.dylib
0000000000004238 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::checkWindowsPath(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)
000000000000ec40 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getInstallPrefix()
00000000000048f5 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getEngineInstallDir()
000000000000468f T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
0000000000004190 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::separator(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
00000000000047ec t gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)::$_0::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool) const
libgz-physics8.dylib
0000000000004228 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::checkWindowsPath(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>)
000000000000ec30 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getInstallPrefix()
00000000000048e5 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::getEngineInstallDir()
000000000000467f T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
0000000000004180 T gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::separator(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)
00000000000047dc t gz::physics::GZ_PHYSICS_VERSION_NAMESPACE::joinPaths(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)::$_0::operator()(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool) const
libgz-plugin2.dylib
libgz-plugin3.dylib
libgz-rendering7.dylib
libgz-rendering8.dylib
libgz-rendering9.dylib
libgz-sensors7.dylib
libgz-sensors8.dylib
libgz-sensors9.dylib
libgz-sim7.dylib
libgz-sim8.dylib
000000000009eef7 t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::msgs::SphericalCoordinates*, gz::math::v7::SphericalCoordinates const&)
000000000002b72b t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::msgs::Inertial*, gz::math::v7::Inertial<double> const&)
00000000000f8688 t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::math::v7::SphericalCoordinates*, gz::msgs::SphericalCoordinates const&)
000000000002c15a t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::math::v7::Inertial<double>*, gz::msgs::Inertial const&)
libgz-sim9.dylib
000000000009e8c7 t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::msgs::SphericalCoordinates*, gz::math::v8::SphericalCoordinates const&)
000000000002b47b t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::msgs::Inertial*, gz::math::v8::Inertial<double> const&)
00000000000f8598 t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::math::v8::SphericalCoordinates*, gz::msgs::SphericalCoordinates const&)
000000000002beaa t gz::msgs::GZ_MSGS_VERSION_NAMESPACE::Set(gz::math::v8::Inertial<double>*, gz::msgs::Inertial const&)
libgz-transport12.dylib
libgz-transport13.dylib
libgz-transport14.dylib
libgz-utils2.dylib
libgz-utils3.dylib

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    In progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions