ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
This happens due to the fact that Xcode-4.2 does not come with g++-4.2.
The patch you linked does fix this issue, but I don't know why it doesn't work for you.
Does /usr/bin/g++-4.2
exist on your computer?
Are you sure that you are building and patching the same ROS source install? I often have multiple and some times when I do rosmake I am unintentionally building one and editing another.
This is the output of svn diff
on my install of ROS:
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt (revision 15449)
+++ CMakeLists.txt (working copy)
@@ -11,8 +11,15 @@
rosbuild_init()
+# See ticket: https://code.ros.org/trac/ros/ticket/3626
+# On mac use g++-4.2
IF(${CMAKE_SYSTEM} MATCHES "Darwin-11.*")
- set(CMAKE_CXX_COMPILER /usr/bin/g++-4.2)
+ IF(EXISTS "/usr/bin/g++-4.2")
+ set(CMAKE_CXX_COMPILER /usr/bin/g++-4.2)
+ ELSE(EXISTS "/usr/bin/g++-4.2")
+ # If there is no g++-4.2 use clang++
+ set(CMAKE_CXX_COMPILER /usr/bin/clang++)
+ ENDIF(EXISTS "/usr/bin/g++-4.2")
ENDIF(${CMAKE_SYSTEM} MATCHES "Darwin-11.*")
include_directories(include/rosconsole)
Other than that I don't know why that patch wouldn't work. Let use know here if it continues to be a problem.