我正在尝试从源代码(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-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发布于 2016-06-18 04:36:58
我认为你需要新的XCode 8测试版来构建最新的Swift源代码。
安装后,请尝试:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer/https://stackoverflow.com/questions/37885004
复制相似问题