0
$\begingroup$

Rosanswers logo

I recently experienced a problem with catkin_make. I am unsure what changed before I experienced the error as I had been using my computer for a couple of weeks without needing to use catkin_make, but I had been using the files in my catkin_ws in that two week period. Therefore, I am uncertain what was the initial cause of the error (the error is included in the code segment below).

amanda@jade-shadow:~/catkin_ws$ catkin_make
Base path: /home/amanda/catkin_ws
Source space: /home/amanda/catkin_ws/src
Build space: /home/amanda/catkin_ws/build
Devel space: /home/amanda/catkin_ws/devel
Install space: /home/amanda/catkin_ws/install
####
#### Running command: "cmake /home/amanda/catkin_ws/src -DCATKIN_DEVEL_PREFIX=/home/amanda/catkin_ws/devel -DCMAKE_INSTALL_PREFIX=/home/amanda/catkin_ws/install" in "/home/amanda/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/amanda/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/amanda/catkin_ws/devel;/opt/ros/hydro
-- This workspace overlays: /home/amanda/catkin_ws/devel;/opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/amanda/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
Traceback (most recent call last):
  File "/home/amanda/catkin_ws/build/catkin_generated/generate_cached_setup.py", line 29, in <module>
    os.chmod(output_filename, mode | stat.S_IXUSR)
OSError: [Errno 1] Operation not permitted: '/home/amanda/catkin_ws/build/catkin_generated/setup_cached.sh'
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python
  "/home/amanda/catkin_ws/build/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/hydro/share/catkin/cmake/all.cmake:178 (safe_execute_process)
  /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
Invoking "cmake" failed

Other than the very first time I ran catkin_make, I received the following error message, which looks very similar:

amanda@jade-shadow:~/catkin_ws$ catkin_make
Base path: /home/amanda/catkin_ws
Source space: /home/amanda/catkin_ws/src
Build space: /home/amanda/catkin_ws/build
Devel space: /home/amanda/catkin_ws/devel
Install space: /home/amanda/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/amanda/catkin_ws/build"
####
-- Using CATKIN_DEVEL_PREFIX: /home/amanda/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /home/amanda/catkin_ws/devel;/opt/ros/hydro
-- This workspace overlays: /home/amanda/catkin_ws/devel;/opt/ros/hydro
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /home/amanda/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
Traceback (most recent call last):
  File "/home/amanda/catkin_ws/build/catkin_generated/generate_cached_setup.py", line 29, in <module>
    os.chmod(output_filename, mode | stat.S_IXUSR)
OSError: [Errno 1] Operation not permitted: '/home/amanda/catkin_ws/build/catkin_generated/setup_cached.sh'
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
  execute_process(/usr/bin/python
  "/home/amanda/catkin_ws/build/catkin_generated/generate_cached_setup.py")
  returned error code 1
Call Stack (most recent call first):
  /opt/ros/hydro/share/catkin/cmake/all.cmake:178 (safe_execute_process)
  /opt/ros/hydro/share/catkin/cmake/catkinConfig.cmake:20 (include)
  CMakeLists.txt:52 (find_package)


-- Configuring incomplete, errors occurred!
make: *** [cmake_check_build_system] Error 1
Invoking "make cmake_check_build_system" failed

I tried running catkin_make clean but I received the same error message as shown above.

I also went through my catkin_ws and made every package individually with catkin_make_isolated. I moved the packages that did not successfully make into another folder on my computer. However, the same error messages occurred when I ran catkin_make again.

I also made sure I ran:

source /opt/ros/hydro/setup.bash
source devel/setup.bash
sudo apt-get update
rosdep update
sudo apt-get install ros-hydro-control-msgs 
sudo apt-get install ros-hydro-catkin 

When no resolution was found, I ran

 rm -rf build
 rm -rf build build_isolated/
 rm -rf build/ build/
 rm -rf build/ devel devel_isolated/

and the last command fixed my problem. However, I don't actually know what I did wrong. I want to try to avoid doing it again. I wanted to post this to help anyone experiencing the same problem and to ask for ideas of the cause of the problem. I would appreciate any hints you could offer as to the possible cause of this issue.


Originally posted by Amanda on ROS Answers with karma: 11 on 2014-03-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Did you copy your workspace e. g. as backup from an to a zip or from and to an NTFS file system? The unix "is executable" flags (chmod +x) does not survive all of these copies so afterwards when you restore your backup your sh and python script are not executable anymore, which might cause such errors....


Originally posted by Wolf with karma: 7555 on 2014-03-26

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Amanda on 2014-03-26:
I didn't copy my workspace, but its possible that a package may have moved at some point. The files within those packages moved around, but I made sure the individual python files retained their chmod +x state. Thanks for the lead - it sounds more reasonable than any hypothesis I've come up with.

$\endgroup$

Your Answer

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