pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Darwin bootstrap failure



On 5/26/23 10:22, Jonathan Perkin wrote:
* On 2023-05-26 at 16:02 BST, Jason Bacon wrote:

On 5/26/23 09:38, Jonathan Perkin wrote:

You can use the default MacOSX.sdk link by setting OSX_TOLERATE_SDK_SKEW=yes, as long as you are ok with the SDK changing from beneath you on upgrades and potentially running into incompatibilities.

I'm not seeing a difference here.  Since Darwin,mk appears to determine the SDK path on the fly, when I update macOS from 13.2 to 13.4, then the hard-coded mapping would change from 13.1 to 13.3 along with the symlink, correct?

OSX_SDK_MAP.13.2=       13.1
OSX_SDK_MAP.13.4=       13.3

Yeh, at this point we should probably just remove it, make skew the default, and recommend users use MACOSX_DEPLOYMENT_TARGET if they want to be specific about their target SDK.


This seems to be all that's needed. The simplified Darwin.mk checks for MACOSX_DEPLOYMENT_TARGET, and if not defined, checks for OSX_SDK_PATH, and it that's not define, falls back on the default path, which should be the symlink /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk.

I'm not sure why we check for OSX_SDK_PATH. Seems like a more risky duplicate of MACOSX_DEPLOYMENT_TARGET. The latter lets xcrun generate a correct path based on the Xcode version, while the former lets the user specify anything they want. Is this useful?

Please test and let me know if you have any suggestions.  Thanks...

--- Darwin.mk.orig      2023-05-30 07:31:17
+++ Darwin.mk   2023-05-30 07:34:59
@@ -98,28 +98,6 @@
 MAKEFLAGS+=            OSX_VERSION=${OSX_VERSION:Q}
 .endif

-#
-# From Xcode 5 onwards system headers are no longer installed by default
-# into /usr/include, so we need to query their location if /usr/include is
-# not available.
-#
-# Apple do not always keep the SDK version in step with the OS version. When -# that happens add a mapping below, but only within the same OS release major.
-#
-OSX_SDK_MAP.11.2=      11.1
-OSX_SDK_MAP.11.4=      11.3
-OSX_SDK_MAP.11.5=      11.3
-OSX_SDK_MAP.11.6=      11.3
-OSX_SDK_MAP.11.7=      12.1
-OSX_SDK_MAP.12.2=      12.1
-OSX_SDK_MAP.12.4=      12.3
-OSX_SDK_MAP.12.5=      12.3
-OSX_SDK_MAP.12.6=      12.3
-OSX_SDK_MAP.13.0=      13.0
-OSX_SDK_MAP.13.1=      13.1
-OSX_SDK_MAP.13.2=      13.1
-OSX_SDK_MAP.13.3=      13.3
-OSX_SDK_MAP.13.4=      13.3
 #
# If the user has set MACOSX_DEPLOYMENT_TARGET (ideally at bootstrap time) to
 # select a specific SDK then we prefer that.
@@ -140,13 +118,7 @@
 _OPSYS_INCLUDE_DIRS?=  /usr/include
 .elif exists(/usr/bin/xcrun)
 .  if !defined(OSX_SDK_PATH)
-OSX_SDK_PATH!= /usr/bin/xcrun \
- --sdk macosx${OSX_SDK_MAP.${OSX_VERSION}:U${OSX_VERSION}} \
-                   --show-sdk-path 2>/dev/null || echo /nonexistent
-OSX_TOLERATE_SDK_SKEW?=        no
-. if ${OSX_SDK_PATH} == "/nonexistent" && !empty(OSX_TOLERATE_SDK_SKEW:M[Yy][Ee][Ss]) OSX_SDK_PATH!= /usr/bin/xcrun --sdk macosx --show-sdk-path 2>/dev/null || echo /nonexistent
-.    endif
 MAKEFLAGS+=    OSX_SDK_PATH=${OSX_SDK_PATH:Q}
 .  endif
 .  if exists(${OSX_SDK_PATH}/usr/include/stdio.h)



Home | Main Index | Thread Index | Old Index