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

Cmake Error 'catkin' must be listed as a buildtool dependency in package.xml

asked 2014-01-28 16:18:25 -0500

Dapake gravatar image

updated 2014-01-29 08:55:53 -0500

Dirk Thomas gravatar image

Hello all,

I am currently doing the ROS tutorial (I am on the 'writing a simple publisher and subscriber in C++). When I enter the 'catkin_make' command into the terminal, I first got the add_message_files() directory not found error. To fix this I went into the CMakeLists.txt file and commented out the add_message_file(), add_service_file() and so on. This got rid of that error, however, I am now getting this error when running 'catkin_make':

"Cmake Error at /opt/ros/groovy/share/catkin/cmake/catkin_package.cmake:92(message): catkin_package() 'catkin' must be listed as a buildtool dependency in the package.xml"

However, catkin is specified as a buildtool dependency in my package.xml. How can I fix this?

I am running ROS Groovy on top of Ubuntu 12.04 in a VirtualBox instance.

Thank you!

EDIT: Here is my package.xml file:

<package>
  <name>beginner_tutorials</name>
  <version>0.0.0</version>
  <description>The beginner_tutorials package</description>

  <maintainer email="viki@todo.todo">viki</maintainer>

  <license>TODO</license>

  <buildtool_depend>catkin</buildtool_depend>
  <build_depend>roscpp</build_depend>
  <build_depend>rospy</build_depend>
  <build_depend>std_msgs</build_depend>
  <run_depend>roscpp</run_depend>
  <run_depend>rospy</run_depend>
  <run_depend>std_msgs</run_depend>

  <export>

  </export>
</package>
edit retag flag offensive close merge delete

Comments

hello there. then how you fix that error? i got same problem that "Cmake Error 'catkin' must be listed as a buildtool dependency in package.xml"

sorry for my question.

Djajus gravatar image Djajus  ( 2020-04-26 18:30:13 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-01-28 19:00:49 -0500

Wolf gravatar image

Add the line:

  <buildtool_depend>catkin</buildtool_depend>

to your package.xml ...

edit flag offensive delete link more

Comments

Thank you for the reply, but this line is already added in my package.xml, which is why I am so confused.

Dapake gravatar image Dapake  ( 2014-01-29 07:47:22 -0500 )edit
1

You should post your package.xml file in your question.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-01-29 08:04:43 -0500 )edit

Post has been edited to include the package.xml

Dapake gravatar image Dapake  ( 2014-01-29 08:33:32 -0500 )edit

With that package.xml file you should not get the error message. Can you please post further information? E.g. CMakeLists.txt and the command sequence you use. You could also push your code to a temporary GitHub repo to share everything - that would make it much easier to see the big picture.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-01-29 08:58:03 -0500 )edit

I just made a Github repo containing my package.xml and CMakeLists.txt files:https://github.com/dkelly67/ROS_Code My command line input is just "catkin_make" in the ~/catkin_ws directory

Dapake gravatar image Dapake  ( 2014-01-29 11:52:05 -0500 )edit

I just cloned it and ran cmake on it and the error message is different for me: CMake Error at /opt/ros/hydro/share/catkin/cmake/catkin_package.cmake:289 (message): catkin_package() include dir 'include' is neither an absolute directory nor exists relative to '/tmp/ROS_Code'

Dirk Thomas gravatar image Dirk Thomas  ( 2014-01-29 12:26:29 -0500 )edit

The reason for that is that catkin_package(INCLUDE_DIRS include) is declared but your package does not have an include folder.

Dirk Thomas gravatar image Dirk Thomas  ( 2014-01-29 12:27:04 -0500 )edit

Ahh I see! Ok I just fixed that error. Now, for some reason it cannot find my listener.cpp file, but the listener file is in the correct directory. Also, thank you very much for the help by the way. Im new to ROS but Im using it for a university design team

Dapake gravatar image Dapake  ( 2014-01-29 12:50:24 -0500 )edit

Question Tools

Stats

Asked: 2014-01-28 16:18:25 -0500

Seen: 5,853 times

Last updated: Jan 29 '14