You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi! When converting nodes to components i found myself running into linker issues of undefined symbols at runtime, which would otherwise occur at compile/link time.
to the rclcpp_components_register_node macro, to ensure there are no undefined symbols when the generated executable is run or the component is loaded into a container later.
I'm unsure of the consequences, or if there are valid use cases for having undefined references in the component library, which is why i want to open this for discussion here first before making a PR. Please let me know if you know of any.
I think users of rclcpp_components_register_node would expect to be able to use the generated executable, which would require this anyways.
The text was updated successfully, but these errors were encountered:
It does seem like this would help a class of runtime errors that would be compile/link time errors if you were, for instance, building an executable.
if there are valid use cases for having undefined references in the component library
I think there are cases, but they would be the rare exception and not the rule. You can use weak symbols (https://en.wikipedia.org/wiki/Weak_symbol), but this isn't a commonly-used thing that I'm aware of.
Since it could have potential impact, I think that we could tick-tock it:
Add an-opt in mechanism to the rclcpp_components_register_node and leave it off by default.
Turn the opt-in mechanism on in all of the core places (just to see what happens)
If there aren't any crazy user-facing impacts, turn it on by default at a later date.
Hi! When converting nodes to components i found myself running into linker issues of undefined symbols at runtime, which would otherwise occur at compile/link time.
I suggest adding
to the
rclcpp_components_register_node
macro, to ensure there are no undefined symbols when the generated executable is run or the component is loaded into a container later.I'm unsure of the consequences, or if there are valid use cases for having undefined references in the component library, which is why i want to open this for discussion here first before making a PR. Please let me know if you know of any.
I think users of
rclcpp_components_register_node
would expect to be able to use the generated executable, which would require this anyways.The text was updated successfully, but these errors were encountered: