macOS 11.1 SDK does not appear to be installed

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

macOS 11.1 SDK does not appear to be installed

Todd Doucet
I have read everything I can about this warning, but none of it corresponds to exactly my situation, hence this report.

I have a brand new Mac Mini M1, and a fresh MacPorts installation.  This is not an upgrade--I have never had MacPorts on this machine, ever.

I definitely have both Xcode 12.4 and the Command Line Tools that Xcode wanted to install.  I do not know the version number of those tools because I don't know how to find that out.  But it is whatever Apple provided by install a few days ago.  I have provided all the incantations that I have seen on your web pages to install, verify install, accept licenses, etc.  And this is Big Sur 11.1.

Yet I see the following message when building various ports from source: 

  Warning: The macOS 11.1 SDK does not appear to be installed. Ports may not build correctly.


Reading other threads and guessing a little, maybe I am supposed to ignore the warning.  If that is not the case, I sure do not know what I am supposed to do instead.

I discovered this when I started to work on figuring out why the MacPorts py39.scipy port does not actually work, and maybe helping to fix it.  (It fails scipy.test(), for example, or even segfaults if you "import scipy.signal" among other things.)

I actually have a handle on the problem and would like to contribute a solution, but really first I would like there to be no uncertainty about whether I have a working MacPorts system itself.

I am reporting this because I imagine that the developers would want to know if a brand-new installation on a brand-new computer does not actually work, or at the very least generates specious warnings.  I know I would want to know that.

I know that this is early days and ports themselves are expected to be broken for a while.  But really I think MacPorts itself is supposed to install and work correctly on a fresh install on a new machine.  



Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

ryandesign2
Administrator


On Feb 11, 2021, at 14:50, Todd Doucet wrote:

> I have read everything I can about this warning, but none of it corresponds to exactly my situation, hence this report.
>
> I have a brand new Mac Mini M1, and a fresh MacPorts installation.  This is not an upgrade--I have never had MacPorts on this machine, ever.
>
> I definitely have both Xcode 12.4 and the Command Line Tools that Xcode wanted to install.  I do not know the version number of those tools because I don't know how to find that out.  But it is whatever Apple provided by install a few days ago.  I have provided all the incantations that I have seen on your web pages to install, verify install, accept licenses, etc.  And this is Big Sur 11.1.
>
> Yet I see the following message when building various ports from source:
>
>   Warning: The macOS 11.1 SDK does not appear to be installed. Ports may not build correctly.
>
> Reading other threads and guessing a little, maybe I am supposed to ignore the warning.  If that is not the case, I sure do not know what I am supposed to do instead.
>
> I discovered this when I started to work on figuring out why the MacPorts py39.scipy port does not actually work, and maybe helping to fix it.  (It fails scipy.test(), for example, or even segfaults if you "import scipy.signal" among other things.)
>
> I actually have a handle on the problem and would like to contribute a solution, but really first I would like there to be no uncertainty about whether I have a working MacPorts system itself.
>
> I am reporting this because I imagine that the developers would want to know if a brand-new installation on a brand-new computer does not actually work, or at the very least generates specious warnings.  I know I would want to know that.
>
> I know that this is early days and ports themselves are expected to be broken for a while.  But really I think MacPorts itself is supposed to install and work correctly on a fresh install on a new machine.  

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.

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.

Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

Todd Doucet

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.



Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

Todd Doucet
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.




Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

ryandesign2
Administrator
In reply to this post by Todd Doucet
On Feb 11, 2021, at 18:47, Todd Doucet wrote:

> 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

This looks normal to me. As far as I can tell, it is normal for the Xcode 12.4 command line tools installer to give you both the 10.15 SDK and the 11.1 SDK. Apple has changed their mind a few times about whether Xcode and the CLT provide only the latest OS SDK or both the latest OS SDK and the previous OS SDK, but right now they appear to be providing both latest and previous.


> 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

The first one is the one that MacPorts checks for (on 10.9 and later; on earlier OS versions it has different names) and the one that we believe Apple's software update checks for. You can verify which version of the CLT you have by running:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version


> 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.

I do not believe that Xcode offered you to install the CLT; I have never known Xcode to do that. Xcode does ask you about installing additional components when it is first opened, and if you do not allow it, Xcode quits, so you probably allowed it. But "additional components" and "command line tools" are unrelated things.


> My conclusion is that I probably have what I am supposed to have.  If you think otherwise, please let me know.

You stated you are running macOS 11.1, and you appear to have the 11.1 SDK. Therefore I cannot explain why you are seeing the warning.


> I assume that MacPorts in the new version will also recognize that I have what I need and the spurious warning would go away.

I assume that as well. If you'd like to confirm it, you could install the latest unreleased MacPorts from source.


On Feb 11, 2021, at 19:07, Todd Doucet wrote:

> 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

I do not have enough experience with macOS Big Sur to be able to say whether that is normal or unusual.

Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

Todd Doucet


On Feb 11, 2021, at 18:47, Todd Doucet wrote:

> 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

This looks normal to me. As far as I can tell, it is normal for the Xcode 12.4 command line tools installer to give you both the 10.15 SDK and the 11.1 SDK. Apple has changed their mind a few times about whether Xcode and the CLT provide only the latest OS SDK or both the latest OS SDK and the previous OS SDK, but right now they appear to be providing both latest and previous.


> 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

The first one is the one that MacPorts checks for (on 10.9 and later; on earlier OS versions it has different names) and the one that we believe Apple's software update checks for. You can verify which version of the CLT you have by running:

pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version


> 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.

I do not believe that Xcode offered you to install the CLT; I have never known Xcode to do that. Xcode does ask you about installing additional components when it is first opened, and if you do not allow it, Xcode quits, so you probably allowed it. But "additional components" and "command line tools" are unrelated things.

Yes, you are correct.  I remembered my interpretation of what it said, but not what it said ("additional components") until you reminded me!


> My conclusion is that I probably have what I am supposed to have.  If you think otherwise, please let me know.

You stated you are running macOS 11.1, and you appear to have the 11.1 SDK. Therefore I cannot explain why you are seeing the warning.

I am looking at the About This Mac box and it says Version 11.1.  And for completeness:

% pkgutil --pkg-info=com.apple.pkg.CLTools_Executables | grep version

version: 12.4.0.0.1.1610135815



So I guess there is still a bit of a mystery.  If I get some time I will try to build the new MacPorts from source and see if there is still a warning.  (I presently do not rely on MacPorts for mainline code and it is very easy for me to nuke it and do a quick reinstall.)




> I assume that MacPorts in the new version will also recognize that I have what I need and the spurious warning would go away.

I assume that as well. If you'd like to confirm it, you could install the latest unreleased MacPorts from source.


On Feb 11, 2021, at 19:07, Todd Doucet wrote:

> 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

I do not have enough experience with macOS Big Sur to be able to say whether that is normal or unusual.



Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

ryandesign2
Administrator


On Feb 11, 2021, at 19:32, Todd Doucet wrote:

> So I guess there is still a bit of a mystery.  If I get some time I will try to build the new MacPorts from source and see if there is still a warning.  (I presently do not rely on MacPorts for mainline code and it is very easy for me to nuke it and do a quick reinstall.)

No need to nuke anything. You can build MacPorts master and install it over the top of what you currently have. It will not affect your installed ports either.


Reply | Threaded
Open this post in threaded view
|

Re: macOS 11.1 SDK does not appear to be installed

Todd Doucet




On Feb 11, 2021, at 19:32, Todd Doucet wrote:

> So I guess there is still a bit of a mystery.  If I get some time I will try to build the new MacPorts from source and see if there is still a warning.  (I presently do not rely on MacPorts for mainline code and it is very easy for me to nuke it and do a quick reinstall.)

No need to nuke anything. You can build MacPorts master and install it over the top of what you currently have. It will not affect your installed ports either.

Cool.  I built MacPorts from GitHub and installed it, and port says it is version 2.6.99, and it no longer issues the warning about the CLTs.

Thanks.