I'm following the building packages tutorial, but getting stuck at catkin_make on a brand new catkin workspace.
$ cd ~/catkin_ws $ catkin_make gives:
-- Using CATKIN_DEVEL_PREFIX: /home/rufus/catkin_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /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/rufus/catkin_ws/build/test_results
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.86
/home/rufus/catkin_ws/devel/env.sh: 1: /opt/ros/hydro/etc/catkin/profile.d/05.catkin_make.bash: Syntax error: "(" unexpected
Traceback (most recent call last):
File "/home/rufus/catkin_ws/build/catkin_generated/generate_cached_setup.py", line 21, in <module>
code = generate_environment_script('/home/rufus/catkin_ws/devel/env.sh')
File "/opt/ros/hydro/lib/python2.7/dist-packages/catkin/environment_cache.py", line 61, in generate_environment_script
output = subprocess.check_output([env_script, sys.executable, '-c', python_code])
File "/usr/lib/python2.7/subprocess.py", line 544, in check_output
raise CalledProcessError(retcode, cmd, output=output)
subprocess.CalledProcessError: Command '['/home/rufus/catkin_ws/devel/env.sh', '/usr/bin/python', '-c', 'import os; print(dict(os.environ))']' returned non-zero exit status 2
CMake Error at /opt/ros/hydro/share/catkin/cmake/safe_execute_process.cmake:11 (message):
execute_process(/usr/bin/python
"/home/rufus/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
Apparently something goes wrong in generating the environment. Same problem happens when using the zshell instead of bash.
I'm using: ROS Hydro in an ubuntu virtual machine GNU bash, version 4.2.25(1)-release (i686-pc-linux-gnu) catkin 0.5.86 cat /proc/version: Linux version 3.2.0-60-generic-pae (buildd@allspice) (gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5) ) #91-Ubuntu SMP Wed Feb 19 04:14:56 UTC 2014
Any suggestions?
Further information, in reaction to comment 1:
I work with a clean workspace, no packages. ROS Hydro was already installed in my virtual machine. After "sudo rosdep init" and "rosdep update", that seem to work properly, I generate my catkin workspace:
mkdir -p catkin_ws/src
cd ~/catkin_ws/src
catkin_init_workspace
source /opt/ros/hydro/setup.bash
cd ~/catkin_ws
catkin_make # do make on just clean catkin workspace
This gives the error as given above. Also after starting roscore the catkin_make gives the same error. The package catkin can be found:
$ rospack find catkin # gives:
/opt/ros/hydro/share/catkin
However, the packages catkin_pkg or catkin-pkg cannot be found.
Originally posted by rufus on ROS Answers with karma: 16 on 2014-06-10
Post score: 0
Original comments
Comment by gvdhoorn on 2014-06-10:
Can you provide some more information on how you created the workspace? Any packages present in the workspace? The error seems to indicate a syntax error in a ROS distributed file, but the error could be caused by some other error earlier on.