0
$\begingroup$

Rosanswers logo

Hey everybody,

I'm trying to create a catkin workspace, but keep getting the error below when running catkin_make. I run ROS Kinetic on Ubuntu 16.04 and I use a virtual pyton 2.7 conda environment using Anaconda. This is the error I keep getting (the full output is below):

 catkin_pkg.package.InvalidPackage: Invalid package manifest "/opt/ros/kinetic/share/catkin/cmake/../package.xml": Error(s) in /opt/ros/kinetic/share/catkin/cmake/../package.xml:
- The manifest must not contain the following tags: depend, build_export_depend, buildtool_export_depend
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/alex/anaconda3/envs/python2/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/alex/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1

I am clueless as to what to do. One other question here suggested PIP-installing catkin_pkg, but that does not solve the problem in my case as catkin_pkg was already installed using PIP, so not finding catkin_pkg is not the issue here. Any help much appreciated!

A bit more information:

Installed ROS Kinetic using sudo apt-get install ros-kinetic-desktop-full

Tried creating the workspace exactly following the tutorial here but obviously didn't get past the catkin_make part

Content of /opt/ros/kinetic/share/catkin/cmake/../package.xml:

<?xml version="1.0"?>
<package format="2">
  <name>catkin</name>
  <version>0.7.6</version>
  <description>Low-level build system macros and infrastructure for ROS.</description>
  <maintainer email="[email protected]">Dirk Thomas</maintainer>
  <license>BSD</license>

  <url type="website">http://www.ros.org/wiki/catkin</url>
  <url type="bugtracker">https://github.com/ros/catkin/issues</url>
  <url type="repository">https://github.com/ros/catkin</url>

  <author>Troy Straszheim</author>
  <author>Morten Kjaergaard</author>
  <author>Brian Gerkey</author>
  <author>Dirk Thomas</author>

  <buildtool_depend>cmake</buildtool_depend>
  <buildtool_export_depend>cmake</buildtool_export_depend>

  <depend>python-argparse</depend>
  <depend version_gt="0.2.9">python-catkin-pkg</depend>

  <build_depend>python-empy</build_depend>

  <build_export_depend>gtest</build_export_depend>
  <build_export_depend>python-empy</build_export_depend>
  <build_export_depend>python-nose</build_export_depend>

  <test_depend>python-mock</test_depend>
  <test_depend>python-nose</test_depend>

  <export>
    <rosdoc config="rosdoc.yaml"/>
    <architecture_independent/>
  </export>
</package>

Why does package.xml contain the three tags that it is not supposed to contain, depend, build_export_depend, and buildtool_export_depend, and what can I do about that?

And here is the full output after running catkin_pkg:

$ catkin_make
Base path: /home/alex/catkin_ws
Source space: /home/alex/catkin_ws/src
Build space: /home/alex/catkin_ws/build
Devel space: /home/alex/catkin_ws/devel
Install space: /home/alex/catkin_ws/install
Creating symlink "/home/alex/catkin_ws/src/CMakeLists.txt" pointing to "/opt/ros/kinetic/share/catkin/cmake/toplevel.cmake"
####
#### Running command: "cmake /home/alex/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/alex/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/alex/catkin_ws/install -G Unix Makefiles" in "/home/alex/catkin_ws/build"
####
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 5.4.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Using CATKIN_DEVEL_PREFIX: /home/alex/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Found PythonInterp: /home/alex/anaconda3/envs/python2/bin/python (found version "2.7.13") 
-- Using PYTHON_EXECUTABLE: /home/alex/anaconda3/envs/python2/bin/python
-- Using Debian Python package layout
-- Using empy: /usr/bin/empy
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/alex/catkin_ws/build/test_results
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
Traceback (most recent call last):
  File "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py", line 113, in <module>
    main()
  File "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py", line 99, in main
    package = parse_package(args.package_xml)
  File "/home/alex/anaconda3/envs/python2/lib/python2.7/site-packages/catkin_pkg/package.py", line 317, in parse_package
    return parse_package_string(f.read(), filename)
  File "/home/alex/anaconda3/envs/python2/lib/python2.7/site-packages/catkin_pkg/package.py", line 450, in parse_package_string
    raise InvalidPackage('Error(s) in %s:%s' % (filename, ''.join(['\n- %s' % e for e in errors])))
catkin_pkg.package.InvalidPackage: Invalid package manifest "/opt/ros/kinetic/share/catkin/cmake/../package.xml": Error(s) in /opt/ros/kinetic/share/catkin/cmake/../package.xml:
- The manifest must not contain the following tags: depend, build_export_depend, buildtool_export_depend
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/alex/anaconda3/envs/python2/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/alex/catkin_ws/build/catkin/catkin_generated/version/package.cmake")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/kinetic/share/catkin/cmake/catkin_package_xml.cmake:63 (safe_execute_process)
  /opt/ros/kinetic/share/catkin/cmake/all.cmake:151 (_catkin_package_xml)
  /opt/ros/kinetic/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)

-- Configuring incomplete, errors occurred!
See also "/home/alex/catkin_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/alex/catkin_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed

Originally posted by alexe on ROS Answers with karma: 60 on 2017-04-17

Post score: 0


Original comments

Comment by Cyril Jourdan on 2017-07-28:
Hi, I'm also running anaconda and ROS on my machine and have issues with python versions, did you find a solution to that ?

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I had this problem too, because rosdep and rosinstall packages in conda are old.

I solved this by installing them using pip and installing setuptools:

pip install -U rosdep rosinstall_generator wstool rosinstall six vcstools

conda install setuptools

Originally posted by Horse-man with karma: 229 on 2017-08-17

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.