ros2 / rmw_dds_common

Apache License 2.0
11 stars 20 forks source link

'rosidl_typesupport_cpp' not found building rmw_dds_common via colcon #64

Open mpconte opened 2 years ago

mpconte commented 2 years ago

Bug report

Steps to reproduce issue

After running rosdep install with the following dependencies:

repositories:
  ament_cmake:
    type: git
    url: https://github.com/ament/ament_cmake.git
    version: humble
  ament_cmake_ros:
    type: git
    url: https://github.com/ros2/ament_cmake_ros.git
    version: humble
  ament_index:
    type: git
    url: https://github.com/ament/ament_index.git
    version: humble
  ament_lint:
    type: git
    url: https://github.com/ament/ament_lint.git
    version: humble
  ament_package:
    type: git
    url: https://github.com/ament/ament_package.git
    version: humble
  common_interfaces:
    type: git
    url: https://github.com/ros2/common_interfaces.git
    version: humble
  cyclonedds:
    type: git
    url: https://github.com/eclipse-cyclonedds/cyclonedds.git
    version: releases/0.10.x
  libstatistics_collector:
    type: git
    url: https://github.com/ros-tooling/libstatistics_collector.git
    version: humble
  libyaml_vendor:
    type: git
    url: https://github.com/ros2/libyaml_vendor.git
    version: humble
  mimick_vendor:
    type: git
    url: https://github.com/ros2/mimick_vendor.git
    version: humble
  osrf_testing_tools_cpp:
    type: git
    url: https://github.com/osrf/osrf_testing_tools_cpp.git
    version: master
  rcl:
    type: git
    url: https://github.com/ros2/rcl.git
    version: humble
  rcl_interfaces:
    type: git
    url: https://github.com/ros2/rcl_interfaces.git
    version: humble
  rcl_logging:
    type: git
    url: https://github.com/ros2/rcl_logging.git
    version: humble
  rclcpp:
    type: git
    url: https://github.com/ros2/rclcpp.git
    version: humble
  rcpputils:
    type: git
    url: https://github.com/ros2/rcpputils.git
    version: humble
  rcutils:
    type: git
    url: https://github.com/ros2/rcutils.git
    version: humble
  rmw:
    type: git
    url: https://github.com/ros2/rmw.git
    version: humble
  rmw_cyclonedds:
    type: git
    url: https://github.com/ros2/rmw_cyclonedds.git
    version: humble
  rmw_dds_common:
    type: git
    url: https://github.com/ros2/rmw_dds_common.git
    version: humble
  rmw_implementation:
    type: git
    url: https://github.com/ros2/rmw_implementation.git
    version: humble
  ros2_tracing:
    type: git
    url: https://github.com/ros2/ros2_tracing.git
    version: humble
  rosidl:
    type: git
    url: https://github.com/ros2/rosidl.git
    version: humble
  rosidl_defaults:
    type: git
    url: https://github.com/ros2/rosidl_defaults.git
    version: humble
  rosidl_typesupport:
    type: git
    url: https://github.com/ros2/rosidl_typesupport.git
    version: humble
  test_interface_files:
    type: git
    url: https://github.com/ros2/test_interface_files.git
    version: humble
  unique_identifier_msgs:
    type: git
    url: https://github.com/ros2/unique_identifier_msgs.git
    version: humble
# Hand made
  rcl_logging_android:
    type: git
    url: https://github.com/sloretz/rcl_logging_android.git
    version: main

Then after running the colcon command to build relevant dependencies as such:

colcon build --cmake-args -DCMAKE_SYSTEM_NAME=Android -DCMAKE_SYSTEM_VERSION=30 -DANDROID_NATIVE_API_LEVEL=30 -DCMAKE_ANDROID_NDK=/mnt/d/android-sdk/ndk/25.1.8937393 -DCMAKE_ANDROID_ARCH_ABI=arm64-v8a -DANDROID_PLATFORM=30 -DCMAKE_TOOLCHAIN_FILE=/mnt/d/android-sdk/ndk/25.1.8937393/build/cmake/android.toolchain.cmake -DCMAKE_FIND_ROOT_PATH="/mnt/d/ros2-humble/install/ament_cmake_core/share/ament_cmake_core;/mnt/d/ros2-humble/install/ament_cmake_python/share/ament_cmake_python/cmake;/mnt/d/ros2-humble/install/osrf_testing_tools_cpp/share/osrf_testing_tools_cpp/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_dependencies/share/ament_cmake_export_dependencies/cmake;/mnt/d/ros2-humble/install/ament_cmake_test/share/ament_cmake_test/cmake;/mnt/d/ros2-humble/install/ament_cmake_lint_cmake/share/ament_cmake_lint_cmake/cmake;/mnt/d/ros2-humble/install/ament_cmake_gtest/share/ament_cmake_gtest/cmake;/mnt/d/ros2-humble/install/ament_cmake_copyright/share/ament_cmake_copyright/cmake;/mnt/d/ros2-humble/install/ament_cmake/share/ament_cmake/cmake;/mnt/d/ros2-humble/install/ament_cmake_libraries/share/ament_cmake_libraries/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_definitions/share/ament_cmake_export_definitions/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_include_directories/share/ament_cmake_export_include_directories/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_interfaces/share/ament_cmake_export_interfaces/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_libraries/share/ament_cmake_export_libraries/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_link_flags/share/ament_cmake_export_link_flags/cmake;/mnt/d/ros2-humble/install/ament_cmake_export_targets/share/ament_cmake_export_targets/cmake;/mnt/d/ros2-humble/install/ament_cmake_gen_version_h/share/ament_cmake_gen_version_h/cmake;/mnt/d/ros2-humble/install/ament_cmake_target_dependencies/share/ament_cmake_target_dependencies/cmake;/mnt/d/ros2-humble/install/ament_cmake_include_directories/share/ament_cmake_include_directories/cmake;/mnt/d/ros2-humble/install/ament_cmake_version/share/ament_cmake_version/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_core/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_python/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_test/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_dependencies/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_gtest/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_lint_cmake/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_copyright/cmake;/mnt/d/ros2-humble/install/share/ament_cmake/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_libraries/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_definitions/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_include_directories/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_interfaces/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_libraries/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_link_flags/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_export_targets/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_gen_version_h/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_target_dependencies/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_include_directories/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_version/cmake;/mnt/d/ros2-humble/install/share/ament_lint_auto/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_pytest/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_ros/cmake;/mnt/d/ros2-humble/install/share/ament_cmake_gmock/cmake;/mnt/d/performance_test_fixture/build/ament_cmake_core;/mnt/d/performance_test_fixture/build/ament_cmake_export_targets;/mnt/d/ros2-humble/install/share/rcutils/cmake;/mnt/d/ros2-humble/install/share/rosidl_typesupport_interface/cmake;/mnt/d/ros2-humble/install/share/rosidl_runtime_c/cmake;/mnt/d/ros2-humble/install/share/rcl_logging_interface/cmake;/mnt/d/ros2-humble/install/share/rcpputils/cmake;/mnt/d/ros2-humble/install/share/rosidl_runtime_cpp/cmake;/mnt/d/ros2-humble/install/share/rmw/cmake;/mnt/d/ros2-humble/install/share/rosidl_typesupport_c/cmake;/mnt/d/ros2-humble/install/share/rosidl_default_generators/cmake;/mnt/d/ros2-humble/install/share/rosidl_cmake/cmake;/mnt/d/ros2-humble/install/share/rosidl_adapter/cmake;/mnt/d/ros2-humble/install/share/rosidl_generator_c/cmake;/mnt/d/ros2-humble/install/share/rosidl_typesupport_cpp/cmake" -DBUILD_TESTING=OFF --merge-install --cmake-clean-cache --cmake-clean-first --packages-skip-build-finished --packages-skip mimick_vendor rcl_logging_spdlog rcl_interfaces builtin_interfaces rosgraph_msgs statistics_msgs std_msgs unique_identifier_msgs action_msgs test_msgs --packages-up-to rclcpp

Expected behavior

I expect rmw_dds_common to build successfully

Actual behavior


--- stderr: rmw_dds_common
CMake Error at /mnt/d/ros2-humble/install/share/rosidl_typesupport_c/cmake/get_used_typesupports.cmake:35 (message):
  No 'rosidl_typesupport_cpp' found
Call Stack (most recent call first):
  /mnt/d/ros2-humble/install/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cpp-extras.cmake:8 (get_used_typesupports)
  /mnt/d/ros2-humble/install/share/rosidl_typesupport_cpp/cmake/rosidl_typesupport_cppConfig.cmake:41 (include)
  /mnt/d/ros2-humble/install/share/rosidl_default_generators/cmake/rosidl_default_generators-extras.cmake:21 (find_package)
  /mnt/d/ros2-humble/install/share/rosidl_default_generators/cmake/rosidl_default_generatorsConfig.cmake:41 (include)
  CMakeLists.txt:18 (find_package)

---
Failed   <<< rmw_dds_common [12min 24s, exited with code 1]

Summary: 0 packages finished [12min 29s]
  1 package failed: rmw_dds_common
  1 package had stderr output: rmw_dds_common

Additional information

Ryanf55 commented 1 month ago

I got a similar error:

--- stderr: rmw_dds_common
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
rmw_dds_common__rosidl_typesupport_cpp
    linked by target "rmw_dds_common_library" in directory /workspaces/spotredge/.devcontainer/ubuntu20.04/ros2/rmw_dds_common/rmw_dds_common

CMake Generate step failed.  Build files cannot be regenerated correctly.
---
Failed   <<< rmw_dds_common [1.25s, exited with code 1]

This is missing from the CMakeLists I think: find_package(rosidl_typesupport_cpp REQUIRED)

I found it building up a custom focal deployment with this repos file:

repositories:
  ament/ament_cmake:
    type: git
    url: https://github.com/ament/ament_cmake.git
    version: humble
  ament/ament_index:
    type: git
    url: https://github.com/ament/ament_index.git
    version: humble
  ament/ament_lint:
    type: git
    url: https://github.com/ament/ament_lint.git
    version: humble
  ament/ament_package:
    type: git
    url: https://github.com/ament/ament_package.git
    version: humble
  build/libyaml_vendor/libyaml-0.2.5-prefix/src/libyaml-0.2.5:
    type: git
    url: https://github.com/yaml/libyaml.git
    version: 2c891fc7a770e8ba2fec34fc6b545c672beb37e6
  build/mcap_vendor/_deps/lz4-src:
    type: git
    url: https://github.com/lz4/lz4.git
    version: d44371841a2f1728a3f36839fd4b7e872d0927d3
  build/zstd_vendor/zstd-1.4.4-prefix/src/zstd-1.4.4:
    type: git
    url: https://github.com/facebook/zstd.git
    version: 10f0e6993f9d2f682da6d04aa2385b7d53cbb4ee
  ros-tooling/libstatistics_collector:
    type: git
    url: https://github.com/ros-tooling/libstatistics_collector.git
    version: humble
  ros2/ament_cmake_ros:
    type: git
    url: https://github.com/ros2/ament_cmake_ros.git
    version: humble
  ros2/common_interfaces:
    type: git
    url: https://github.com/ros2/common_interfaces.git
    version: humble
  ros2/libyaml_vendor:
    type: git
    url: https://github.com/ros2/libyaml_vendor.git
    version: humble
  ros2/rcl:
    type: git
    url: https://github.com/ros2/rcl.git
    version: humble
  ros2/rcl_interfaces:
    type: git
    url: https://github.com/ros2/rcl_interfaces.git
    version: humble
  ros2/rcl_logging:
    type: git
    url: https://github.com/ros2/rcl_logging.git
    version: humble
  ros2/rclcpp:
    type: git
    url: https://github.com/ros2/rclcpp.git
    version: humble
  ros2/rcpputils:
    type: git
    url: https://github.com/ros2/rcpputils.git
    version: humble
  ros2/rcutils:
    type: git
    url: https://github.com/ros2/rcutils.git
    version: humble
  ros2/rmw:
    type: git
    url: https://github.com/ros2/rmw.git
    version: humble
  ros2/rmw_dds_common:
    type: git
    url: https://github.com/ros2/rmw_dds_common.git
    version: humble
  ros2/rmw_fastrtps:
    type: git
    url: https://github.com/ros2/rmw_fastrtps.git
    version: humble
  ros2/rmw_implementation:
    type: git
    url: https://github.com/ros2/rmw_implementation.git
    version: humble
  ros2/rosbag2:
    type: git
    url: https://github.com/ros2/rosbag2.git
    version: humble
  ros2/rosidl:
    type: git
    url: https://github.com/ros2/rosidl.git
    version: humble
  ros2/rosidl_defaults:
    type: git
    url: https://github.com/ros2/rosidl_defaults.git
    version: humble
  ros2/spdlog_vendor:
    type: git
    url: https://github.com/ros2/spdlog_vendor.git
    version: humble
  ros2/test_interface_files:
    type: git
    url: https://github.com/ros2/test_interface_files.git
    version: humble
  ros2/unique_identifier_msgs:
    type: git
    url: https://github.com/ros2/unique_identifier_msgs.git
    version: humble
clalancette commented 1 month ago

This is missing from the CMakeLists I think: find_package(rosidl_typesupport_cpp REQUIRED)

Yeah, probably. There are a few other places around the core which is missing that as well. If you'd like to open a PR to add that, I'd be happy to review it.