Ask Your Question

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

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

Dapake gravatar image

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

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:

  <description>The beginner_tutorials package</description>

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




edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

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

Wolf gravatar image

Add the line:


to your package.xml ...

edit flag offensive delete link more


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

Dapake gravatar imageDapake ( 2014-01-29 07:47:22 -0600 )edit

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

Dirk Thomas gravatar imageDirk Thomas ( 2014-01-29 08:04:43 -0600 )edit

Post has been edited to include the package.xml

Dapake gravatar imageDapake ( 2014-01-29 08:33:32 -0600 )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 imageDirk Thomas ( 2014-01-29 08:58:03 -0600 )edit

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

Dapake gravatar imageDapake ( 2014-01-29 11:52:05 -0600 )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 imageDirk Thomas ( 2014-01-29 12:26:29 -0600 )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 imageDirk Thomas ( 2014-01-29 12:27:04 -0600 )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 imageDapake ( 2014-01-29 12:50:24 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


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

Seen: 2,609 times

Last updated: Jan 29 '14