Skip to content

Commit e6f500e

Browse files
authored
nav2_rviz_plugins: Remove slots without implementation (ros-navigation#4974)
Without this change, when compiled for Jazzy with Nix using gcc14 and qt-5.15, loading the plugins to rviz fails with the following error: [rviz2]: PluginlibFactory: The plugin for class 'nav2_rviz_plugins/Navigation 2' failed to load. Error: Failed to load library /nix/store/...-ros-env/lib/libnav2_rviz_plugins.so. Make sure that you are calling the PLUGINLIB_EXPORT_CLASS macro in the library code, and that names are consistent between this macro and your XML. Error string: Could not load library dlopen error: /nix/store/...-ros-env/lib/libnav2_rviz_plugins.so: undefined symbol: _ZN17nav2_rviz_plugins12DockingPanel9onStartupEv, at /build/rcutils-release-release-jazzy-rcutils-6.7.2-1/src/shared_library.c:99 The dynamic linker complains about undefined symbol, which corresponds to a Qt slot, which is declared, but has no implementation. I'm not sure what is the root cause of this behavior, but removing the slot definitions fixes the problem and the plugins can be loaded. Signed-off-by: Michal Sojka <michal.sojka@cvut.cz>
1 parent 8dde70c commit e6f500e

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

‎nav2_rviz_plugins/include/nav2_rviz_plugins/costmap_cost_tool.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ class CostmapCostTool : public rviz_common::Tool
4646
void handleGlobalCostResponse(rclcpp::Client<nav2_msgs::srv::GetCosts>::SharedFuture);
4747

4848
private Q_SLOTS:
49-
void updateAutoDeactivate();
5049

5150
private:
5251
rclcpp::Client<nav2_msgs::srv::GetCosts>::SharedPtr local_cost_client_;

‎nav2_rviz_plugins/include/nav2_rviz_plugins/docking_panel.hpp‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ class DockingPanel : public rviz_common::Panel
5757

5858
private Q_SLOTS:
5959
void startThread();
60-
void onStartup();
6160
void onDockingButtonPressed();
6261
void onUndockingButtonPressed();
6362
void onCancelDocking();

0 commit comments

Comments
 (0)