用于构建Swift的SDK版本



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

<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-2.2和所有其他必需项目的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 8 Beta来构建最新的Swift源。

安装后,尝试:

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

最新更新