[MacPorts] #59837: macOS 10.14 SDK does not appear to be installed even though Command Line Tools are installed

MacPorts noreply at macports.org
Sun May 10 05:07:28 UTC 2020


#59837: macOS 10.14 SDK does not appear to be installed even though Command Line
Tools are installed
------------------------+--------------------
  Reporter:  manulcaux  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  Normal     |  Milestone:
 Component:  base       |    Version:
Resolution:             |   Keywords:
      Port:             |
------------------------+--------------------

Comment (by cktse):

 I encountered similar error with MacOS10.14 SDK not found from Xcode
 command line tools, as the main Xcode build had already been updated to
 10.15. Here's how I managed to fix it. See if this also helps in your
 case.

 Here's the path to 10.14 SDK in the command line SDK:
 $ ls -l /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk

 Create symlink to 10.14 SDK within the main Xcode SDK directory:
 $ cd
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
 $ ls -l
 total 0
 drwxr-xr-x  4 root  wheel  128 Jan 14 07:14 DriverKit19.0.sdk
 drwxr-xr-x  8 root  wheel  256 Jan 14 07:14 MacOSX.sdk
 lrwxr-xr-x  1 root  wheel   10 Nov 18 16:10 MacOSX10.15.sdk -> MacOSX.sdk

 $ sudo ln -s /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 $ ls -l
 total 0
 drwxr-xr-x  4 root  wheel  128 Jan 14 07:14 DriverKit19.0.sdk
 drwxr-xr-x  8 root  wheel  256 Jan 14 07:14 MacOSX.sdk
 lrwxr-xr-x  1 root  wheel   56 May 10 12:53 MacOSX10.14.sdk ->
 /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
 lrwxr-xr-x  1 root  wheel   10 Nov 18 16:10 MacOSX10.15.sdk -> MacOSX.sdk

 Confirm the xcrun can now locate 10.14 SDK:
 $ xcrun --sdk macosx10.14 --show-sdk-path -v
 xcrun: note: looking up SDK with
 '/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk
 macosx10.14 -version Path'
 xcrun: note: PATH =
 '/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/texbin'
 xcrun: note: SDKROOT = 'macosx10.14'
 xcrun: note: TOOLCHAINS = ''
 xcrun: note: DEVELOPER_DIR = '/Applications/Xcode.app/Contents/Developer'
 xcrun: note: XCODE_DEVELOPER_USR_PATH = ''
 xcrun: note: xcrun_db =
 '/var/folders/vk/zmf77rhs3w15b_qkn7b46lch0000gn/T/xcrun_db'
 xcrun: note: lookup resolved to:
 '/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk'
 /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk

 Previously xcrun returned an error:

 $ xcrun --sdk macosx10.14 --show-sdk-path
 xcodebuild: error: SDK "macosx10.14" cannot be located.
 xcodebuild: error: SDK "macosx10.14" cannot be located.
 xcrun: error: unable to lookup item 'Path' in SDK 'macosx10.14'

 Hope this helps.

 CK

-- 
Ticket URL: <https://trac.macports.org/ticket/59837#comment:27>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list