Ask Your Question
0

Build RViz for ROS2 fails, can't find resource_retriever

asked 2020-09-04 03:32:00 -0500

eloquent-fox gravatar image

updated 2020-09-04 04:26:17 -0500

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-09-15 09:48:54 -0500

eloquent-fox gravatar image

Answering my own question: The gmock library was not installed on my computer. After making sure that libgmock.a is in /usr/lib, it worked.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2020-09-04 03:32:00 -0500

Seen: 31 times

Last updated: Sep 15