Ask Your Question
5

CMAKE_OSX_DEPLOYMENT_TARGET and CMAKE_OSX_SYSROOT

asked 2012-12-15 07:34:17 -0600

this post is marked as community wiki

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

Hi possible lifesavers,

I am just getting started with ROS, and now having trouble with rosmake. When I try to do rosmake, it will give:

CMake Error at /usr/local/Cellar/cmake/2.8.10.1/share/cmake/Modules/Platform/Darwin.cmake:190 (message):
    CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but CMAKE_OSX_SYSROOT:

     " "

    is not set to a MacOSX SDK with a recognized version.  Either set
    CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
    empty.
  Call Stack (most recent call first):
    /usr/local/Cellar/cmake/2.8.10.1/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)



  -- Configuring incomplete, errors occurred!

Then I configured CMAKE_OSX_SYSROOT to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk Now, I am getting:

CMake Error at /usr/local/Cellar/cmake/2.8.10.1/share/cmake/Modules/Platform/Darwin.cmake:190 (message):
    CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but CMAKE_OSX_SYSROOT:

     "10.7"

    is not set to a MacOSX SDK with a recognized version.  Either set
    CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
    empty.
  Call Stack (most recent call first):
    /usr/local/Cellar/cmake/2.8.10.1/share/cmake/Modules/CMakeSystemSpecificInformation.cmake:36 (include)



  -- Configuring incomplete, errors occurred!

which does not really make sense to me now.

So, any ideas?

edit retag flag offensive close merge delete

Comments

I have the same issue too ... trying to figure it out.

Kevin gravatar imageKevin ( 2013-01-01 14:53:51 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
2

answered 2013-01-01 15:12:02 -0600

Kevin gravatar image

ok this is what I did, go to /opt/ros/groovy/share/ros/core/rosbuild/public.cmake and comment out line 164 (with the # symbol) that say:

if(APPLE)
   #SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.8" CACHE STRING "Deployment target for OSX" FORCE)
endif(APPLE)

That seems to work for me so far. Maybe @WilliamWoodall might have a better idea.

I have OSX 10.8, ROS Groovy Beta 3, cmake 2.8.10.1, and XCode 4.5.2

edit flag offensive delete link more

Comments

Note, I tried changing the 10.6 to a 10.8 since I am using OSX 10.8 and it didn't help. Your line 164 of public.cmake will say 10.6.

Kevin gravatar imageKevin ( 2013-01-01 15:16:14 -0600 )edit
1

I didn't add this line, I'll have to look at the history to see when/why it was introduced. I haven't run into this problem yet.

WilliamWoodall gravatar imageWilliamWoodall ( 2013-01-02 09:21:12 -0600 )edit

That should be correct if you did not install it (for some reason) to /opt/ros/groovy. Make sure you do a make clean, that may help.

Kevin gravatar imageKevin ( 2013-01-21 07:46:25 -0600 )edit

Just look for the one which is under the path returned by rospack find rosbuild

WilliamWoodall gravatar imageWilliamWoodall ( 2013-01-21 07:55:34 -0600 )edit
1

answered 2013-02-18 05:37:41 -0600

this post is marked as community wiki

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

This is a bug in CMake.

This workaround should not be needed in the future:

http://cmake.3232098.n2.nabble.com/OSX-deployment-target-confusion-for-2-8-10-td7582284.html

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

4 followers

Stats

Asked: 2012-12-15 07:34:17 -0600

Seen: 9,297 times

Last updated: Apr 09 '13