Ask Your Question

rosinstall (electric) fails on Mac OS X 10.6.7

asked 2011-10-16 04:56:21 -0500

sebastianh gravatar image

updated 2012-03-16 15:16:38 -0500

Kevin gravatar image


I am trying to install ROS on Mac OS X Snow Leopard. I am getting this error message, when trying to install the ros base (or any other configuration) e.g. by executing rosinstall ~/ros ""

Bootstrapping ROS build
Detected ros_comm bootstrapping it too.
Rospack failed to build
Traceback (most recent call last):
  File "/opt/local/bin/rosinstall", line 5, in <module>
    pkg_resources.run_script('rosinstall==0.5.22', 'rosinstall')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/", line 499, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/", line 1235, in run_script
    execfile(script_filename, namespace, namespace)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/rosinstall-0.5.22-py2.6.egg/EGG-INFO/scripts/rosinstall", line 679, in <module>
    sys.exit(not rosinstall_main(sys.argv))
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/rosinstall-0.5.22-py2.6.egg/EGG-INFO/scripts/rosinstall", line 670, in  rosinstall_main
    subprocess.check_call("source %s && rosmake ros%s --rosdep-install%s" % (os.path.join(options.path, ''), ros_comm_insert, rosdep_yes_insert), shell=True, executable='/bin/bash')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/", line 488, in check_call
    raise CalledProcessError(retcode, cmd) 
subprocess.CalledProcessError: Command source /Users/shoefer/ros/ &&  rosmake ros ros_comm --rosdep-install returned non-zero exit status 255

I done everything according to the installation manual, I have installed all necessary packages via MacPorts, activated the MacPorts python 2.6 version etc. I have also checked that I have YAML and boost installed.

Any help would be appreciated!


edit retag flag offensive close merge delete


I just followed the same instructions on Mac OS X 10.5.8, and I did not run into any problems.
Wim gravatar image Wim  ( 2011-10-17 07:01:42 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2011-10-19 10:26:38 -0500

sebastianh gravatar image

Ok I have found the source of the problem: rosmake was unable to build rospack and rosstack. When invoking make manually in /Users/shoefer/ros/ros/tools/rospack/ the following error occurs:

macbook:/Users/shoefer/ros/ros/tools/rospack/ shoefer$ make
 /Users/shoefer/ros/ros/tools/rospack/rospack.cpp: In member function 'void rospack::ROSPack::crawl_for_packages(bool)':
 /Users/shoefer/ros/ros/tools/rospack/rospack.cpp:1933: error: 'PATH_MAX' was not declared in this scope
 /Users/shoefer/ros/ros/tools/rospack/rospack.cpp:1935: error: 'tmp_cache_dir' was not declared in this scope
 /Users/shoefer/ros/ros/tools/rospack/rospack.cpp:1945: error: 'tmp_cache_path' was not declared in this scope

This is a problem of my gcc version which is gcc-mp-4.4 (installed via Macports). The default gcc shipped with XCode (on my machine it is gcc-4.2) does actually define PATH_MAX. So to be safe one should better use a different gcc version, but a quick hack actually also did the job, namely defining PATH_MAX manually in rospack.cpp and rosstack.cpp:

 #define PATH_MAX   256

Maybe it would be a good idea to check if PATH_MAX is defined to prevent other users from getting into the same trouble. Any comments on that?

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2011-10-16 04:56:21 -0500

Seen: 522 times

Last updated: Oct 19 '11