Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#37527 closed defect (fixed)

cmake portgroup broken with latest version of cmake, 2.8.10

Reported by: mamoll (Mark Moll) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: cmake, portgroup Cc: cssdev, ryandesign (Ryan Schmidt), mndavidoff (Monte Davidoff), macports@…, mas@…, jeremyhu (Jeremy Huddleston Sequoia)
Port:

Description

I get this error using the cmake portgroup:

CMake Error at /opt/local/share/cmake-2.8/Modules/Platform/Darwin.cmake:190 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.8' 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.

The solution seems to be to simply remove "-DCMAKE_OSX_SYSROOT=/" from the configure.args.

Change History (9)

comment:1 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: css@… ryandesign@… added
Port: any port that uses the cmake port group removed

There was a specific reason though why we added that to the cmake portgroup. Are we sure that reason no longer applies?

comment:2 Changed 9 years ago by mndavidoff (Monte Davidoff)

Cc: md14-macports@… added

Cc Me!

comment:3 Changed 9 years ago by ryandesign (Ryan Schmidt)

Cc: macports@… added

Has duplicate #37530.

comment:4 Changed 9 years ago by mamoll (Mark Moll)

r78651 refers to #29008 and #29452. That was in the Tiger days with an older version of cmake. Maybe "-DCMAKE_OSX_SYSROOT=/" is no longer necessary. Another fix would be to specify a valid value for CMAKE_OSX_SYSROOT. If I don't specify one, cmake sets it to /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk in the CMakeCache.txt.

comment:5 Changed 9 years ago by mas@…

Cc: mas@… added

Cc Me!

comment:6 Changed 9 years ago by jmroot (Joshua Root)

Cc: jeremyhu@… added

Jeremy committed r101141 to avoid this error. It's probably better than failing to build, but I'm not sure if this is actually doing quite what we want (see mailing list). We want to not use -isysroot at all when configure.sdkroot is empty, and always set MACOSX_DEPLOYMENT_TARGET.

comment:7 Changed 9 years ago by jeremyhu (Jeremy Huddleston Sequoia)

Resolution: fixed
Status: newclosed

I assumed that there was a good reason someone else had for setting it to /, but that seems to not be the case, so I've updated it in r101169.

comment:8 Changed 9 years ago by jmroot (Joshua Root)

There was a good reason; cmake always uses an SDK otherwise if a deployment target is set.

comment:9 Changed 9 years ago by cooljeanius (Eric Gallager)

Hey while you guys are changing the CMake portgroup, can you take a look at my patch for it in Issue #37341? It'd solve a lot of the problems of CMake mistakenly picking up frameworks from the /Library/Frameworks folder.

Note: See TracTickets for help on using tickets.