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

Compiler Segmantion fault durint ROS installation on OSX Lion

asked 2011-07-21 22:02:29 -0600

LucaGhera gravatar image

updated 2011-08-01 04:53:53 -0600

kwc gravatar image

Hi all,

I know that Osx is only "experimental" supported and that Lion is really new.

Despite that, I'm trying to install ROS on my machine. I'm following the guide on this page but I had a segmentation fault error.

The output is the following:

Bootstrapping ROS build
Detected ros_comm bootstrapping it too.
[ rosmake ] Packages requested are: ['ros', 'ros_comm']                                                                                         
[ rosmake ] Logging to directory/Users/luca/.ros/rosmake/rosmake_output-20110722-113953                                                         
[ rosmake ] Expanded args ['ros', 'ros_comm'] to:
['rosunit', 'rospack', 'rosmake', 'rosemacs', 'rosdep', 'roscreate', 'rosclean', 'rosboost_cfg', 'rosbash', 'test_rospack', 'test_rosmake', 'test_roslib', 'test_rosdep', 'test_roscreate', 'roslib', 'roslang', 'rosbuild', 'mk', 'xmlrpcpp', 'roswtf', 'rostime', 'message_filters', 'cpp_common', 'topic_tools', 'rostopic', 'rostest', 'rosservice', 'rosrecord', 'rosparam', 'rosout', 'rosnode', 'rosmsg', 'rosmaster', 'roslaunch', 'rosgraph', 'rosconsole', 'rosbagmigration', 'rosbag', 'test_topic_tools', 'test_roswtf', 'test_rostopic', 'test_rostime', 'test_rostest', 'test_rosservice', 'test_rospy', 'test_rosparam', 'test_rosnode', 'test_rosmsg', 'test_rosmaster', 'test_roslib_comm', 'test_roslaunch', 'test_rosgraph', 'test_roscpp_serialization_perf', 'test_roscpp_serialization', 'test_roscpp', 'test_rosbag', 'test_ros', 'test_crosspackage', 'perf_roscpp', 'roscore_migration_rules', 'std_srvs', 'std_msgs', 'rosgraph_msgs', 'rospy', 'roslisp', 'roscpp_traits', 'roscpp_serialization', 'roscpp']
[ rosmake ] Generating Install Script using rosdep then executing. This may take a minute, you will be prompted for permissions. . .            
rosdep executing this script:
{{{
set -o errexit
#No packages to install
}}}
[ rosmake ] rosdep successfully installed all system dependencies                                                                               
[ rosmake ] Starting >>> tools/rospack                                                                                                          
[ rosmake ] Finished <<< tools/rospack                                                                                                          
[rosmake-0] Starting >>> roslib [ make ]                                                                                                        
[rosmake-1] Starting >>> rosemacs [ make ]                                                                                                      
[rosmake-1] Finished <<< rosemacs  No Makefile in package rosemacs                                                                              
[rosmake-1] Starting >>> rosboost_cfg [ make ]                                                                                                  
[rosmake-1] Finished <<< rosboost_cfg  No Makefile in package rosboost_cfg                                                                      
[rosmake-1] Starting >>> rosbash [ make ]                                                                                                       
[rosmake-1] Finished <<< rosbash  No Makefile in package rosbash                                                                                
[rosmake-1] Starting >>> rosbuild [ make ]                                                                                                      
[rosmake-1] Finished <<< rosbuild  No Makefile in package rosbuild                                                                              
[rosmake-1] Starting >>> roslang [ make ]                                                                                                       
[rosmake-1] Finished <<< roslang  No Makefile in package roslang                                                                                
[rosmake-1] Starting >>> mk [ make ]                                                                                                            
[rosmake-1] Finished <<< mk  No Makefile in package mk                                                                                          
[rosmake-1] Starting >>> xmlrpcpp [ make ]                                                                                                      
[rosmake-0] Finished <<< roslib [PASS] [ 13.94 seconds ]                                                                                        
[rosmake-0] Starting >>> rosunit [ make ]                                                                                                       
[rosmake-1] Finished <<< xmlrpcpp [PASS] [ 14.36 seconds ]                                                                                      
[rosmake-1] Starting >>> rosdep [ make ]                                                                                                        
[rosmake-1] Finished <<< rosdep  No Makefile in package rosdep                                                                                  
[rosmake-1] Starting >>> rosmake [ make ]                                                                                                       
[rosmake-0] Finished <<< rosunit [PASS] [ 1.69 seconds ]                                                                                        
[rosmake-0] Starting >>> roscreate [ make ]                                                                                                     
[rosmake-1] Finished <<< rosmake [PASS] [ 1.60 seconds ]                                                                                        
[rosmake-1] Starting >>> rosclean [ make ]                                                                                                      
[rosmake-0] Finished <<< roscreate [PASS] [ 2.01 seconds ]                                                                                      
[rosmake-0] Starting >>> test_rospack [ make ]                                                                                                  
[rosmake-1] Finished <<< rosclean [PASS] [ 1.93 seconds ]                                                                                       
[rosmake-1] Starting >>> test_rosmake [ make ]                                                                                                  
[rosmake-1] Finished <<< test_rosmake [PASS] [ 2.82 seconds ]                                                                                   
[rosmake-1] Starting >>> test_roslib [ make ]                                                                                                   
[rosmake-0] Finished <<< test_rospack [PASS] [ 4.15 seconds ]                                                                                   
[rosmake-0] Starting >>> test_rosdep [ make ]                                                                                                   
[rosmake-0] Finished <<< test_rosdep [PASS] [ 2.62 seconds ]                                                                                    
[rosmake-0] Starting >>> test_roscreate [ make ]                                                                                                
[rosmake-0] Finished <<< test_roscreate [PASS] [ 1.79 seconds ]                                                                                 
[rosmake-0] Starting >>> std_msgs [ make ]                                                                                                      
[rosmake-1] Finished <<< test_roslib [PASS] [ 7.34 seconds ]                                                                                    
[rosmake-1] Starting >>> rosgraph [ make ]                                                                                                      
[rosmake-1] Finished <<< rosgraph [PASS] [ 1.97 seconds ]                                                                                       
[rosmake-1] Starting >>> rosmaster [ make ]                                                                                                     
[rosmake-1] Finished <<< rosmaster [PASS] [ 1.57 seconds ]                                                                                      
[rosmake-1] Starting >>> cpp_common [ make ]                                                                                                    
[rosmake-1] Finished <<< cpp_common [PASS] [ 1.66 seconds ]                                                                                     
[rosmake-1] Starting >>> roscpp_traits [ make ]                                                                                                 
[rosmake-1] Finished <<< roscpp_traits [PASS] [ 1.42 seconds ]                                                                                  
[rosmake-1] Starting >>> rostime [ make ]                                                                                                       
[rosmake-0] Finished <<< std_msgs [PASS] [ 10.67 seconds ]                                                                                      
[rosmake-0] Starting >>> rosgraph_msgs [ make ]                                                                                                 
[rosmake-1] Finished <<< rostime [PASS] [ 3.25 seconds ]                                                                                        
[rosmake-1] Starting >>> roscpp_serialization [ make ]                                                                                          
[rosmake-1] Finished <<< roscpp_serialization [PASS] [ 2.41 seconds ]                                                                           
[rosmake-1] Starting >>> rosconsole [ make ]                                                                                                    
[rosmake-0] Finished <<< rosgraph_msgs [PASS] [ 9.76 seconds ]                                                                                  
[rosmake-0] Starting >>> rospy [ make ]                                                                                                         
[rosmake-0] Finished <<< rospy [PASS] [ 4.57 seconds ]                                                                                          
[rosmake-0] Starting >>> rosnode ...
(more)
edit retag flag offensive close merge delete

Comments

I am looking into this issue. While it is definitely a compiler bug, I think it might be triggered by something in the code. See: https://lists.nongnu.org/archive/html/igraph-help/2011-07/msg00053.html. igraph ran into a similar problem and they managed to work around it with code changes.
William gravatar image William  ( 2011-08-08 01:47:21 -0600 )edit
So an update: commenting lines 569 and 576 out in file rosconsole.cpp will allow it to compile. No idea why this happens. I just used a binary search like approach to commenting in order to find those lines =p. I will try to figure it out, but input from others would be awesome.
William gravatar image William  ( 2011-08-08 04:01:00 -0600 )edit
@mrath asks "I uncommented the print function as well, however I don't get any output in rxconsole - could this be what the function does? I've only tried ROS the past few days, so I'm not sure if the problem is something else.."
mjcarroll gravatar image mjcarroll  ( 2011-08-22 10:06:41 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
4

answered 2011-08-08 10:17:48 -0600

William gravatar image

updated 2011-08-31 09:30:03 -0600

I haven't found the problem with the compiler or ROS (specifically rosconsole), but I have found out what to comment out to work around the issue. The print(...) function with an ellipsis in it (rosconsole.cpp) causes the issue. I don't know why it does and I worked at it for quite a while, but then I realized that it doesn't seem to be being used (someone correct me if I am wrong), so I just commented it out.

You can see the fix here:

https://github.com/wjwwood/ros_comm/commit/71ccc123db3c7cd4c3343750ae0ef5803f7a828c

Or apply the patch yourself by downloading it from the ticket:

https://code.ros.org/trac/ros/ticket/3626

UPDATE:

There is a new patch that forces rosconsole to build with clang++ rather than llvm-g++ and it allows you to build cleanly without commenting out code.

https://code.ros.org/trac/ros/ticket/3626#comment:7

edit flag offensive delete link more

Comments

@William Fine! It works, now I can finally compile the base stacks. Does this patch exclude some important feature?
LucaGhera gravatar image LucaGhera  ( 2011-08-11 22:13:23 -0600 )edit
I don't know exactly, it looks like there are three print statements and they are only using one, and there fore you can safely comment the one in my patch out. I didn't look very hard though, and that function might be needed, but I haven't run into problems yet.
William gravatar image William  ( 2011-08-12 02:30:21 -0600 )edit
2

answered 2011-07-30 09:25:33 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >75 is welcome to improve it.

I'd recommend filing a bug at the suggested URL.

edit flag offensive delete link more

Comments

Was this ever filed, and where? any solutions so far?
makokal gravatar image makokal  ( 2011-08-01 05:47:04 -0600 )edit
1

answered 2011-07-21 22:56:47 -0600

updated 2011-08-08 04:19:04 -0600

Since it's a segfault in the compiler, it's unlikely to have much to do with ROS itself.

You didn't mention what compiler (and version) you are using. If there is a newer version of your compiler, I'd upgrade and see if that fixes it.

If not, you might want to try compiling with clang which is unlikely to have a bug in the same place.

edit flag offensive delete link more

Comments

Thanks Asomervilee. I updated the compiler but nothing changed!
LucaGhera gravatar image LucaGhera  ( 2011-07-23 05:05:00 -0600 )edit

Question Tools

Stats

Asked: 2011-07-21 22:02:29 -0600

Seen: 919 times

Last updated: Aug 31 '11