ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Colcon build fails, cmake_minimum_required

asked 2022-12-15 04:26:04 -0600

Hi,

For a school project I need to use a provided ROS2 workspace, wich contains 2 packages. Both packages have cmake_minimum_required(VERSION 3.18) statement on top of the CMakeLists.txt. I installed cmake version 3.25.1using snap. I also installed colcon using this command : sudo apt install python3-colcon-common-extensions.

When I run colcon build on the root of the workspace, I get the error : CMake Error at CMakeLists.txt:1 (cmake_minimum_required): CMake 3.18 or higher is required. You are running version 3.16.3, but when in my terminal I run cmake --version, I get : cmake version 3.25.1

I'm pretty new to ROS, maybe I missing something, thanks for your help.

P.S.: I'm using ROS2 Galactic and I'm working on ubuntu 20.04

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2022-12-15 08:20:05 -0600

Per Edwardsson gravatar image

I'm not sure about how snap works, but in general I would strongly advise against using two different package managers on your system, in your case you are using both apt and snap. These kinds of problems typically arise from there not being one singular cmake installed on your system, but two.

I would recommend uninstalling cmake via snap and following this guide for getting a proper upgraded version of cmake in your system.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2022-12-15 04:26:04 -0600

Seen: 425 times

Last updated: Dec 15 '22