/librmw_cyclonedds_cpp.so: undefined reference to `dds_data_allocator_init_heap'

asked 2021-11-24 20:57:15 -0500

Rongcai gravatar image

updated 2021-11-25 17:42:22 -0500

Geoff gravatar image

Hello there,

I pulled the latest galactic code from github and built again. Below is the issue I have ran into. Any idea about how to resolve it?

--- stderr: rcl                                                                                         
/usr/bin/ld: /home/super/ros2_galactic_src/install/rmw_cyclonedds_cpp/lib/librmw_cyclonedds_cpp.so: undefined reference to `dds_data_allocator_init_heap'
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/test_namespace__rmw_cyclonedds_cpp.dir/build.make:145: test/test_namespace__rmw_cyclonedds_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1138: test/CMakeFiles/test_namespace__rmw_cyclonedds_cpp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

[0.927s] [ 16%] ^[[32m^[[1mLinking CXX executable client_fixture__rmw_fastrtps_dynamic_cpp^[[0m
[1.170s] /usr/bin/ld: /home/super/ros2_galactic_src/install/rcl_logging_spdlog/lib/librcl_logging_spdlog.so: undefined reference to `spdlog::details::log_msg::log_msg(spdlog::source_loc, fmt::v6::basic_string_view<char>, spdlog::level::level_enum, fmt::v6::basic_string_view<char>)'
[1.173s] collect2: error: ld returned 1 exit status
[1.173s] make[2]: *** [test/CMakeFiles/client_fixture__rmw_fastrtps_dynamic_cpp.dir/build.make:172: test/client_fixture__rmw_fastrtps_dynamic_cpp] Error 1
[1.173s] make[1]: *** [CMakeFiles/Makefile2:531: test/CMakeFiles/client_fixture__rmw_fastrtps_dynamic_cpp.dir/all] Error 2
[1.177s] make: *** [Makefile:141: all] Error 2
@

**

put the content from stdout_stderr.log

**

[ 14%] Built target rcl
[ 15%] Built target gtest
[ 16%] Built target gtest_main
[ 17%] Built target client_fixture__rmw_fastrtps_dynamic_cpp
[ 18%] Built target service_fixture__rmw_fastrtps_dynamic_cpp
[ 19%] Built target test_network_flow_endpoints__rmw_fastrtps_dynamic_cpp
[ 20%] Built target test_security
[ 21%] Built target test_rmw_impl_id_check_func__rmw_fastrtps_dynamic_cpp
[ 22%] Built target test_wait__rmw_fastrtps_dynamic_cpp
[ 23%] Built target test_subscription__rmw_fastrtps_dynamic_cpp
[ 25%] Built target test_service__rmw_fastrtps_dynamic_cpp
[ 26%] Built target test_publisher__rmw_fastrtps_dynamic_cpp
[ 27%] Built target test_remap_integration__rmw_fastrtps_dynamic_cpp
[ 28%] Built target test_remap__rmw_fastrtps_dynamic_cpp
[ 29%] Built target test_arguments__rmw_fastrtps_dynamic_cpp
[ 30%] Built target test_count_matched__rmw_fastrtps_dynamic_cpp
[ 31%] Built target test_info_by_topic__rmw_fastrtps_dynamic_cpp
[ 32%] Built target test_graph__rmw_fastrtps_dynamic_cpp
[ 32%] Built target test_lexer__rmw_fastrtps_dynamic_cpp
[ 33%] Built target test_guard_condition__rmw_fastrtps_dynamic_cpp
[ 34%] Built target test_get_node_names__rmw_fastrtps_dynamic_cpp
[ 35%] Built target test_logging_rosout__rmw_fastrtps_dynamic_cpp
[ 35%] Built target test_timer__rmw_fastrtps_dynamic_cpp
[ 36%] Built target test_expand_topic_name
[ 37%] ^[[32m^[[1mLinking CXX executable test_namespace__rmw_cyclonedds_cpp^[[0m
/usr/bin/ld: /home/super/ros2_galactic_src/install/rmw_cyclonedds_cpp/lib/librmw_cyclonedds_cpp.so: undefined reference to `dds_data_allocator_init_heap'
collect2: error: ld returned 1 exit status
make[2]: *** [test/CMakeFiles/test_namespace__rmw_cyclonedds_cpp.dir/build.make:145: test/test_namespace__rmw_cyclonedds_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1138: test/CMakeFiles/test_namespace__rmw_cyclonedds_cpp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
~
edit retag flag offensive close merge delete

Comments

I have checked the so file and doubt the libddsc.so isn't found according to below infomation. super@u20base:~/ros2_galactic_src$ nm /home/super/ros2_galactic_src/install/rmw_cyclonedds_cpp/lib/librmw_cyclonedds_cpp.so | grep dds_data_allocator_init_heap U dds_data_allocator_init_heap

However I have checked and foud libddsc.so already there like below:

./build/cyclonedds/CMakeFiles/Export/lib/cmake/CycloneDDS/libddsc.so ./build/cyclonedds/lib/libddsc.so

Look forward any comments for this issue. Many thanks in advance!

Rongcai gravatar image Rongcai  ( 2021-11-27 04:23:45 -0500 )edit