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

Invoking "cmake" failed

asked 2016-09-19 04:34:52 -0600

Abdullah Aml gravatar image

Hi when i used command catkin make to build my project workspace first_robot_ws using ros Kinetic Kame on ubuntu 16.04 that was the outbut

note that i am installing anaconda3 on my laptop

    abdullah@Hamo:~/first_robot_ws$ catkin_make
    Base path: /home/abdullah/first_robot_ws
    Source space: /home/abdullah/first_robot_ws/src
    Build space: /home/abdullah/first_robot_ws/build
    Devel space: /home/abdullah/first_robot_ws/devel
    Install space: /home/abdullah/first_robot_ws/install
    ####
    #### Running command: "cmake /home/abdullah/first_robot_ws/src 
    -DCATKIN_DEVEL_PREFIX=/home/abdullah/first_robot_ws/devel -
     DCMAKE_INSTALL_PREFIX=/home/abdullah/first_robot_ws/install -G Unix Makefiles" in
    "/home/abdullah/first_robot_ws/build"
     ####
    -- The C compiler identification is GNU 5.4.0
    `enter code here`- - 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/abdullah/first_robot_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Found PythonInterp: /home/abdullah/anaconda3/bin/python (found version "3.5.2") 
-- Using PYTHON_EXECUTABLE: /home/abdullah/anaconda3/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/abdullah/first_robot_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: /home/abdullah/anaconda3/bin/nosetests
ImportError: "from catkin_pkg.package import parse_package" failed: No module named 'catkin_pkg'
Make sure that you have installed "catkin_pkg", it is up to date and on the PYTHONPATH.
CMake Error at /opt/ros/kinetic/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/home/abdullah/anaconda3/bin/python
  "/opt/ros/kinetic/share/catkin/cmake/parse_package_xml.py"
  "/opt/ros/kinetic/share/catkin/cmake/../package.xml"
  "/home/abdullah/first_robot_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/abdullah/first_robot_ws/build/CMakeFiles/CMakeOutput.log".
See also "/home/abdullah/first_robot_ws/build/CMakeFiles/CMakeError.log".
Invoking "cmake" failed>
edit retag flag offensive close merge delete

4 Answers

Sort by ยป oldest newest most voted
0

answered 2016-09-22 05:47:35 -0600

Abdullah Aml gravatar image

I have solved the problem by

1- uninstall ROS

2- i uninstalled anconda3

3- I typed sudo nano .bashrc to clear anaconda as my main python so i cleared every path related to ROS and anconda3

4- i installed ROS again

when i do catkin_make again i works

edit flag offensive delete link more

Comments

1

oh, sorry for coming too late to help. so, you didn't have to uninstall ROS nor anaconda, just remove anaconda from the path. Enjoy ROS now with bit clearer situation.

gavran gravatar image gavran  ( 2016-09-22 06:27:26 -0600 )edit

How do I clear the path or change my main python.

JudeVR gravatar image JudeVR  ( 2021-03-05 08:28:46 -0600 )edit
4

answered 2016-09-19 08:10:46 -0600

gavran gravatar image

updated 2016-09-20 03:24:27 -0600

I believe the problem is that you are missing catkin_pkg for python. And since you are using anaconda, make sure to install it for anaconda python, and not your system python. (from here I would say it is conda install... )

(when installing as a system package, it would be apt-get install ros-kinetic-catkin, or with pip, pip install catkin_pkg, as advised here)

edit flag offensive delete link more

Comments

when i do sudo apt-get install python-catkin-pkg the package was already exits

Abdullah Aml gravatar image Abdullah Aml  ( 2016-09-20 07:39:29 -0600 )edit

yes, it might be so, because with apt-get you are installing for your system python. either install for anaconda python, or - my suggestion if you are just beginning and don't care much about which python to use - use you system python to work with ros.

gavran gravatar image gavran  ( 2016-09-20 08:52:39 -0600 )edit

tell me please, how i can do so

Abdullah Aml gravatar image Abdullah Aml  ( 2016-09-20 12:07:22 -0600 )edit

How can we install for anaconda please ?

peykaf gravatar image peykaf  ( 2020-09-07 19:18:58 -0600 )edit
3

answered 2017-04-10 14:11:08 -0600

Jarno gravatar image

What worked for me:

create a conda environment, activate it and pip install catkin_pkg. You probably need to install other required Python packages like nose. Then remove the build folder, as the Python PATH seems to be cached there rm -rf ./build. catkin_make should work then

edit flag offensive delete link more
0

answered 2020-05-01 23:00:52 -0600

catkin_create_pkg <package_name> [depend1] [depend2] [depend3] - Just change the name of the package. There are some keywords that should not be used since it confuses the compiler. I first use <data_pkg> and I had an error after compiling(catkin_make). I changed it to <senor_data> and it worked. I hope it helps.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2016-09-19 04:34:52 -0600

Seen: 34,800 times

Last updated: Sep 22 '16