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

ROS Kinetic - catkin_make install fails

asked 2017-06-03 10:44:21 -0600

Allen Ayala gravatar image

I am new to ROS Kinetic. To learn more, I have been going through the tutorials provided by the ROS website ( http://wiki.ros.org/ROS/Tutorials ) and have been doing fine up until creating a ROS msg and srv. At the final step where one needs to remake the catkin_ws package with the command catkin_make install, I am given the following output on the terminal:

allen@allen-VirtualBox:~/catkin_ws$ catkin_make install
Base path: /home/allen/catkin_ws
Source space: /home/allen/catkin_ws/src
Build space: /home/allen/catkin_ws/build
Devel space: /home/allen/catkin_ws/devel
Install space: /home/allen/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/allen/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/allen/catkin_ws/src/devel
-- Using CMAKE_PREFIX_PATH: /home/allen/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/allen/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/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/allen/catkin_ws/src/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- beginner_tutorials: 1 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/allen/catkin_ws/src
####
#### Running command: "make install -j1 -l1" in "/home/allen/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/allen/catkin_ws/src/devel
-- Using CMAKE_PREFIX_PATH: /home/allen/catkin_ws/devel;/opt/ros/kinetic
-- This workspace overlays: /home/allen/catkin_ws/devel;/opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/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/allen/catkin_ws/src/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- beginner_tutorials: 1 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/allen/catkin_ws/src
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/_setup_util.py
CMake Error at cmake_install.cmake:54 (file):
  file INSTALL cannot copy file
  "/home/allen/catkin_ws/src/catkin_generated/installspace/_setup_util.py" to
  "/usr/local/_setup_util.py".


Makefile:61: recipe for target 'install' failed
make: *** [install] Error 1
Invoking "make install -j1 -l1" failed

I don't understand why the ...installspace/_setup_util.py file can't be copied. I didn't do anything with the file. I have looked at the cmake_install.cmake lines of code that result in the error and see nothing wrong:

54  file(INSTALL DESTINATION "/usr/local" TYPE PROGRAM FILES                                      
      "/home/allen/catkin_ws/src/catkin_generated/installspace/_setup_util.py")
55   endif()
56
57   if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
58        list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
59        "/usr/local/env.sh")
60        if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
61             message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
62 ...
(more)
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2017-06-03 13:33:00 -0600

marguedas gravatar image

The file cannot be copied because your install space is /usr/local only users with roo permissions can copy in that directory.

The problem here is that catkin_make is trying to install your package to /usr/local instead of Install space: /home/allen/catkin_ws/install.

Can you try the following commands in a new terminal and comment here with the outcome?:
1) Open a new terminal (Ctrl+Alt+T)
2) cd /home/allen/catkin_ws
3) rm -rf build devel install
4) source /opt/ros/kinetic/setup.bash
5) catkin_make install

edit flag offensive delete link more

Comments

I don't know why, but I was unable to submit my full response as a comment. I had reached the "maximum characters for a comment". Thus, I placed my reply to your suggestion as an answer. I hope the output is useful.

Allen Ayala gravatar image Allen Ayala  ( 2017-06-03 14:07:08 -0600 )edit

Are you able to still help?

Allen Ayala gravatar image Allen Ayala  ( 2017-06-08 12:51:20 -0600 )edit

I have fixed the issue! I had some Make files within my .src folder in catkin_ws that were not supposed to be there. Once I had deleted them, I rebuilt catkin_ws with catkin_make and later catkin_make install. Everything was built correctly and my issue was gone.

Allen Ayala gravatar image Allen Ayala  ( 2017-06-11 13:46:49 -0600 )edit
0

answered 2017-06-03 14:05:02 -0600

Allen Ayala gravatar image

I have performed the commands suggested by marguedas and it resulted in:

 allen@allen-VirtualBox:~/catkin_ws$ cd /home/allen/catkin_ws
allen@allen-VirtualBox:~/catkin_ws$ rm -rf build devel install
allen@allen-VirtualBox:~/catkin_ws$ source /opt/ros/kinetic/setup.bash
allen@allen-VirtualBox:~/catkin_ws$ catkin_make install
Base path: /home/allen/catkin_ws
Source space: /home/allen/catkin_ws/src
Build space: /home/allen/catkin_ws/build
Devel space: /home/allen/catkin_ws/devel
Install space: /home/allen/catkin_ws/install
####
#### Running command: "cmake /home/allen/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/allen/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/allen/catkin_ws/install -G Unix Makefiles" in "/home/allen/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/allen/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/kinetic
-- This workspace overlays: /opt/ros/kinetic
-- Using PYTHON_EXECUTABLE: /usr/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/allen/catkin_ws/src/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-2.7
-- catkin 0.7.6
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~  traversing 1 packages in topological order:
-- ~~  - beginner_tutorials
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'beginner_tutorials'
-- ==> add_subdirectory(beginner_tutorials)
-- Using these message generators: gencpp;geneus;genlisp;gennodejs;genpy
-- beginner_tutorials: 1 messages, 1 services
-- Configuring done
-- Generating done
-- Build files have been written to: /home/allen/catkin_ws/src
####
#### Running command: "make install -j1 -l1" in "/home/allen/catkin_ws/build"
####
make: *** No rule to make target 'install'.  Stop.
Invoking "make install -j1 -l1" failed
edit flag offensive delete link more

Comments

I have fixed the issue! I had some Make files within my .src folder in catkin_ws that were not supposed to be there. Once I had deleted them, I rebuilt catkin_ws with catkin_make and later catkin_make install. Everything was built correctly and my issue gone.

Allen Ayala gravatar image Allen Ayala  ( 2017-06-11 13:45:18 -0600 )edit

Question Tools

Stats

Asked: 2017-06-03 10:44:21 -0600

Seen: 3,916 times

Last updated: Jun 03 '17