我有一个奇怪的问题,我经常在构建和运行时遇到此错误
clang: error: unable to execute command: Killed: 9
clang: error: linker command failed due to signal (use -v to see invocation)
其他时候,我收到一条说明could not attach to simulator
或类似内容的对话框消息。
我不确定何时开始,我已尝试清理并删除派生数据。
失败的实际命令:
Ld /Users/user/Library/Developer/Xcode/DerivedData/Company-acovzggytrsxohabthueilablphe/Build/Products/Debug-iphonesimulator/Company-dev.app/Company-dev normal x86_64 cd / Users / user / projects / Company / iOS export IPHONEOS_DEPLOYMENT_TARGET = 9.0 export PATH =" /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/ usr / local /箱:在/ usr / bin中:/ bin中:/ usr / sbin目录:/ sbin目录" /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10。 2.sdk -L / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / ActionSheetPicker-3.0 -F / Users / user / Library / Developer / Xcode / DerivedData /公司-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Alamofire -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / AlamofireObjectMapper -F / Users / user / Library /开发商/ Xcode中/ DerivedData /公司acovzggytrsxohabthueilablphe /编译/ Products / Debug-iphonesimulator / BDKCollectionIndexView -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Bolts -F / Users / user / Library / Developer / Xcode / DerivedData /公司-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Charts -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / DKImagePickerController -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / FBSDKCoreKit -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / FBSDKLoginKit -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / FacebookCore -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug- iphonesimulator / F acebookLogin -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / GoogleToolboxForMac -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / IQKeyboardManagerSwift -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Kingfisher -F / Users / user / Library / Developer / Xcode / DerivedData /公司-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Mixpanel-swift -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / ObjectMapper -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Realm -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / RealmSwift - F /用户/用户/ Librar y / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Simplicity -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / SlideMenuControllerSwift - F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / SwiftKeychainWrapper -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / SwiftSpinner -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / SwiftyJSON -F / Users / user / Library / Developer / Xcode / DerivedData / Company- acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / SwiftyUserDefaults -F / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Products / Debug-iphonesimulator / Whisper -F / Users / user / projects / Company /式IO /荚/ CRAS hlytics / iOS -F / Users / user / projects / Company / iOS / Pods / Fabric / iOS -F / Users / user / projects / Company / iOS / Pods / FirebaseAnalytics / Frameworks / frameworks -F / Users / user / projects /公司/ iOS / Pods / FirebaseCore / Frameworks -F / Users / user / projects / Company / iOS / Pods / FirebaseInstanceID / Frameworks / frameworks -F / Users / user / projects / Company / iOS / Pods / FirebaseMessaging / Frameworks / frameworks - F / Users / user / projects / Company / iOS / Pods / GoogleInterchangeUtilities / Frameworks / frameworks -F / Users / user / projects / Company / iOS / Pods / GoogleSymbolUtilities / Frameworks / frameworks -filelist / Users / user / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Intermediates / Company.build / Debug-iphonesimulator / Company-dev.build / Objects-normal / x86_64 / Company-dev.LinkFileList -Xlinker -rpath -Xlinker @ executable_path / Frameworks -Xlinker - rpath -Xlinker @ loader_path / Frameworks -Xlinker -rpath -Xlinker @ executable_path / Frameworks -mios-simulator-version-min = 9.0 -dead_strip -Xlinker -object_path_lto -Xlinker / Users / us er / Library / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Intermediates / Company.build / Debug-iphonesimulator / Company-dev.build / Objects-normal / x86_64 / Company-dev_lto.o -Xlinker -export_dynamic -Xlinker - no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-link-runtime -L / Applications / Xcode.app / Contents / Developer / Toolchains / XcodeDefault.xctoolchain / usr / lib / swift / iphonesimulator -Xlinker -add_ast_path -Xlinker / Users / user /Library/Developer/Xcode/DerivedData/Company-acovzggytrsxohabthueilablphe/Build/Intermediates/Company.build/Debug-iphonesimulator/Company-dev.build/Objects-normal/x86_64/Company_dev.swiftmodule -ObjC -lc ++ -lsqlite3 -lz -framework ActionSheetPicker_3_0 -framework AddressBook -framework Alamofire -framework AlamofireObjectMapper -framework BDKCollectionIndexView -framework Bolts -framework Charts -framework Crashlytics -framework DKImagePickerController -framework FBSDKCoreKit -framework FBSDKLoginKit -framework Fabric -framework FacebookCore -framework FacebookLogin -framework FirebaseAnalytics -framework FirebaseCore -framework FirebaseInstanceID -framework GoogleInterchangeUtilities -framework GoogleSymbolUtilities -framework GoogleToolboxForMac -framework IQKeyboardManagerSwift -framework Kingfisher -framework Mixpanel -framework ObjectMapper -framework Realm -framework RealmSwift -framework Security -framework Simplicity -framework SlideMenuControllerSwift -framework StoreKit -framework SwiftKeychainWrapper -framework SwiftSpinner -framework SwiftyJSON -framework SwiftyUserDefaults -framework SystemConfiguration -framework UIKit -framework Whisper -Xlinker -sectcreate -Xlinker __TEXT -Xlinker __entitlements -Xlinker / Users / user / Library / Developer / Xcode / DerivedData /公司-acovzggytrsxohabthueilablphe / Build / Intermediates / Company.build / Debug-iphonesimulator / Company-dev.build / Company-dev.app.xcent -framework Pods_Companyiabstract_Company_dev -Xlinker -dependency_info -Xlinker / Users / user / Librar y / Developer / Xcode / DerivedData / Company-acovzggytrsxohabthueilablphe / Build / Intermediates / Company.build / Debug-iphonesimulator / Company-dev.build / Objects-normal / x86_64 / Company-dev_dependency_info.dat -o / Users / user / Library /显影剂/ Xcode中/ DerivedData /公司-acovzggytrsxohabthueilablphe /建造/产品/调试-iphonesimulator / Company-dev.app /公司-dev的
答案 0 :(得分:1)
通过以下方式清理Xcode派生数据:
rm -rf ~/Library/Developer/Xcode/DerivedData/*
答案 1 :(得分:0)
我不确定我是如何让它工作的,但我发现哪个文件经常无法链接,罪魁祸首是SomeClass.o
。我尝试移动swift文件的内容,但这没有用,所以我最终重构了这个类的名称,这就行了。
在我看来,某个地方有一个缓存,当删除派生数据时没有被删除,我希望这有助于其他人,因为这个bug是个婊子