ros2-ORB_SLAM2
ros2-ORB_SLAM2 copied to clipboard
Dockerfile fails build because CMake minimum version increased
I'm kind of a Linux/Docker noob but it seems to me that this commit has broken things. I believe Ubuntu 18.04 only has CMake version 3.10.2-1ubuntu2
. Is it possible to clone the repo at a specific commit to resolve this without changing the base Docker image?
(I have no idea what the convention is, but it seems that when using Git repos in Dockerfiles, it would be safer to always use a known-good commit, otherwise the Dockerfile can become broken by outside changes. But of course I'm aware it may not be possible to control the commit used from your Dockerfile; I guess it might have to be specified upstream somehow.)
#0 31.61 Finished <<< ament_cpplint [1.70s]
#0 31.62 Starting >>> ament_cmake_cpplint
#0 32.42 Finished <<< ament_cmake_cppcheck [1.30s]
#0 32.43 Starting >>> ament_cmake_flake8
#0 32.49 Finished <<< ament_cmake_xmllint [1.23s]
#0 32.49 Starting >>> foonathan_memory_vendor
#0 32.61 --- stderr: foonathan_memory_vendor
#0 32.61 CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
#0 32.61 CMake 3.14 or higher is required. You are running version 3.10.2
#0 32.61
#0 32.61
#0 32.61 ---
#0 32.62 Failed <<< foonathan_memory_vendor [0.13s, exited with code 1]
#0 32.83 Aborted <<< ament_cmake_cpplint [1.22s]
#0 33.07 Aborted <<< ament_cmake_flake8 [0.64s]
#0 48.00 Aborted <<< uncrustify_vendor [22.0s]
#0 48.13
#0 48.13 Summary: 38 packages finished [46.1s]
#0 48.13 1 package failed: foonathan_memory_vendor
#0 48.13 3 packages aborted: ament_cmake_cpplint ament_cmake_flake8 uncrustify_vendor
#0 48.13 2 packages had stderr output: cyclonedds foonathan_memory_vendor
#0 48.13 269 packages not processed
------
Dockerfile:101
--------------------
99 |
100 | # build the workspace
101 | >>> RUN colcon build --symlink-install
102 |
103 |
--------------------
ERROR: failed to solve: process "/bin/sh -c colcon build --symlink-install" did not complete successfully: exit code: 1
The Dockerfile
is ~5 years old and this repository is not currently being actively maintained.
There are multiple ways to fix this, ranking them in order of preference.
- Change the Dockerfile to install ROS 2 from debian packages rather than from sources. This also allows to specify a version for the package and it will immensly speed up the build time of the dockerfile
- Change the Dockerfile to use a different
ros2.repos
file such as this one https://github.com/ros2/ros2/blob/foxy-release/ros2.repos or a custom one that can be hosted in this repository.
Feel free to open a PR with one of the proposed changes (or any other approach that you think could solve the problem)