Opened 10 years ago

Closed 10 years ago

#44335 closed defect (fixed)

cmake portgroup: support configure.sdk_version and macosx_sdk_version

Reported by: help@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.1
Keywords: Cc:
Port:

Description

Log is attached. Error message reads the following:

:info:configure CMake Warning at /opt/local/share/cmake-3.0/Modules/Platform/Darwin.cmake:179 (message):
:info:configure   Ignoring CMAKE_OSX_SYSROOT value:
:info:configure 
:info:configure    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk
:info:configure 
:info:configure   because the directory does not exist.
:info:configure Call Stack (most recent call first):
:info:configure   /opt/local/share/cmake-3.0/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
:info:configure   CMakeLists.txt:1 (project)
:info:configure 
:info:configure 
:info:configure CMake Error at /opt/local/share/cmake-3.0/Modules/Platform/Darwin.cmake:211 (message):
:info:configure   CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but CMAKE_OSX_SYSROOT:
:info:configure 
:info:configure    ""
:info:configure 
:info:configure   is not set to a MacOSX SDK with a recognized version.  Either set
:info:configure   CMAKE_OSX_SYSROOT to a valid SDK or set CMAKE_OSX_DEPLOYMENT_TARGET to
:info:configure   empty.
:info:configure Call Stack (most recent call first):
:info:configure   /opt/local/share/cmake-3.0/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
:info:configure   CMakeLists.txt:1 (project)
:info:configure 
:info:configure 
:info:configure -- Configuring incomplete, errors occurred!

Without macosx_deployment_target in macports.conf taglib builds fine.

Attachments (1)

main.log (34.0 KB) - added by help@… 10 years ago.

Download all attachments as: .zip

Change History (6)

Changed 10 years ago by help@…

Attachment: main.log added

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

I would expect this to happen with any port that uses the cmake portgroup, not just taglib.

The obvious solution would be to not set macosx_deployment_target in macports.conf. The option is undocumented because it is unsupported.

The SDK in MacPorts has historically been set based on the deployment target, though this is wrong; they should be decoupled. In r115429 a separate option macosx_sdk_version was added but the cmake portgroup has not yet been updated to use this. However, since that change was released to the public in MacPorts 2.3.0, we should modify the cmake portgroup to use it.

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Using the patch from #41783 also would fix the problem, however there were some other unresolved issues with that.

comment:3 Changed 10 years ago by help@…

To be honest I don't exactly get what's the point of changing SDK to older version. It all seems to work fine with latest SDK, header files do after all contain information about in which OS version particular function was introduced and stuff like that. When I run cmake with -DCMAKE_OSX_DEPLOYMENT_TARGET=10.6 option for software outside macports (darktable in this case) I get following output:

CMake Warning at /opt/local/share/cmake-3.0/Modules/Platform/Darwin.cmake:143 (message):
  CMAKE_OSX_DEPLOYMENT_TARGET is '10.6' but the matching SDK does not exist
  at:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk"

  Instead using SDK:

   "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk"

  matching the host OS X version.
Call Stack (most recent call first):
  /opt/local/share/cmake-3.0/Modules/CMakeSystemSpecificInformation.cmake:36 (include)
  CMakeLists.txt:1 (project)

I don't set CMAKE_OSX_SYSROOT myself, so there's just a warning, not an error, and everything works fine. I guess it still requires some SDK (why not just use / as SYSROOT?..), but 10.9 suffices.

Am I right to understand that currect macports release doesn't support macosx_sdk_version setting, but next release (minor? major?) will?

comment:4 in reply to:  3 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: rmstonecipher@… removed
Owner: changed from macports-tickets@… to ryandesign@…
Port: taglib removed
Status: newassigned
Summary: taglib @1.9.1 with macosx_deployment_target set fails to configurecmake portgroup: support configure.sdk_version and macosx_sdk_version

Replying to help@…:

I don't set CMAKE_OSX_SYSROOT myself, so there's just a warning, not an error, and everything works fine. I guess it still requires some SDK (why not just use / as SYSROOT?..), but 10.9 suffices.

There were some problems setting CMAKE_OSX_SYSROOT to / if I remember correctly.

Am I right to understand that currect macports release doesn't support macosx_sdk_version setting, but next release (minor? major?) will?

MacPorts 2.3.0 and later (i.e. the current version) supports macosx_sdk_version; the cmake portgroup does not, though I will fix that momentarily.

comment:5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.