-
Notifications
You must be signed in to change notification settings - Fork 257
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
[rosbag2_storage_mcap] Bugs in generated CMake targets? #1492
Comments
@EricCousineau-TRI I've briefly checked CMake.txt file for the rosbag2/rosbag2_storage_mcap/CMakeLists.txt Lines 23 to 42 in 0b4deb3
I don't remember that we promised that any of ROS2 core packages would compile with the plain |
Actually, this has to work; that is how the buildfarm produces binary packages (it does not use So it is curious that doing it "by hand" this way doesn't work. It probably needs a bit more debugging to see what is going on here. |
@MichaelOrlov The CMakeLists.txt you pointed out I believe is relevant for source builds, but not for consuming binaries installs of I am able to reproduce this in a minimal colcon setup, which effectively shows the same behavior: rm -rf /tmp/colcon-example && mkdir /tmp/colcon-example && cd /tmp/colcon-example
mkdir -p src/example
cat > src/example/CMakeLists.txt <<'EOF'
cmake_minimum_required(VERSION 3.14)
project(example)
find_package(ament_cmake REQUIRED)
find_package(rosbag2_storage_mcap REQUIRED)
file(WRITE empty.cc "")
add_library(${PROJECT_NAME} SHARED empty.cc)
ament_target_dependencies(${PROJECT_NAME} rosbag2_storage_mcap)
target_link_libraries(${PROJECT_NAME} rosbag2_storage_mcap)
ament_package()
EOF
cat > src/example/package.xml <<'EOF'
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>example</name>
<version>0.0.1</version>
<description>thing</description>
<maintainer email="[email protected]">Meh</maintainer>
<license>Apache-2.0</license>
<buildtool_depend>ament_cmake</buildtool_depend>
<depend>rosbag2_storage_map</depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>
EOF
source /opt/ros/humble/setup.bash
colcon build |
@EricCousineau-TRI Thanks for trying to reproduce with colcon build. rosbag2/rosbag2_storage_mcap/CMakeLists.txt Lines 111 to 115 in 0b4deb3
Perhaps the fix would be to add missing mcap_vendor and pluginlib to the ament_export_dependencies .
The reason why it works in CI and other workflow is that we are using |
I openned a PR #1496 |
The PR was merged and backported to |
Description
Unable to depend on
rosbag2_storage_mcap
via CMake / ament.Expected Behavior
It should work.
Actual Behavior
We get the following errors:
To Reproduce
Install ROS 2 Humble on Ubuntu 22.04.
Then run the following:
System (please complete the following information)
0.15.8-1jammy.20230919.224231
Additional context
Root cause of RobotLocomotion/drake-ros#315
Workaround in RobotLocomotion/drake-ros#316
The text was updated successfully, but these errors were encountered: