ros2/rosbag2

error: ament_cmake_vendor_package not found when building from source

kanbarrera opened this issue · 1 comments

Description

when trying to build the rosbag2 repo (latest release) from source (following this or this), I encounter the following cmake error when running colcon build (yes, I have sourced setup.bash):

--- stderr: zstd_vendor                                                                                                                                              
CMake Error at CMakeLists.txt:5 (find_package):
  By not providing "Findament_cmake_vendor_package.cmake" in
  CMAKE_MODULE_PATH this project has asked CMake to find a package
  configuration file provided by "ament_cmake_vendor_package", but CMake did
  not find one.

  Could not find a package configuration file provided by
  "ament_cmake_vendor_package" with any of the following names:

    ament_cmake_vendor_packageConfig.cmake
    ament_cmake_vendor_package-config.cmake

  Add the installation prefix of "ament_cmake_vendor_package" to
  CMAKE_PREFIX_PATH or set "ament_cmake_vendor_package_DIR" to a directory
  containing one of the above files.  If "ament_cmake_vendor_package"
  provides a separate development package or SDK, be sure it has been
  installed.

I see that zstd_vendor (but also sqlite3_vendor, liblz4_vendor,...) requires ament_cmake_vendor_package, and I see that ament_cmake_vendor_package is present in the ament_cmake repo, but I don't have ament_cmake_vendor_package and cannot install it using apt.

To Reproduce

I tried installing rosbag2 from source (colcon build with and without --merge-install) with and without a ros2 version already installed, and using jazzy or rolling distro (latest release) for both rosbag2 and ros2, also trying with ubuntu 20.04, 22.04, and 24.04, within docker containers (with osrf/ros:jazzy-desktop or osrf/ros:rolling-desktop images), but I always encounter the same error.


For sure I am doing something wrong, but what?

Please open questions like this on https://robotics.stackexchange.com/questions/tagged/ros, which is our central Question and Answer site. You'll get a better answer there, and it will be searchable for the future.

Make sure to include a lot of information on what platform you are using, which ROS distribution you are using, and the exact steps you took.