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

catkin_package() DEPENDS on 'roscpp' which must be listed as a run dependency in the package.xml

asked 2020-04-26 19:16:33 -0500

Djajus gravatar image

updated 2020-04-27 04:11:16 -0500

gvdhoorn gravatar image

hello there.

i got some error when I enter the 'catkin_make' command into the terminal, FYI i used ROS Melodic on ubuntu 14.04, and i just trying to build a package named as 'my_first_ros_pkg', here is the error :

CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:224 (message):
  catkin_package() DEPENDS on the catkin package 'roscpp' which must
  therefore be listed as a run dependency in the package.xml

Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  my_first_ros_pkg/CMakeLists.txt:104 (catkin_package)


-- Configuring incomplete, errors occurred!
See also "/home/kahimtamvan/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/kahimtamvan/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:1664: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

how can i fix that?

Thank you so much All.

here is on terminal

Base path: /home/kahimtamvan/catkin_ws
Source space: /home/kahimtamvan/catkin_ws/src
Build space: /home/kahimtamvan/catkin_ws/build
Devel space: /home/kahimtamvan/catkin_ws/devel
Install space: /home/kahimtamvan/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/kahimtamvan/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/kahimtamvan/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python2 (found suitable version "2.7.17", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python2
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/kahimtamvan/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/googletest': gtests will be built
-- Found gmock sources under '/usr/src/googletest': gmock will be built
-- Found PythonInterp: /usr/bin/python2 (found version "2.7.17") 
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.23
-- BUILD_SHARED_LIBS is on
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 9 packages in topological order:
-- ~~  - turtlebot3 (metapackage)
-- ~~  - turtlebot3_msgs
-- ~~  - turtlebot3_navigation
-- ~~  - my_first_ros_pkg
-- ~~  - turtlebot3_bringup
-- ~~  - turtlebot3_example
-- ~~  - turtlebot3_slam
-- ~~  - turtlebot3_teleop
-- ~~  - turtlebot3_description
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin metapackage: 'turtlebot3'
-- ==> add_subdirectory(turtlebot3/turtlebot3)
-- +++ processing catkin package: 'turtlebot3_msgs'
-- ==> add_subdirectory(turtlebot3_msgs)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- turtlebot3_msgs: 3 messages, 0 services
-- +++ processing catkin package: 'turtlebot3_navigation'
-- ==> add_subdirectory(turtlebot3/turtlebot3_navigation)
-- +++ processing catkin package: 'my_first_ros_pkg'
-- ==> add_subdirectory(my_first_ros_pkg)
CMake Error at /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:224 (message):
  catkin_package() DEPENDS on the catkin package 'roscpp' which must
  therefore be listed as a run dependency in the package.xml
Call Stack (most recent call first):
  /opt/ros/melodic/share/catkin/cmake/catkin_package.cmake:102 (_catkin_package)
  my_first_ros_pkg/CMakeLists.txt:104 (catkin_package)


-- Configuring incomplete, errors occurred!
See also "/home/kahimtamvan/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/kahimtamvan/catkin_ws/build/CMakeFiles/CMakeError.log".
Makefile:1664: recipe for target 'cmake_check_build_system' failed
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

And here is my package.xml

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

  <!-- One maintainer tag required, multiple allowed, one person per tag -->
  <!-- Example:  -->
  <!-- <maintainer email="jane.doe@example.com">Jane Doe</maintainer> -->
  <!-- <maintainer email="pyo@robotis.com">Yoonseok Pyo</maintainer> -->
  <maintainer email="kahimtamvan@todo.todo">kahimtamvan< ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-04-28 00:53:57 -0500

abstracto gravatar image

updated 2020-04-28 00:59:22 -0500

try adding this in package.xml

<run_depend>roscpp</run_depend>

or

You can try editing these lines in cmake file from:

catkin_package(CATKIN_DEPENDS roscpp std_msgs )

to

catkin_package()

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-04-26 19:16:33 -0500

Seen: 1,817 times

Last updated: Apr 28 '20