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

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

Hello,

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 "http://packages.ros.org/cgi-bin/gen_rosinstall.py?rosdistro=electric&variant=ros-base&overlay=no"

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/pkg_resources.py", 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/pkg_resources.py", 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, 'setup.sh'), ros_comm_insert, rosdep_yes_insert), shell=True, executable='/bin/bash')
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/subprocess.py", line 488, in check_call
    raise CalledProcessError(retcode, cmd) 
subprocess.CalledProcessError: Command source /Users/shoefer/ros/setup.sh &&  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!

Sebastian

edit retag flag offensive close merge delete

Comments

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
2

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

Question Tools

Stats

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

Seen: 566 times

Last updated: Oct 19 '11