Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

humble build failure: undefined reference to `rcl_logging_external_initialize' #15

Closed
fujitatomoya opened this issue Sep 24, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@fujitatomoya
Copy link
Owner

Build Failure with humble source build

colcon build failure stack
root@tomoyafujita:~/ros2_ws/humble_ws# export RCL_LOGGING_IMPLEMENTATION=rcl_logging_syslog
root@tomoyafujita:~/ros2_ws/humble_ws# colcon build --symlink-install --cmake-clean-cache --packages-select rcl_logging_syslog rcl
Starting >>> rcl_logging_syslog
Finished <<< rcl_logging_syslog [0.66s]
Starting >>> rcl
--- stderr: rcl
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_rmw_impl_id_check_exe.dir/build.make:129: test/test_rmw_impl_id_check_exe] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:480: test/CMakeFiles/test_rmw_impl_id_check_exe.dir/all] Error 2
gmake[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_remap__rmw_connextdds.dir/build.make:133: test/test_remap__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:927: test/CMakeFiles/test_remap__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_arguments__rmw_connextdds.dir/build.make:134: test/test_arguments__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:899: test/CMakeFiles/test_arguments__rmw_connextdds.dir/all] Error 2
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_timer__rmw_connextdds.dir/build.make:164: test/test_timer__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:590: test/CMakeFiles/test_timer__rmw_connextdds.dir/all] Error 2
gmake[2]: *** [test/CMakeFiles/test_remap_integration__rmw_connextdds.dir/build.make:157: test/test_remap_integration__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:955: test/CMakeFiles/test_remap_integration__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_context__rmw_connextdds.dir/build.make:165: test/test_context__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:618: test/CMakeFiles/test_context__rmw_connextdds.dir/all] Error 2
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
gmake[2]: *** [test/CMakeFiles/test_time__rmw_connextdds.dir/build.make:164: test/test_time__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:562: test/CMakeFiles/test_time__rmw_connextdds.dir/all] Error 2
gmake[2]: *** [test/CMakeFiles/test_client__rmw_connextdds.dir/build.make:189: test/test_client__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:534: test/CMakeFiles/test_client__rmw_connextdds.dir/all] Error 2
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
gmake[2]: *** [test/CMakeFiles/test_count_matched__rmw_connextdds.dir/build.make:189: test/test_count_matched__rmw_connextdds] Error 1
gmake[2]: *** [test/CMakeFiles/test_node__rmw_connextdds.dir/build.make:166: test/test_node__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:787: test/CMakeFiles/test_count_matched__rmw_connextdds.dir/all] Error 2
gmake[1]: *** [CMakeFiles/Makefile2:871: test/CMakeFiles/test_node__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_lexer__rmw_connextdds.dir/build.make:163: test/test_lexer__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:674: test/CMakeFiles/test_lexer__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
/usr/bin/ld: ../librcl.so: undefined reference to `rcl_logging_external_initialize'
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_get_node_names__rmw_connextdds.dir/build.make:165: test/test_get_node_names__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:646: test/CMakeFiles/test_get_node_names__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_graph__rmw_connextdds.dir/build.make:189: test/test_graph__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:730: test/CMakeFiles/test_graph__rmw_connextdds.dir/all] Error 2
gmake[2]: *** [test/CMakeFiles/test_lexer_lookahead__rmw_connextdds.dir/build.make:165: test/test_lexer_lookahead__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:702: test/CMakeFiles/test_lexer_lookahead__rmw_connextdds.dir/all] Error 2
gmake[2]: *** [test/CMakeFiles/test_init__rmw_connextdds.dir/build.make:165: test/test_init__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:843: test/CMakeFiles/test_init__rmw_connextdds.dir/all] Error 2
collect2: error: ld returned 1 exit status
gmake[2]: *** [test/CMakeFiles/test_get_actual_qos__rmw_connextdds.dir/build.make:189: test/test_get_actual_qos__rmw_connextdds] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:815: test/CMakeFiles/test_get_actual_qos__rmw_connextdds.dir/all] Error 2
gmake: *** [Makefile:146: all] Error 2
---
Failed   <<< rcl [3.95s, exited with code 2]

Summary: 1 package finished [5.56s]
  1 package failed: rcl
  1 package had stderr output: rcl

How to reproduce the issue

  1. apply https://docs.ros.org/en/humble/Installation.html procedure.
  2. apply https://github.com/fujitatomoya/rcl_logging_syslog?tab=readme-ov-file#build procedure
  3. then start building as below.
export RCL_LOGGING_IMPLEMENTATION=rcl_logging_syslog
colcon build --symlink-install --cmake-clean-cache --packages-select rcl_logging_syslog rcl

Note

@fujitatomoya fujitatomoya self-assigned this Sep 24, 2024
@fujitatomoya fujitatomoya added the bug Something isn't working label Sep 24, 2024
@fujitatomoya
Copy link
Owner Author

The root cause is ros2/rcl_logging#109, which actually new feature comes from me and available on Jazzy... 😅 i think we need to have each distro branches, rolling (main), jazzy, iron and humble to support this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant