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

Revision history [back]

click to hide/show revision 1
initial version

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?