Closed UNIQUEXJ closed 6 years ago
Before building, try which swift && swift --version
, which should display some output like this:
$ which swift && swift --version
/usr/bin/swift
Apple Swift version 4.1.2 (swiftlang-902.0.54 clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0
If confirmed a proper swift toolchain, try:
$ git clone https://github.com/PerfectlySoft/PerfectLib.git && cd PerfectLib && swift build
If nothing wrong, it should look like:
Cloning into 'PerfectLib'...
remote: Counting objects: 7235, done.
remote: Total 7235 (delta 0), reused 0 (delta 0), pack-reused 7235
Receiving objects: 100% (7235/7235), 5.30 MiB | 68.00 KiB/s, done.
Resolving deltas: 100% (4097/4097), done.
Compile Swift Module 'PerfectLib' (9 sources)
Apple Swift version 4.2 (swiftlang-1000.0.16.7 clang-1000.10.25.3) Target: x86_64-apple-darwin17.7.0
I'd also tried Swift 4.2 and it worked like a charm:
$ which swift && swift --version
/usr/bin/swift
Apple Swift version 4.2 (swiftlang-1000.0.16.7 clang-1000.10.25.3)
Target: x86_64-apple-darwin17.6.0
$ git clone https://github.com/PerfectlySoft/PerfectLib.git && cd PerfectLib && swift build
Cloning into 'PerfectLib'...
remote: Counting objects: 7235, done.
remote: Total 7235 (delta 0), reused 0 (delta 0), pack-reused 7235
Receiving objects: 100% (7235/7235), 5.30 MiB | 896.00 KiB/s, done.
Resolving deltas: 100% (4097/4097), done.
Compile Swift Module 'PerfectLib' (9 sources)
Nothing wrong with it. Can you please try swift build -v
and paste all outputs?
liujiangdeMacBook-Pro:PerfectLib unique$ swift build -v xcrun --sdk macosx --show-sdk-path xcrun --sdk macosx --show-sdk-platform-path xcrun --find clang xcrun --sdk macosx --find xctest error: terminated(72): xcrun --sdk macosx --find xctest output:
It is not an issue. please sign in our slack http://perfect.ly to get instant support. See you in #中文频道
Seems like you are using Xcode beta, so rename it from Xcode-beta to just Xcode or you can select Xcode-beta by command:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
/usr/bin/swift Apple Swift version 4.2 (swiftlang-1000.0.37.1 clang-1000.10.44) Target: x86_64-apple-darwin18.0.0 lixinhaodeiMac:~ lixinhao$ swift build -v xcrun --sdk macosx --show-sdk-path xcrun --sdk macosx --show-sdk-platform-path xcrun --find clang xcrun --sdk macosx --find xctest error: terminated(72): xcrun --sdk macosx --find xctest output: what's the problem .I need help
$ sudo xcode-select -switch /Applications/Xcode.app/ $ xcode-select -p /Applications/Xcode.app/Contents/Developer 这个是正确的处理
I had the same issue as @UNIQUEXJ and I ran the following to make it work:
sudo xcode-select --reset swift build
thanks @sahilmgandhi , that worked for me
Got same error after XCode update, while building IBM-Kitura project. Thanks @sahilmgandhi
Seems like you are using Xcode beta, so rename it from Xcode-beta to just Xcode or you can select Xcode-beta by command:
sudo xcode-select -s /Applications/Xcode-beta.app/Contents/Developer
On the stable Xcode 10.1 the next command helps:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
run "swift build"
error: terminated(72): xcrun --sdk macosx --find xctest output: