[macports-base] 01/02: portconfigure: Don't fall back on macosx if we are unable to find an appropriate versioned SDK
Ryan Schmidt
ryandesign at macports.org
Thu Sep 28 22:54:50 UTC 2017
On Sep 4, 2017, at 17:23, Jeremy Huddleston Sequoia wrote:
> Jeremy Huddleston Sequoia (jeremyhu) pushed a commit to branch master
> in repository macports-base.
>
>
> https://github.com/macports/macports-base/commit/69c745b2d71ac333d21da953497fd6ae903ce242
>
> commit 69c745b2d71ac333d21da953497fd6ae903ce242
>
> Author: Jeremy Huddleston Sequoia <jeremyhu at macports.org>
> AuthorDate: Mon Sep 4 15:19:04 2017 -0700
>
>
> portconfigure: Don't fall back on macosx if we are unable to find an appropriate versioned SDK
>
> Signed-off-by: Jeremy Huddleston Sequoia <jeremyhu at macports.org>
>
> ---
> src/port1.0/portconfigure.tcl | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/src/port1.0/portconfigure.tcl b/src/port1.0/portconfigure.tcl
> index 4b9f02e..a93e05d 100644
> --- a/src/port1.0/portconfigure.tcl
> +++ b/src/port1.0/portconfigure.tcl
> @@ -419,10 +419,14 @@ proc portconfigure::configure_get_sdkroot {sdk_version} {
> return $sdk
> }
>
> - if {![catch {set sdk [exec xcrun --sdk macosx --show-sdk-path 2> /dev/null]}]} {
> - ui_warn "Unable to determine location of the macOS ${sdk_version} SDK. Using the default macOS SDK."
> - return $sdk
> - }
> + # TODO: Support falling back to "macosx" if it is present?
> + # This leads to problems when it is newer than the base OS because many OSS assume that
> + # the SDK version matches the deployment target, so they unconditionally try to use
> + # symbols that are only available on newer OS versions..
> + #if {![catch {set sdk [exec xcrun --sdk macosx --show-sdk-path 2> /dev/null]}]} {
> + # ui_warn "Unable to determine location of the macOS ${sdk_version} SDK. Using the default macOS SDK."
> + # return $sdk
> + #}
But this doesn't really help, does it? Xcode 8 only contains the 10.12 SDK, so when running on OS X 10.11 the only SDK you can use is a mismatched one. Similarly with Xcode 9 which only contains the 10.13 SDK even when running on macOS 10.12.
So, what does the code now do in these situations where an SDK matching the OS version does not exist?
More information about the macports-dev
mailing list