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
I create a node with a custom logging output handler (in this case it should only log to rosout topic).
Actual behavior
The above code doesn't build as I get a linker error:
undefined reference to `rcl_logging_rosout_output_handler'
This function is marked as RCL_PUBLIC, so it should be accessible.
Note that if I comment the following line in rcl/CMakeLists.txt the compilation succeeds.
rcl_set_symbol_visibility_hidden(${PROJECT_NAME} LANGUAGE "C")
Additional notes
On the other hand, the function rcl_logging_rosout_init is marked as RCL_LOCAL, thus it's hidden and I can't use it in my code.
Assuming that the rcl_logging_rosout_output_handler has to be accessible somehow, there should also be a way for checking if it has already been initialized and to initialize it.
Bug report
Required Info:
Steps to reproduce issue
Expected behavior
I create a node with a custom logging output handler (in this case it should only log to
rosout
topic).Actual behavior
The above code doesn't build as I get a linker error:
This function is marked as
RCL_PUBLIC
, so it should be accessible.Note that if I comment the following line in
rcl/CMakeLists.txt
the compilation succeeds.Additional notes
On the other hand, the function
rcl_logging_rosout_init
is marked asRCL_LOCAL
, thus it's hidden and I can't use it in my code.Assuming that the
rcl_logging_rosout_output_handler
has to be accessible somehow, there should also be a way for checking if it has already been initialized and to initialize it.This issue is linked to
https://answers.ros.org/question/329532/ros2-how-to-programmatically-set-rosout-logging-handler/
https://discourse.ros.org/t/set-symbol-visibility-to-hidden-for-rmw-and-rcl-packages/7981/5?u=alsora
The text was updated successfully, but these errors were encountered: