#61458 closed defect (invalid)
fresh install on Big Sur emits warning about SDK not installed
Reported by: | wlipa (Bill Lipa) | Owned by: | |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.4 |
Keywords: | Cc: | ||
Port: |
Description
I updated Xcode to 12.2 and installed a fresh version of MacPorts for Big Sur. Xcode-select reports that the command line tools are installed:
$ xcode-select --install xcode-select: error: command line tools are already installed, use "Software Update" to install updates
However the port command is giving a warning that the 11.0 SDK is not found. I have accepted the Xcode license on the command line and verified that Xcode itself launches without installing components.
$ sudo port install xz Warning: The macOS 11.0 SDK does not appear to be installed. Ports may not build correctly. Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'. ---> Computing dependencies for xz ...
Change History (8)
comment:1 Changed 4 years ago by wlipa (Bill Lipa)
comment:2 Changed 4 years ago by ryandesign (Ryan Carsten Schmidt)
It works fine for us.
Please verify that the path /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk exists. If it does not, reinstall Xcode 12.2.
Please verify that the path /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk exists. If it does not, reinstall the Xcode 12.2 version of the command line tools.
comment:3 Changed 4 years ago by wlipa (Bill Lipa)
Thanks, looks like those don't agree. Is there a recommended way to reinstall the command line tools?
$ ls -l /Library/Developer/CommandLineTools/SDKs total 0 lrwxr-xr-x 1 root wheel 15 Jan 14 2020 MacOSX.sdk -> MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 Jan 14 2020 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 Jan 14 2020 MacOSX10.15.sdk $ ls -l /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs total 0 drwxr-xr-x 5 root wheel 160 Oct 19 13:33 DriverKit20.0.sdk drwxr-xr-x 7 root wheel 224 Nov 13 08:32 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Nov 13 08:28 MacOSX11.0.sdk -> MacOSX.sdk
comment:4 Changed 4 years ago by mseri (Marcello Seri)
Also in my case the versions were not matching. The following fixed it (for me):
$ sudo rm -rf /Library/Developer/CommandLineTools $ xcode-select --install
It installed the new Command Line Tools and everything started working fine.
comment:5 Changed 4 years ago by wlipa (Bill Lipa)
Thanks. I wound up downloading the Xcode 12.2 command line tools from Apple's developer site. Running that installer solved the problem.
comment:6 Changed 4 years ago by jmroot (Joshua Root)
Yes, installing the pkg will do it. Unfortunately there is a bug where the receipt for the Command Line Tools is deleted on every Xcode (and possibly OS) update. Without the receipt, Software Update will never offer to update the CLTs. I don't know if it's still present on Big Sur but it happened on Catalina when updating to Xcode 12.2. We have a problem hotlist entry about this: ProblemHotlist#reinstall-clt
comment:7 Changed 4 years ago by jmroot (Joshua Root)
Resolution: | → invalid |
---|---|
Status: | new → closed |
Closing since the warning is correctly pointing out outdated CLTs.
comment:8 Changed 4 years ago by wlipa (Bill Lipa)
The warning was correct, but the advice it gave wasn't (it did nothing for my case), which causes confusion. How about changing it to:
Warning: You can install it as part of the Xcode Command Line Tools package by running `xcode-select --install'. In some cases, you may need to remove /Library/Developer/CommandLineTools before doing so.
Xcode seems to think it's there: