It is a little odd that one of the package receipts is not named com.apple.pkg.CLTools_SDK_macOS111
but instead is named com.apple.pkg.CLTools_SDK_macOS110 > >> MacPorts 2.6.4 was released before Apple released macOS 11.1. We did not yet >> know how the version numbers of macOS and the macOS SDK would progress under >> macOS 11. We made a guess based on what had happened in macOS 10.15 and >> earlier, and we guessed wrong. We have corrected the code already and it >> will be included in a future version of MacPorts. >> >> macOS 11 users can ignore this warning until that future version of MacPorts >> is released, with the caveat that it is still important to have both Xcode >> and the command line tools installed, so users should manually verify that >> this is the case, not just once but periodically, especially after an OS >> update, since macOS has had a bug which deletes the CLT receipt, thus >> preventing the CLT from showing up in software update. Also do make sure >> that you have a matched set of Xcode and the command line tools -- and I >> think that perhaps you do not, possibly due to the aforementioned macOS bug. >> See https://trac.macports.org/wiki/ProblemHotlist#reinstall-clt >> >> The warning is occurring because you are using a version of macOS (11.1) >> with a version of Xcode and/or the command line tools that does not contain >> an SDK of that version. You say you are using Xcode 12.4 but Xcode 12.4 does >> contain the 11.1 SDK so if the port you are seeing the message with is using >> Xcode, then you should not see this warning. >> >> Most ports do not use Xcode; they use the command line tools. So it is >> possible that you are using a version of the command line tools that does >> not contain the 11.1 SDK. You can check what SDK it contains by listing the >> contents of the directory /Library/Developer/CommandLineTools/SDKs. Assuming >> that MacOSX11.1.sdk is not in that directory, you should probably reinstall >> the Xcode 12.4 version of the command line tools per the link above (or by >> downloading from the Apple developer web site) so that you have a matched >> set, which will probably eliminate the warning. > > I believe my machine has command-line tools and SDK which match the Xcode > version, and has a package receipt for them also. I could be wrong, but I > will show you why I believe that, and the details of my case might be useful > to you because there is perhaps a little twist which I will get to. > > You can see that there are two SDKs here, including the one that you expect, > and the name MacOSX.sdk links to it too: > > % ls -l /Library/Developer/CommandLineTools/SDKs > > lrwxr-xr-x 1 root wheel 14 Feb 6 16:23 *MacOSX.sdk* -> MacOSX11.1.sdk > drwxr-xr-x 8 root wheel 256 Jul 9 2020 *MacOSX10.15.sdk* > drwxr-xr-x 7 root wheel 224 Nov 30 07:33 *MacOSX11.1.sdk* > > I am not sure which package receipt specifically is important, but I have > these: > > % pkgutil --pkgs | grep -i cltool > com.apple.pkg.CLTools_Executables > com.apple.pkg.CLTools_SDK_macOS110 > com.apple.pkg.CLTools_SDK_macOS1015 > com.apple.pkg.CLTools_macOS_SDK > > This machine is about one week old. One of the very first things I did was > type 'git' to the shell, which caused macOS to offer to install the Command > Line Tools. I said yes, and was happily using git and the compilers and > other tools for several days. > > Then later, when I decided to install MacPorts, I read that Xcode is required > so I installed that. When I ran Xcode once, Xcode itself offered to install > Command Line Tools (or maybe it was during the installation process--not > sure). Anyway, I said yes again and still had command line tools. And Xcode > version 12.4 (12D4e) too. > > So my guess is that the initial install of CLT, kicked off by trying to run > git, was maybe the 10.15 you see. Then Xcode itself put CLT version 11.1, or > so it would seem. > > My conclusion is that I probably have what I am supposed to have. If you > think otherwise, please let me know. I assume that MacPorts in the new > version will also recognize that I have what I need and the spurious warning > would go away. > > Thanks for your detailed response, and I hope that these details of a typical > new use case might be useful to you in figuring out what MacOS looks like in > a non-upgrade situation. > > > > > >> If you update to macOS 11.2, the warning will come back, since there is no >> version of Xcode or the command line tools that contains the 11.2 SDK. >> >> If you wish, you could build MacPorts base from our git repository to >> receive the fix early. >> >> >