【问题标题】:Unable to switch Command Line Tools version from MacOSX13 to MacOSX12无法将命令行工具版本从 MacOSX13 切换到 MacOSX12
【发布时间】:2022-10-05 19:55:27
【问题描述】:

我安装了命令行工具 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),但我的构建中仍然出现指向 beta 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 一起编译。

    标签: xcode xcode-command-line-tools


    【解决方案1】:

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2021-07-16
      • 2022-01-05
      • 2022-01-10
      • 2020-05-27
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多