unitreerobotics / unitree_ros

BSD 3-Clause "New" or "Revised" License
463 stars 224 forks source link

[unitree_ros2] Undefined symbol while compiling cyclonedds #99

Closed cjt0313 closed 2 weeks ago

cjt0313 commented 2 weeks ago

你好,有人能帮忙看一下这个问题吗?感谢! 在编译cyclonedds时候出现这个问题,没有souce ros2 environment, 已进行apt-get dist-upgrade升级

Starting >>> cyclonedds
--- stderr: cyclonedds                             
../../../bin/idlc: symbol lookup error: ../../../bin/idlc: undefined symbol: DDS_XTypes_TypeObject_desc
make[2]: *** [src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/build.make:63: src/tools/ddsperf/ddsperf_types.c] Error 127
make[1]: *** [CMakeFiles/Makefile2:573: src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
---
Failed   <<< cyclonedds [0.57s, exited with code 2]

Summary: 0 packages finished [0.73s]
  1 package failed: cyclonedds
  1 package had stderr output: cyclonedds

=================================== 编译命令 colcon build --packages-select cyclonedds 系统版本: Ubuntu 20.04 ros2: foxy colcon image

下面是更详细的log记录

DEBUG:colcon:Parsed command line arguments: Namespace(allow_overriding=[], ament_cmake_args=None, base_paths=['.'], build_base='build', catkin_cmake_args=None, catkin_skip_building_tests=False, cmake_args=None, cmake_clean_cache=False, cmake_clean_first=False, cmake_force_configure=False, cmake_target=None, cmake_target_skip_unavailable=False, continue_on_error=False, event_handlers=None, executor='parallel', ignore_user_meta=False, install_base='install', log_base=None, log_level=10, main=<bound method BuildVerb.main of <colcon_core.verb.build.BuildVerb object at 0x7f77f0176a00>>, merge_install=False, metas=['./colcon.meta'], packages_above=None, packages_above_and_dependencies=None, packages_above_depth=None, packages_end=None, packages_ignore=None, packages_ignore_regex=None, packages_select=['cyclonedds'], packages_select_build_failed=False, packages_select_by_dep=None, packages_select_regex=None, packages_select_test_failures=False, packages_skip=None, packages_skip_build_finished=False, packages_skip_by_dep=None, packages_skip_regex=None, packages_skip_test_passed=False, packages_skip_up_to=None, packages_start=None, packages_up_to=None, packages_up_to_regex=None, parallel_workers=144, paths=None, symlink_install=False, test_result_base=None, verb_extension=<colcon_core.verb.build.BuildVerb object at 0x7f77f0176a00>, verb_name='build', verb_parser=<colcon_defaults.argument_parser.defaults.DefaultArgumentsDecorator object at 0x7f77f0176e50>)
INFO:colcon.colcon_core.location:Using log path 'log/build_2024-06-14_11-29-55'
[0.223s] INFO:colcon.colcon_core.package_discovery:Crawling recursively for packages in '/home/jintian/code/unitree_ros2/cyclonedds_ws'
[0.248s] DEBUG:colcon.colcon_core.package_identification:Package 'src/cyclonedds' with type 'ros.cmake' and name 'cyclonedds'
[0.250s] DEBUG:colcon.colcon_core.package_identification:Package 'src/rmw_cyclonedds/rmw_cyclonedds_cpp' with type 'ros.ament_cmake' and name 'rmw_cyclonedds_cpp'
[0.251s] DEBUG:colcon.colcon_core.package_identification:Package 'src/unitree/unitree_api' with type 'ros.ament_cmake' and name 'unitree_api'
[0.252s] DEBUG:colcon.colcon_core.package_identification:Package 'src/unitree/unitree_go' with type 'ros.ament_cmake' and name 'unitree_go'
[0.268s] INFO:colcon.colcon_metadata.metadata.colcon_pkg:Updating descriptor of package 'src/cyclonedds' from colcon.pkg: {'cmake-args': ['-DBUILD_IDLC=AUTO']}
[0.268s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'unitree_api' in 'src/unitree/unitree_api'
[0.269s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'unitree_go' in 'src/unitree/unitree_go'
[0.269s] INFO:colcon.colcon_core.package_selection:Skipping not selected package 'rmw_cyclonedds_cpp' in 'src/rmw_cyclonedds/rmw_cyclonedds_cpp'
[0.271s] DEBUG:colcon.colcon_installed_package_information.package_discovery:Found 267 installed packages in /opt/ros/foxy
[0.324s] DEBUG:colcon.colcon_core.verb:Building package 'cyclonedds' with the following arguments: {'ament_cmake_args': None, 'build_base': '/home/jintian/code/unitree_ros2/cyclonedds_ws/build/cyclonedds', 'catkin_cmake_args': None, 'catkin_skip_building_tests': False, 'cmake_args': ['-DBUILD_IDLC=AUTO'], 'cmake_clean_cache': False, 'cmake_clean_first': False, 'cmake_force_configure': False, 'cmake_target': None, 'cmake_target_skip_unavailable': False, 'install_base': '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds', 'merge_install': False, 'path': '/home/jintian/code/unitree_ros2/cyclonedds_ws/src/cyclonedds', 'symlink_install': False, 'test_result_base': None}
[0.324s] INFO:colcon.colcon_core.executor:Executing jobs using 'parallel' executor
[0.325s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete
[0.325s] INFO:colcon.colcon_ros.task.cmake.build:Building ROS package in '/home/jintian/code/unitree_ros2/cyclonedds_ws/src/cyclonedds' with build type 'cmake'
[0.326s] INFO:colcon.colcon_cmake.task.cmake.build:Building CMake package in '/home/jintian/code/unitree_ros2/cyclonedds_ws/src/cyclonedds'
Starting >>> cyclonedds
[0.328s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_core.shell.bat': Not used on non-Windows systems
[0.329s] INFO:colcon.colcon_core.shell:Skip shell extension 'powershell' for command environment: Not usable outside of PowerShell
[0.329s] DEBUG:colcon.colcon_core.shell:Skip shell extension 'dsv' for command environment
[0.349s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoking command in '/home/jintian/code/unitree_ros2/cyclonedds_ws/build/cyclonedds': CMAKE_PREFIX_PATH=/opt/ros/foxy CONDA_PROMPT_MODIFIER=(ros) /usr/bin/cmake --build /home/jintian/code/unitree_ros2/cyclonedds_ws/build/cyclonedds -- -j144 -l144
[0.765s] DEBUG:colcon.colcon_core.event_handler.log_command:Invoked command in '/home/jintian/code/unitree_ros2/cyclonedds_ws/build/cyclonedds' returned '2': CMAKE_PREFIX_PATH=/opt/ros/foxy CONDA_PROMPT_MODIFIER=(ros) /usr/bin/cmake --build /home/jintian/code/unitree_ros2/cyclonedds_ws/build/cyclonedds -- -j144 -l144
[0.847s] INFO:colcon.colcon_core.shell:Creating environment hook '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path.ps1'
[0.850s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path.dsv'
[0.851s] INFO:colcon.colcon_core.shell:Creating environment hook '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path.sh'
[0.862s] INFO:colcon.colcon_core.shell:Creating environment hook '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path_multiarch.ps1'
[0.863s] INFO:colcon.colcon_core.shell:Creating environment descriptor '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path_multiarch.dsv'
[0.863s] INFO:colcon.colcon_core.shell:Creating environment hook '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/hook/pkg_config_path_multiarch.sh'
[0.873s] INFO:colcon.colcon_core.shell:Creating package script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/package.ps1'
[0.875s] INFO:colcon.colcon_core.shell:Creating package descriptor '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/package.dsv'
[0.876s] INFO:colcon.colcon_core.shell:Creating package script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/package.sh'
[0.877s] INFO:colcon.colcon_core.shell:Creating package script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/package.bash'
[0.878s] INFO:colcon.colcon_core.shell:Creating package script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/cyclonedds/share/cyclonedds/package.zsh'
--- stderr: cyclonedds
../../../bin/idlc: symbol lookup error: ../../../bin/idlc: undefined symbol: DDS_XTypes_TypeObject_desc
make[2]: *** [src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/build.make:63: src/tools/ddsperf/ddsperf_types.c] Error 127
make[1]: *** [CMakeFiles/Makefile2:573: src/tools/ddsperf/CMakeFiles/ddsperf_types_generate.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
---
Failed   <<< cyclonedds [0.55s, exited with code 2]
[0.890s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:closing loop
[0.890s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:loop closed
[0.890s] DEBUG:colcon.colcon_parallel_executor.executor.parallel:run_until_complete finished with '2'
[0.891s] DEBUG:colcon.colcon_core.event_reactor:joining thread

Summary: 0 packages finished [0.72s]
  1 package failed: cyclonedds
  1 package had stderr output: cyclonedds
[0.904s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.terminal_notifier': Not used on non-Darwin systems
[0.904s] INFO:colcon.colcon_core.plugin_system:Skipping extension 'colcon_notification.desktop_notification.win32': Not used on non-Windows systems
[0.905s] INFO:colcon.colcon_notification.desktop_notification:Sending desktop notification using 'notify2'
[0.908s] DEBUG:colcon.colcon_notification.desktop_notification.notify2:Failed to initialize notify2: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.Notifications was not provided by any .service files
[0.908s] DEBUG:colcon.colcon_core.event_reactor:joined thread
[0.909s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/local_setup.ps1'
[0.911s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/_local_setup_util_ps1.py'
[0.915s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/setup.ps1'
[0.917s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/local_setup.sh'
[0.919s] INFO:colcon.colcon_core.shell:Creating prefix util module '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/_local_setup_util_sh.py'
[0.920s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/setup.sh'
[0.922s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/local_setup.bash'
[0.923s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/setup.bash'
[0.926s] INFO:colcon.colcon_core.shell:Creating prefix script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/local_setup.zsh'
[0.927s] INFO:colcon.colcon_core.shell:Creating prefix chain script '/home/jintian/code/unitree_ros2/cyclonedds_ws/install/setup.zsh