无法将命令行工具版本从MacOSX13切换到MacOSX12



我安装了命令行工具14.1_beta_3(SDK MacOSX13.0.SDK(,我无法切换回使用与我尝试构建的软件兼容的SDK的命令行工具。

我安装了XCode 13.4.1/Applications/xcode.app和XCode 14.1 Beta/Applications/xcode-beta.app。XCode 13.4.1指向命令行工具(XCode 13.4.1(,但我在构建中仍然收到一个指向测试版MacOSX13 sdk的错误。

我尝试过切换工具xcode-select -s /Applications/XCode.app,结果相同。

/Library/Developer/CommandLineTools/SDKs/MacOSX13.0.sdk/usr/include/stdio.h:188:1: note: 'sprintf' has been explicitly marked deprecated here
__deprecated_msg("This function is provided for compatibility reasons only.  Due to security concerns inherent in the design of sprintf(3), it is highly recommended that you use snprintf(3) instead.")

我试着从/Library/Developer/CommandLineTools中删除CommandLineTools文件夹,并重新安装只有13.4.1的命令行工具,但后来版本显示找不到MacOSX13.0.sdk.

注意:这是如何卸载MacOSX13.0.sdk或切换到MacOSX12.sdk,而不是如何使用MacOSX13 sdk进行编译。

显然,这是由于需要清除ccache或ccache本身已过时造成的。我通过macports更新了ccache(清除了缓存(,当我回滚命令行工具时,对MacOSX13的引用消失了。

最新更新