Build RViz for ROS2 fails, can't find resource_retriever
I've installed ROS2 Eloquent from Debian packages, I now wanted to build RViz in a separate workspace and cloned the eloquent branch from https://github.com/ros2/rviz.git and ran colcon build --merge-install
. It fails when building rviz_rendering
saying
CMake Error at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:72 (add_executable):
Target "wrench_visual_test_target" links to target
"resource_retriever::resource_retriever" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
Call Stack (most recent call first):
/opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:55 (_ament_add_gmock)
CMakeLists.txt:260 (ament_add_gmock)
CMake Error at /opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:72 (add_executable):
Target "line_test_target" links to target
"resource_retriever::resource_retriever" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
Call Stack (most recent call first):
/opt/ros/eloquent/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:55 (_ament_add_gmock)
CMakeLists.txt:249 (ament_add_gmock)
Not sure why it can't find resource_retriever, when I check /opt/ros/eloquent/share/ a resource_retriever directory exists. My ament_cmake_gmock version is
$ apt list ros-eloquent-ament-cmake-gmock
Listing... Done
ros-eloquent-ament-cmake-gmock/bionic,now 0.8.2-1bionic.20200605.223611 amd64 [installed,automatic]
Does someone know how this fix this?