0
$\begingroup$

Rosanswers logo

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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Problem solved!
My standard shell was zsh, I prefer this one over bash, and since it is supported in ros I decided to stick to zsh. With the problem with catkin_make I decided to switch to bash, because that might be better supported. However, I kept my standard shell to zsh.
Changing the shell with chsh -s /bin/bash (logging out and in again) and following the steps in the tutorial, did the job. So I can go on with ROS. Thanks for your help! Conclusion: I don't recommend zsh for ROS... (issue has been fixed, see below comment)


Originally posted by rufus with karma: 16 on 2014-06-10

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by Dirk Thomas on 2014-06-10:
If you mind about zsh being supported you might want to reconsider your decision. Trying to reproduce the problem you have and filling an issue will very likely get the problem fixed if there is one.

Comment by rufus on 2014-06-10:
I agree, thanks for encouraging to get things right with zsh. I filed an issue (#652) on https://github.com/ros/catkin/issues.

Comment by rufus on 2014-06-12:
issue with zsh is solved in the catkin reset_shell at https://github.com/ros/catkin/commits/reset_shell by http://answers.ros.org/users/2575/dirk-thomas/; so now I'm using zsh again.

$\endgroup$

Your Answer

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