【问题标题】:SDK version for building swift?用于快速构建的 SDK 版本?
【发布时间】:2016-10-19 11:52:08
【问题描述】:

我正在尝试从源代码 (https://github.com/apple/swift) 构建 swift。但是,它在构建 PhaseScriptExecution 时会引发错误。这是错误消息:

<unknown>:0: error: Swift does not support the SDK 'MacOSX10.11.sdk'
make: *** [/Users/yangwei/Git/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/core/macosx/x86_64/Swift.o] Error 1

** BUILD FAILED **


The following build commands failed:
PhaseScriptExecution CMake\ Rules /Users/yangwei/Git/build/Xcode-DebugAssert/swift-macosx-x86_64/stdlib/public/core/Swift.build/Debug/add_custom_command_target-8e6e230f23a92c1cda79a3cf59140ab8-Swift.o.build/Script-4123DECAA170465EA6F4D9CC.sh
(1 failure)

这似乎是与 SDK 版本有关的问题。谁能告诉我应该使用哪个 SDK 版本?以及如何降级到该版本?

谢谢!

更新:

我注意到版本问题,所以我尝试检查 swift 的 swift-2.2 分支和所有其他必需项目。但是,当我尝试使用命令utils/build-script -x 构建时,它显示以下错误消息:

make -f /Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeScripts/ReRunCMake.make
make[1]: *** No rule to make target '/Users/yangwei/Git/llvm/lib/DebugInfo/CodeView/CMakeLists.txt', needed by '/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/cmake.check_cache'.  Stop.
make: *** [/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/ZERO_CHECK] Error 2
Command /bin/sh failed with exit code 2
** BUILD FAILED **

The following build commands failed:
PhaseScriptExecution CMake\ Rules /Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/LLVM.build/Debug/ZERO_CHECK.build/Script-80DAA73EAB654B0EA77D1AEF.sh
(1 failure)
utils/build-script: command terminated with a non-zero exit status 65, aborting

【问题讨论】:

    标签: xcode swift macos github build


    【解决方案1】:

    我认为您需要新的 XCode 8 测试版来构建最新的 Swift 源代码。

    安装后,尝试:

    sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/
    

    【讨论】:

    • 我注意到版本问题,所以我尝试检查 swift 的 swift-2.2 分支和所有其他必需项目。但是,当我尝试使用命令utils/build-script -x 构建时,它显示以下错误消息:` make[1]: *** No rule to make target '/Users/yangwei/Git/llvm/lib/DebugInfo/CodeView/CMakeLists .txt','/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/cmake.check_cache' 需要。停止。 make: *** [/Users/yangwei/Git/build/Xcode-DebugAssert/llvm-macosx-x86_64/CMakeFiles/ZERO_CHECK] 错误 2 命令 /bin/sh 失败,退出代码 2 ** BUILD FAILED ** `跨度>
    • 尝试删除build 目录。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-03-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多