Kevin Mao
Kevin Mao

Reputation: 131

cmake version in catkin_make different from global cmake version?

I'm trying to build some package in ROS using catkin.

When I run catkin_make in the top level directory, I got complaint about cmake version:

CMake Error at /usr/lib/x86_64-linux-gnu/cmake/ignition-math4/ignition-math4-config.cmake:26 (cmake_minimum_required): 
CMake 3.5.1 or higher is required.  You are running version 3.3.2

Then I updated my cmake version, and also modified the path. I verified that the version of cmake is now 3.15:

~/catkin_ws$ cmake --version
cmake version 3.15.0
CMake suite maintained and supported by Kitware (kitware.com/cmake).

when I go back and try catkin_make again, the problem still remains.

I suppose that catkin has defined its own path or environment variable somewhere and are using cmake from a different place, but I couldn't figure out how to change it. Any suggestions? Thanks in advance.

--Kevin

Upvotes: 4

Views: 1651

Answers (1)

dboy
dboy

Reputation: 1057

you could remove .catkin_tools from your working directory, and redo the initialization of catkin:

source /opt/ros/<your-ros-development>/setup.bash 

and

catkin init 

if your environment setup is correct, that should do the trick.

Upvotes: 1

Related Questions