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

catkin build fails after upgrading ROS distro

asked 2020-06-18 11:49:04 -0600

rfn123 gravatar image

Recently I upgraded my Ubuntu from 16.04 to 18.04, thus I reinstalled ROS Melodic after uninstalling Kinetic. roscore and some other basic ROS packages work fine, however when I try to build my workspace with catkin build following error message appears:

CMake Error at /home/user1/projects/catkin_ws/src/custom_package/CMakeLists.txt:10 (find_package):
  By not providing "Findcatkin.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "catkin", but
  CMake did not find one.

  Could not find a package configuration file provided by "catkin" with any
  of the following names:

    catkinConfig.cmake
    catkin-config.cmake

  Add the installation prefix of "catkin" to CMAKE_PREFIX_PATH or set
  "catkin_DIR" to a directory containing one of the above files.  If "catkin"
  provides a separate development package or SDK, be sure it has been
  installed.


make: *** [cmake_check_build_system] Error 1

The package and workspace was working fine before (on another melodic machine). I tested to create a new empty workspace with catkin init but catkin build still throws the same error message.

I also did source /opt/ros/melodic/setup.bash. My cmake version is 3.10.2

Anyone knows how to solve this? Many thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-06-18 12:05:09 -0600

rfn123 gravatar image

Ok, somehow I could build a new empty workspace with catkin build after I reinstalled the ros-melodic-catkin package. In the old workspace, doing catkin clean then retrying to build then also worked.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-18 11:49:04 -0600

Seen: 533 times

Last updated: Jun 18 '20