Unable to switch SDK (command line tools)

I installed the command line tools 14.1_beta_3 (SDK MacOSX13.0.sdk) and I cannot switch back to use the command line tools for an SDK that is compatible with software I am trying to build.

I have both XCode 13.4.1 (xcode.app) AND XCode 14.1 Beta (xcode-beta.app) installed. XCode 13.4.1 points to Command Line Tools (Xcode 13.4.1) but I still get an error in my build that points to the beta MacOSX13 sdk.

I have tried switching the tools (xcode-select -s /Applications/XCode.app) with the same results.

I tried just removing the CommandLineTools folder from /Library/Developer/CommandLineTools and re-installing the command line tools with only 13.4.1 but then the build says it cant find the MacOSX13.0.sdk.

At a loss what to try next.

  • Did xcode-select print an error?

Add a Comment

Replies

No error, in fact switching between .../XCode.app and .../XCode-beta.app followed by the -p prints the correct path to the selected sdk, but the error is still the same.
/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here

  • What software are you attempting to build? If the software doesn't use Xcode, its build system needs to invoke xcode-select -p to obtain the path to the preferred developer tools. Not all software does this, and instead hardcodes the command line tools path.

  • As for why you still get an error after (re)installing the 13.4.1 CL tools, it could be that artifacts from a previous build (with the beta CL tools) are cached somewhere. Again, this will depend on the build system the software is using.

  • Cached was right on the mark. I forgot I had setup ccache on this mac and it was either outdated or needed to be cleared (I updated which I think cleared the cache).

Add a Comment