0
$\begingroup$

I build rviz of version 8.2.8 for ros2 arm64 versino in a docker with image ros:foxy --platform=arm64 (from https://discourse.ros.org/t/announcing-ros-foxy-docker-images-availability/14511), and after I fix some errors due to lack of third-party libraries, I am stucked in the following errors:

root@9e1882f604d9:/home/michael/work/src/rviz2# colcon build --merge-install
Starting >>> rviz_assimp_vendor
Starting >>> rviz_ogre_vendor
Finished <<< rviz_assimp_vendor [2.63s]
Finished <<< rviz_ogre_vendor [2.69s]
Starting >>> rviz_rendering
--- stderr: rviz_rendering
CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "point_cloud_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:186 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "wrench_visual_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:271 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "string_helper_test" links to target "rviz_ogre_vendor::OgreOverlay"
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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:181 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "point_cloud_renderable_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:198 (ament_add_gmock)

CMake Error at CMakeLists.txt:171 (add_library):
Target "rviz_rendering_test_utils" links to target
"rviz_ogre_vendor::OgreOverlay" but the target was not found. Perhaps a
find_package() call is missing for an IMPORTED target, or an ALIAS target
is missing?

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "billboard_line_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:210 (ament_add_gmock)

CMake Error at CMakeLists.txt:67 (add_library):
Target "rviz_rendering" links to target "rviz_ogre_vendor::OgreOverlay" but
the target was not found. Perhaps a find_package() call is missing for an
IMPORTED target, or an ALIAS target is missing?

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "covariance_visual_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:222 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "grid_test_target" links to target "rviz_ogre_vendor::OgreOverlay"
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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:234 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "movable_text_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:246 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "movable_text_test_target" links to target
"rviz_ogre_vendor::OgreOverlay" 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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:246 (ament_add_gmock)

CMake Error at /opt/ros/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:69 (add_executable):
Target "line_test_target" links to target "rviz_ogre_vendor::OgreOverlay"
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/foxy/share/ament_cmake_gmock/cmake/ament_add_gmock.cmake:52 (_ament_add_gmock)
CMakeLists.txt:259 (ament_add_gmock)

CMake Generate step failed. Build files cannot be regenerated correctly.

Failed <<< rviz_rendering [3.88s, exited with code 1]

Summary: 2 packages finished [7.82s]
1 package failed: rviz_rendering
1 package had stderr output: rviz_rendering
5 packages not processed

I installed may packages of ros-ament-*, but can't fix them.

root@9e1882f604d9:/home/michael/work/src/rviz2# apt list ros-*-ament* | grep installed
ros-foxy-ament-cmake-auto/focal,now 0.9.12-1focal.20230527.034115 arm64 [installed,automatic]
ros-foxy-ament-cmake-copyright/focal,now 0.9.8-1focal.20230527.040734 arm64 [installed,automatic]
ros-foxy-ament-cmake-core/focal,now 0.9.12-1focal.20230527.032629 arm64 [installed,automatic]
ros-foxy-ament-cmake-cppcheck/focal,now 0.9.8-1focal.20230527.041005 arm64 [installed,automatic]
ros-foxy-ament-cmake-cpplint/focal,now 0.9.8-1focal.20230527.044538 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-definitions/focal,now 0.9.12-1focal.20230527.033821 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-dependencies/focal,now 0.9.12-1focal.20230527.033904 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-include-directories/focal,now 0.9.12-1focal.20230527.033816 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-interfaces/focal,now 0.9.12-1focal.20230527.033600 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-libraries/focal,now 0.9.12-1focal.20230527.033536 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-link-flags/focal,now 0.9.12-1focal.20230527.033819 arm64 [installed,automatic]
ros-foxy-ament-cmake-export-targets/focal,now 0.9.12-1focal.20230527.033602 arm64 [installed,automatic]
ros-foxy-ament-cmake-flake8/focal,now 0.9.8-1focal.20230527.041059 arm64 [installed,automatic]
ros-foxy-ament-cmake-gmock/focal,now 0.9.12-1focal.20230527.040917 arm64 [installed,automatic]
ros-foxy-ament-cmake-gtest/focal,now 0.9.12-1focal.20230527.040644 arm64 [installed,automatic]
ros-foxy-ament-cmake-include-directories/focal,now 0.9.12-1focal.20230527.033849 arm64 [installed,automatic]
ros-foxy-ament-cmake-libraries/focal,now 0.9.12-1focal.20230527.033841 arm64 [installed,automatic]
ros-foxy-ament-cmake-lint-cmake/focal,now 0.9.8-1focal.20230527.040626 arm64 [installed,automatic]
ros-foxy-ament-cmake-pep257/focal,now 0.9.8-1focal.20230527.041105 arm64 [installed,automatic]
ros-foxy-ament-cmake-pytest/focal,now 0.9.12-1focal.20230527.043854 arm64 [installed,automatic]
ros-foxy-ament-cmake-python/focal,now 0.9.12-1focal.20230527.033817 arm64 [installed,automatic]
ros-foxy-ament-cmake-ros/focal,now 0.9.2-1focal.20230527.045739 arm64 [installed,automatic]
ros-foxy-ament-cmake-target-dependencies/focal,now 0.9.12-1focal.20230527.033914 arm64 [installed,automatic]
ros-foxy-ament-cmake-test/focal,now 0.9.12-1focal.20230527.033843 arm64 [installed,automatic]
ros-foxy-ament-cmake-uncrustify/focal,now 0.9.8-1focal.20230527.040848 arm64 [installed,automatic]
ros-foxy-ament-cmake-version/focal,now 0.9.12-1focal.20230527.033844 arm64 [installed,automatic]
ros-foxy-ament-cmake-xmllint/focal,now 0.9.8-1focal.20230527.041123 arm64 [installed,automatic]
ros-foxy-ament-cmake/focal,now 0.9.12-1focal.20230527.034003 arm64 [installed,automatic]
ros-foxy-ament-copyright/focal,now 0.9.8-1focal.20230527.040308 arm64 [installed,automatic]
ros-foxy-ament-cppcheck/focal,now 0.9.8-1focal.20230527.033907 arm64 [installed,automatic]
ros-foxy-ament-cpplint/focal,now 0.9.8-1focal.20230527.044409 arm64 [installed,automatic]
ros-foxy-ament-flake8/focal,now 0.9.8-1focal.20230527.034018 arm64 [installed,automatic]
ros-foxy-ament-index-cpp/focal,now 1.1.0-1focal.20230527.044824 arm64 [installed,automatic]
ros-foxy-ament-index-python/focal,now 1.1.0-1focal.20230527.040511 arm64 [installed,automatic]
ros-foxy-ament-lint-auto/focal,now 0.9.8-1focal.20230527.034012 arm64 [installed,automatic]
ros-foxy-ament-lint-cmake/focal,now 0.9.8-1focal.20230527.040514 arm64 [installed,automatic]
ros-foxy-ament-lint-common/focal,now 0.9.8-1focal.20230527.044618 arm64 [installed,automatic]
ros-foxy-ament-lint/focal,now 0.9.8-1focal.20230527.033909 arm64 [installed,automatic]
ros-foxy-ament-package/focal,now 0.9.5-1focal.20210422.231141 arm64 [installed,automatic]
ros-foxy-ament-pep257/focal,now 0.9.8-1focal.20230527.040159 arm64 [installed,automatic]
ros-foxy-ament-uncrustify/focal,now 0.9.8-1focal.20230527.034242 arm64 [installed,automatic]
ros-foxy-ament-xmllint/focal,now 0.9.8-1focal.20230527.040536 arm64 [installed,automatic]
ros-foxy-launch-testing-ament-cmake/focal,now 0.10.10-1focal.20230527.045532 arm64 [installed,automatic]

How to fix it? Thanks.

$\endgroup$

1 Answer 1

1
$\begingroup$

I finally avoided this error by using the following command:

colcon build --merge-install --cmake-args -DBUILD_TESTING=0
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.