xcode – 苹果LLVM编译3.1错误

前端之家收集整理的这篇文章主要介绍了xcode – 苹果LLVM编译3.1错误前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
只需更新 Xcode到4.3,现在我无法建立我的应用程序.我收到这个错误
  1. Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang Failed with exit code 254

有人有这个问题吗?这可能只是一个编译设置,但我不知道在哪里看.

当然,错误包括整个堆栈转储,但是为了简洁起见,我没有包括这个.我希望有人会知道“退出代码254”是什么.试图搜索它,但找不到任何东西.

以下是整个输出

  1. CompileC /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.o iDB/SCheckBox.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
  2. cd "/Users/aaron/DropBox/XCode Projects/iDB"
  3. setenv LANG en_US.US-ASCII
  4. setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
  5. /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch i386 -fmessage-length=0 -std=gnu99 -fobjc-arc -Wno-trigraphs -fpascal-strings -O0 -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -DDEBUG=1 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -mmacosx-version-min=10.6 -g -Wno-conversion -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -D__IPHONE_OS_VERSION_MIN_required=50000 -iquote /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-generated-files.hmap -I/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-own-target-headers.hmap -I/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-all-target-headers.hmap -iquote /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-project-headers.hmap -I/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Products/Debug-iphonesimulator/include -I/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/DerivedSources/i386 -I/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/DerivedSources -F/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Products/Debug-iphonesimulator -include /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/PrecompiledHeaders/iDB-Prefix-aojkwzmrifipbudgsdryqwbhphsf/iDB-Prefix.pch -MMD -MT dependencies -MF /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.d --serialize-diagnostics /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.dia -c "/Users/aaron/DropBox/XCode Projects/iDB/iDB/SCheckBox.m" -o /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.o
  6.  
  7. 0 clang 0x000000010a5c15a2 _ZL15PrintStackTracePv + 34
  8. 1 clang 0x000000010a5c1a29 _ZL13SignalHandleri + 553
  9. 2 libsystem_c.dylib 0x00007fff94b6dcfa _sigtramp + 26
  10. 3 libsystem_c.dylib 0x00007fff6929a1b0 _sigtramp + 18446744072978875600
  11. 4 clang 0x0000000109ef3798 _ZL20findRetainCycleOwnerPN5clang4ExprERN12_GLOBAL__N_116RetainCycleOwnerE + 312
  12. 5 clang 0x0000000109ef35af clang::Sema::checkRetainCycles(clang::ObjCMessageExpr*) + 303
  13. 6 clang 0x00000001097efaef clang::Sema::BuildInstanceMessage(clang::Expr*,clang::QualType,clang::SourceLocation,clang::Selector,clang::ObjCMethodDecl*,llvm::ArrayRef<clang::SourceLocation>,clang::ASTMultiPtr<clang::Expr*>) + 6479
  14. 7 clang 0x00000001097ee18a clang::Sema::ActOnInstanceMessage(clang::Scope*,clang::Expr*,clang::ASTMultiPtr<clang::Expr*>) + 138
  15. 8 clang 0x00000001097ee04b clang::Parser::ParSEObjCMessageExpressionBody(clang::SourceLocation,clang::OpaquePtr<clang::QualType>,clang::Expr*) + 2091
  16. 9 clang 0x00000001097ed7f4 clang::Parser::ParSEObjCMessageExpression() + 852
  17. 10 clang 0x0000000109765597 clang::Parser::ParseCastExpression(bool,bool,bool&,bool) + 6807
  18. 11 clang 0x0000000109763ab2 clang::Parser::ParseAssignmentExpression() + 114
  19. 12 clang 0x0000000109763a21 clang::Parser::ParseExpression() + 17
  20. 13 clang 0x00000001097b8efe clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 46
  21. 14 clang 0x00000001097634bc clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,32u>&,bool) + 1564
  22. 15 clang 0x00000001097627d9 clang::Parser::ParseCompoundStatementBody(bool) + 409
  23. 16 clang 0x0000000109763242 clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,bool) + 930
  24. 17 clang 0x00000001097b6d0b clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 475
  25. 18 clang 0x000000010976353c clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,bool) + 1692
  26. 19 clang 0x00000001097627d9 clang::Parser::ParseCompoundStatementBody(bool) + 409
  27. 20 clang 0x0000000109edbd30 clang::Parser::ParseLexedObjCMethodDefs(clang::Parser::LexedMethod&) + 272
  28. 21 clang 0x000000010980483e clang::Parser::ParSEObjCAtEndDeclaration(clang::SourceRange) + 158
  29. 22 clang 0x00000001097e2222 clang::Parser::ParSEObjCAtDirectives() + 386
  30. 23 clang 0x0000000109723e87 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,clang::Parser::ParsingDeclSpec*) + 759
  31. 24 clang 0x0000000109723b19 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 249
  32. 25 clang 0x000000010970688b clang::ParseAST(clang::Sema&,bool) + 299
  33. 26 clang 0x00000001097053d9 clang::CodeGenAction::ExecuteAction() + 857
  34. 27 clang 0x00000001096d793f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
  35. 28 clang 0x00000001096d65cb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
  36. 29 clang 0x00000001096c8dce cc1_main(char const**,char const**,char const*,void*) + 5086
  37. 30 clang 0x00000001096a35d8 main + 648
  38. 31 clang 0x00000001096a3344 start + 52
  39. 32 clang 0x0000000000000071 start + 18446744069256629601
  40. Stack dump:
  41. 0. Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -triple i386-apple-macosx10.6.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name SCheckBox.m -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 128.2 -g -coverage-file /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/3.1 -dependency-file /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.d -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.0.sdk -iquote /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-generated-files.hmap -iquote /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-project-headers.hmap -include-pch /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/PrecompiledHeaders/iDB-Prefix-aojkwzmrifipbudgsdryqwbhphsf/iDB-Prefix.pch.pth -D DEBUG=1 -D IBOutlet=__attribute__((iboutlet)) -D IBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName))) -D IBAction=void)__attribute__((ibaction) -D __IPHONE_OS_VERSION_MIN_required=50000 -I /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-own-target-headers.hmap -I /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Flexile-all-target-headers.hmap -I /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Products/Debug-iphonesimulator/include -I /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/DerivedSources/i386 -I /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/DerivedSources -F/Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Products/Debug-iphonesimulator -fmodule-cache-path /var/folders/1y/fbhzgfpn2ld9qxdfpgl7d_rm0000gn/T/clang-module-cache -O0 -Wno-trigraphs -Werror -Wno-missing-field-initializers -Wmissing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wunused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wno-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-sign-compare -Wno-shorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wno-undeclared-selector -Wno-deprecated-implementations -Wprotocol -Wdeprecated-declarations -Wno-conversion -Wno-sign-conversion -std=gnu99 -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-arc -fobjc-exceptions -fexceptions -fpascal-strings -fdiagnostics-show-option -serialize-diagnostic-file /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.dia -o /Users/aaron/Library/Developer/Xcode/DerivedData/iDB-cvvkmobzsecywdherzjesrjswdng/Build/Intermediates/iDB.build/Debug-iphonesimulator/Flexile.build/Objects-normal/i386/SCheckBox.o -x objective-c /Users/aaron/DropBox/XCode Projects/iDB/iDB/SCheckBox.m
  42. 1. /Users/aaron/DropBox/XCode Projects/iDB/iDB/SCheckBox.m:36:47: current parser token ';'
  43. 2. /Users/aaron/DropBox/XCode Projects/iDB/iDB/SCheckBox.m:27:146: in compound statement ('{}')
  44. 3. /Users/aaron/DropBox/XCode Projects/iDB/iDB/SCheckBox.m:29:102: in compound statement ('{}')
  45. clang: error: unable to execute command: Segmentation fault: 11
  46. clang: error: clang frontend command Failed due to signal 2 (use -v to see invocation)
  47. clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information.
  48. clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
  49. clang: note: diagnostic msg: /var/folders/1y/fbhzgfpn2ld9qxdfpgl7d_rm0000gn/T/SCheckBox-GckJrn.mi
  50. clang: note: diagnostic msg: /var/folders/1y/fbhzgfpn2ld9qxdfpgl7d_rm0000gn/T/SCheckBox-GckJrn.sh
  51. Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang Failed with exit code 254

UPDATE
所以我注意到转储是指特定类(SCheckBox.m)中的代码上的特定行.
这是一个init方法.我检查了方法,但找不到任何错误.但是,如果我将方法中的所有内容都注释出来,并返回nil,则代码编译.我经历了每一行的取消注释,直到我收到错误.导致问题的错误是:

  1. [super.inputField addSubview:_checked];

我打算使用“自我”而不是“超级”(这是我的错字).但是super实际上有一个inputField属性.它不会在子类中重新定义或覆盖.所以访问’super.inputField’vs’self.inputField’应该访问完全相同的东西(并且在升级Xcode之前).好的,所以改变“超级”到“自我”确实解决了这个问题.

我现在的问题是:为什么?

解决方法

我通过尝试通过NSLog输出一个就地操作(返回void)的结果,在Xcode 4.3.2中设法触发了这个问题.

在我的情况下,我想做的是:

  1. NSLog(@"result = %@",[array filterUsingPredicate:predicate]);

filterUsingPredicate:是一个返回void的就地方法的事实似乎触发了这个编译器错误.有趣的是,Xcode的类似错误检测不会在其上.

将其更改为正确版本: –

  1. NSLog(@"result = %@",[array filteredArrayUsingPredicate:predicate]);

工作正常,解决问题!

猜你在找的iOS相关文章