我很想使用Carthage来安装Alamofire和SwiftJSON,但我无法使其正常工作。每次构建都失败了。
这是我的Cartfile(指向适用于Xcode 6.3的正确分支):
我很想弄清楚为什么这不起作用,因为我认为Carthage可能非常棒。请注意,除了按照Cartage git repo上的说明进行操作之外,我什么也没有做。只是运行了cartage update,就发生了这种情况。有任何想法吗?
xcode-select路径正确地指向Xcode的beta版本。
/Applications/Xcode-Beta.app/Contents/Developer
这是我的Cartfile(指向适用于Xcode 6.3的正确分支):
github "Alamofire/Alamofire" "xcode-6.3"
github "SwiftyJSON/SwiftyJSON" "xcode6.3"
Alamofire构建失败并出现如下错误:
error: Error Domain=NSPOSIXErrorDomain Code=2 "Non-zero exit code 127 returned from shell command: /ur/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1" UserInfo=0x7fbfb9e4d5d0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /ur/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2015-02-18 23:15:51.859 xcodebuild[53900:6388252] Warning: Couldn't discover the 'gcc-4.2' compiler's built-in search paths and preprocessor definitions for language dialect 'c'.
Compiler: /ur/bin/gcc-4.2
Reason: /ur/bin/gcc-4.2 -v -E -dM -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1
2015-02-18 23:15:51.865 xcodebuild[53900:6388253] error: Error Domain=NSPOSIXErrorDomain Code=2 "Non-zero exit code 127 returned from shell command: /ur/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1" UserInfo=0x7fbfbbb474d0 {NSLocalizedDescription=Non-zero exit code 127 returned from shell command: /ur/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
2015-02-18 23:15:51.865 xcodebuild[53900:6388253] Warning: Couldn't discover the 'gcc-4.2' compiler's built-in search paths and preprocessor definitions for language dialect 'c'.
Compiler: /ur/bin/gcc-4.2
Reason: /ur/bin/gcc-4.2 -v -E -dM -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator8.1.sdk -x c -c /dev/null 2>&1
2015-02-18 23:15:52.448 xcodebuild[53900:6388249] DVTAssertions: Warning in /SourceCache/IDEXcode3ProjectSupport/IDEXcode3ProjectSupport-6269/Xcode3Core/LegacyProjects/Frameworks/DevToolsCore/DevToolsCore/SpecificationTypes/BuiltInSpecifications/Compilers/XCGccMakefileDependencies.m:77
Details: Failed to load dependencies output contents from ``/Users/devonboyer/Library/Developer/Xcode/DerivedData/Alamofire-gpmlmgkqhnaqwsdibrprtyuyoqpu/Build/Intermediates/Alamofire.build/Release-iphonesimulator/Alamofire iOS.build/Objects-normal/x86_64/Alamofire.d''. Error: Error Domain=NSCocoaErrorDomain Code=260 "The file “Alamofire.d” couldn’t be opened because there is no such file." UserInfo=0x7fbfb9e774f0 {NSFilePath=/Users/devonboyer/Library/Developer/Xcode/DerivedData/Alamofire-gpmlmgkqhnaqwsdibrprtyuyoqpu/Build/Intermediates/Alamofire.build/Release-iphonesimulator/Alamofire iOS.build/Objects-normal/x86_64/Alamofire.d, NSUnderlyingError=0x7fbfb9e71f00 "The operation couldn’t be completed. No such file or directory"}. User info: {
NSFilePath = "/Users/devonboyer/Library/Developer/Xcode/DerivedData/Alamofire-gpmlmgkqhnaqwsdibrprtyuyoqpu/Build/Intermediates/Alamofire.build/Release-iphonesimulator/Alamofire iOS.build/Objects-normal/x86_64/Alamofire.d";
NSUnderlyingError = "Error Domain=NSPOSIXErrorDomain Code=2 \"The operation couldn\U2019t be completed. No such file or directory\"";
}.
Function: void XCGccMakefileDependenciesParsePathsFromRuleFile(NSString *__strong, void (^__strong)(NSString *__strong))
Thread: <NSThread: 0x7fbfb9e1a3a0>{number = 7, name = (null)}
Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
** BUILD FAILED **
The following build commands failed:
CompileSwift normal x86_64 /Users/devonboyer/Desktop/Reach/Reach/Carthage/Checkouts/Alamofire/Source/Alamofire.swift
CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(2 failures)
使用SwiftyJSON时出现以下错误:
Scheme SwiftyJSONOSX is not currently configured for the build action.
我很想弄清楚为什么这不起作用,因为我认为Carthage可能非常棒。请注意,除了按照Cartage git repo上的说明进行操作之外,我什么也没有做。只是运行了cartage update,就发生了这种情况。有任何想法吗?
xcode-select路径正确地指向Xcode的beta版本。
/Applications/Xcode-Beta.app/Contents/Developer
xcode-select
命令来选择 Xcode 的测试版进行命令行构建? - Justin Spahr-Summersbrew update
? - Allen