简体   繁体   English

Apple LLVM编译器3.1错误

[英]Apple LLVM compiler 3.1 error

I started to get this peculiar compiler error which I cannot seem to solve. 我开始遇到这个似乎无法解决的奇特的编译器错误。 I went through some other posts in internet suggesting fixes, but none of them worked for me. 我浏览了互联网上的其他一些帖子,提出了一些修复建议,但没有一个对我有用。 I tried changing the build settings and changed all "self.x"s to "[self x]" as suggested; 我尝试更改构建设置,并按照建议将所有“ self.x”更改为“ [self x]”; but didn't help. 但没有帮助。

There is multilevel inheritance in my code, (ie game -> board game -> tictactoegame) and im guessing, that structure is the root of problems. 我的代码中存在多级继承(即游戏->棋盘游戏-> tictactoegame),我想这是问题的根源。 The compiler seems to crash at viewcontroller's line of code just after it synthesizes an instance of tictactoegame named 'game'. 在合成名为“ game”的tictactoegame实例后,编译器似乎在viewcontroller的代码行崩溃。

What is a possible mistake i'm doing? 我正在做的可能是什么错误? Any help would be appreciated, if you need more info to detect just tell me. 如果您需要更多信息以进行检测,请告诉我任何帮助。 This is the error log: 这是错误日志:

CompileC "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o" "AlDente GameCenter/../TicTacToeViewController.m" normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
        cd "/Users/guvenis/Desktop/AlDente GameCenter"
        setenv LANG en_US.US-ASCII
        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"
        /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 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wuninitialized -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.1.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=50100 -iquote "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-generated-files.hmap" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-own-target-headers.hmap" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-all-target-headers.hmap" -iquote "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-project-headers.hmap" -I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator/include "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources/i386" "-I/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources" -F/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator -include "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/PrecompiledHeaders/AlDente GameCenter-Prefix-fegzlqlfizxpgwaenbkzicwpltxv/AlDente GameCenter-Prefix.pch" -MMD -MT dependencies -MF "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.d" --serialize-diagnostics "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.dia" -c "/Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m" -o "/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o"

0  clang             0x000000010c381422 _ZL15PrintStackTracePv + 34
1  clang             0x000000010c3818a9 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff86fb2cfa _sigtramp + 26
3  clang             0x000000010c72ec10 vtable for llvm::DIFile + 16
4  clang             0x000000010b4d736c clang::ASTContext::getTypeInfo(clang::Type const*) const + 1148
5  clang             0x000000010b4df7cc clang::ASTContext::getTypeInfoInChars(clang::QualType) const + 28
6  clang             0x000000010b4df291 (anonymous namespace)::RecordLayoutBuilder::LayoutField(clang::FieldDecl const*) + 1889
7  clang             0x000000010b5d8b1b clang::ASTContext::getObjCLayout(clang::ObjCInterfaceDecl const*, clang::ObjCImplementationDecl const*) const + 1003
8  clang             0x000000010bc30396 clang::CodeGen::CGDebugInfo::CreateType(clang::ObjCInterfaceType const*, llvm::DIFile) + 1526
9  clang             0x000000010bc31a5c clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 332
10 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
11 clang             0x000000010bc2bdde clang::CodeGen::CGDebugInfo::CreatePointeeType(clang::QualType, llvm::DIFile) + 894
12 clang             0x000000010bc2b9bd clang::CodeGen::CGDebugInfo::CreatePointerLikeType(unsigned int, clang::Type const*, clang::QualType, llvm::DIFile) + 285
13 clang             0x000000010bc319f5 clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 229
14 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
15 clang             0x000000010bc2b7d7 clang::CodeGen::CGDebugInfo::CreateQualifiedType(clang::QualType, llvm::DIFile) + 183
16 clang             0x000000010bc3195e clang::CodeGen::CGDebugInfo::CreateTypeNode(clang::QualType, llvm::DIFile) + 78
17 clang             0x000000010bc2a259 clang::CodeGen::CGDebugInfo::getOrCreateType(clang::QualType, llvm::DIFile) + 489
18 clang             0x000000010bc32431 clang::CodeGen::CGDebugInfo::getOrCreateFunctionType(clang::Decl const*, clang::QualType, llvm::DIFile) + 369
19 clang             0x000000010bc32e2a clang::CodeGen::CGDebugInfo::EmitFunctionStart(clang::GlobalDecl, clang::QualType, llvm::Function*, llvm::IRBuilder<false, llvm::ConstantFolder, llvm::IRBuilderDefaultInserter<false> >&) + 1866
20 clang             0x000000010b5ebc11 clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl, clang::QualType, llvm::Function*, clang::CodeGen::CGFunctionInfo const&, clang::CodeGen::FunctionArgList const&, clang::SourceLocation) + 1073
21 clang             0x000000010bc48034 clang::CodeGen::CodeGenFunction::StartObjCMethod(clang::ObjCMethodDecl const*, clang::ObjCContainerDecl const*, clang::SourceLocation) + 548
22 clang             0x000000010bc481a6 clang::CodeGen::CodeGenFunction::GenerateObjCMethod(clang::ObjCMethodDecl const*) + 38
23 clang             0x000000010b4fe07c clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*) + 876
24 clang             0x000000010b4fdcef (anonymous namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef) + 95
25 clang             0x000000010b4fdc51 clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef) + 161
26 clang             0x000000010b4c6092 clang::ParseAST(clang::Sema&, bool) + 306
27 clang             0x000000010b4c4bd7 clang::CodeGenAction::ExecuteAction() + 855
28 clang             0x000000010b49713f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
29 clang             0x000000010b495dcb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
30 clang             0x000000010b4885ce cc1_main(char const**, char const**, char const*, void*) + 5086
31 clang             0x000000010b462dd8 main + 648
32 clang             0x000000010b462b44 start + 52
33 clang             0x0000000000000070 start + 18446744069225436512
Stack dump:
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 TicTacToeViewController.m -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 128.2 -g -coverage-file /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/3.1 -dependency-file /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.d -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator5.1.sdk -iquote /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-generated-files.hmap -iquote /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-project-headers.hmap -include-pch /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/PrecompiledHeaders/AlDente GameCenter-Prefix-fegzlqlfizxpgwaenbkzicwpltxv/AlDente GameCenter-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=50100 -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-own-target-headers.hmap -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/AlDente GameCenter-all-target-headers.hmap -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator/include -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources/i386 -I /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/DerivedSources -F/Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Products/Debug-iphonesimulator -fmodule-cache-path /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/clang-module-cache -O0 -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wuninitialized -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/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.dia -o /Users/guvenis/Library/Developer/Xcode/DerivedData/AlDente_GameCenter-gnkchngrsovmqlbsdelpoqdyohyg/Build/Intermediates/AlDente GameCenter.build/Debug-iphonesimulator/AlDente GameCenter.build/Objects-normal/i386/TicTacToeViewController.o -x objective-c /Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m 
1.  <eof> parser at end of file
2.  /Users/guvenis/Desktop/AlDente GameCenter/AlDente GameCenter/../TicTacToeViewController.m:25:1: LLVM IR generation of declaration 'TicTacToeViewController::checkLastMovesScore'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal 2 (use -v to see invocation)
clang: note: diagnostic msg: Please submit a bug report to http://developer.apple.com/bugreporter/ and include command line arguments and all diagnostic information.
clang: note: diagnostic msg: Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/TicTacToeViewController-bttija.mi
clang: note: diagnostic msg: /var/folders/4f/z2kfb3mj34qfy4jczzt7txr40000gn/T/TicTacToeViewController-bttija.sh
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

I was using an enum instance imported from the game class header in the viewcontroller, removing it fixed my problem. 我正在使用从viewcontroller中的游戏类标头导入的枚举实例,将其删除解决了我的问题。 It compiles without errors now. 现在可以正确编译。 Struggle for 2 hours, fix it yourself 5mins after posting it in stackoverflow. 奋斗2个小时,将其发布到stackoverflow中后5分钟即可自行修复。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM