[MacPorts] #41321: kdelibs4: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)

MacPorts noreply at macports.org
Thu Dec 5 22:06:44 PST 2013


#41321: kdelibs4: invalid deployment target for -stdlib=libc++ (requires OS X 10.7
or later)
------------------------------------+-----------------------
  Reporter:  ryandesign@…           |      Owner:  nicos@…
      Type:  defect                 |     Status:  new
  Priority:  Normal                 |  Milestone:
 Component:  ports                  |    Version:  2.2.99
Resolution:                         |   Keywords:  mavericks
      Port:  kdelibs4, kdepimlibs4  |
------------------------------------+-----------------------
Changes (by ryandesign@…):

 * version:  2.2.1 => 2.2.99


Comment:

 I think we're on the wrong track above.

 I'm using MacPorts trunk, which passes `-stdlib=${configure.cxx_stdlib}`
 in `CXXFLAGS`. On Mavericks, `${configure.cxx_stdlib}` defaults to
 `libc++` while on earlier OS X versions it defaults to `libstdc++`, but it
 can be changed in macports.conf if you're adventurous and rebuild all your
 ports afterward. MacPorts 2.2.x and earlier don't pass this flag, instead
 letting the compiler use its default C++ library.

 Furthermore the cmake portgroup sets `MACOSX_DEPLOYMENT_TARGET` to the
 empty string. I suspect the KDE cmake files are actively checking
 `MACOSX_DEPLOYMENT_TARGET` and are determining that "" is not greater than
 or equal to "10.7" and therefore print the error.

 I tried changing the cmake portgroup to set `MACOSX_DEPLOYMENT_TARGET` to
 `${macosx_deployment_target}` but this met with a new error:

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

 I remember we don't want to unconditionally set `CMAKE_OSX_SYSROOT` to an
 actual SDK, so this is not the right fix. But this shows that setting
 `CMAKE_OSX_DEPLOYMENT_TARGET` is a valid and recommended thing to do. I
 just don't think KDE's cmake files know that or were expecting that.

 I think the fix will be to educate the KDE cmake files that when
 `MACOSX_DEPLOYMENT_TARGET` is empty it should instead use the current OS X
 version when checking whether `-stdlib=libc++` is acceptable.

-- 
Ticket URL: <https://trac.macports.org/ticket/41321#comment:7>
MacPorts <http://www.macports.org/>
Ports system for OS X


More information about the macports-tickets mailing list