xcode – 苹果LLVM编译3.1错误

只需更新 Xcode到4.3,现在我无法建立我的应用程序.我收到这个错误:
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

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

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

以下是整个输出:

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
    cd "/Users/aaron/Dropbox/XCode Projects/iDB"
    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 -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

0  clang             0x000000010a5c15a2 _ZL15PrintStackTracePv + 34
1  clang             0x000000010a5c1a29 _ZL13SignalHandleri + 553
2  libsystem_c.dylib 0x00007fff94b6dcfa _sigtramp + 26
3  libsystem_c.dylib 0x00007fff6929a1b0 _sigtramp + 18446744072978875600
4  clang             0x0000000109ef3798 _ZL20findRetainCycleOwnerPN5clang4ExprERN12_GLOBAL__N_116RetainCycleOwnerE + 312
5  clang             0x0000000109ef35af clang::Sema::checkRetainCycles(clang::ObjCMessageExpr*) + 303
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
7  clang             0x00000001097ee18a clang::Sema::ActOnInstanceMessage(clang::Scope*,clang::Expr*,clang::ASTMultiPtr<clang::Expr*>) + 138
8  clang             0x00000001097ee04b clang::Parser::ParseObjCMessageExpressionBody(clang::SourceLocation,clang::OpaquePtr<clang::QualType>,clang::Expr*) + 2091
9  clang             0x00000001097ed7f4 clang::Parser::ParseObjCMessageExpression() + 852
10 clang             0x0000000109765597 clang::Parser::ParseCastExpression(bool,bool,bool&,bool) + 6807
11 clang             0x0000000109763ab2 clang::Parser::ParseAssignmentExpression() + 114
12 clang             0x0000000109763a21 clang::Parser::ParseExpression() + 17
13 clang             0x00000001097b8efe clang::Parser::ParseExprStatement(clang::ParsedAttributes&) + 46
14 clang             0x00000001097634bc clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,32u>&,bool) + 1564
15 clang             0x00000001097627d9 clang::Parser::ParseCompoundStatementBody(bool) + 409
16 clang             0x0000000109763242 clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,bool) + 930
17 clang             0x00000001097b6d0b clang::Parser::ParseIfStatement(clang::ParsedAttributes&) + 475
18 clang             0x000000010976353c clang::Parser::ParseStatementOrDeclaration(clang::ASTOwningVector<clang::Stmt*,bool) + 1692
19 clang             0x00000001097627d9 clang::Parser::ParseCompoundStatementBody(bool) + 409
20 clang             0x0000000109edbd30 clang::Parser::ParseLexedObjCMethodDefs(clang::Parser::LexedMethod&) + 272
21 clang             0x000000010980483e clang::Parser::ParseObjCAtEndDeclaration(clang::SourceRange) + 158
22 clang             0x00000001097e2222 clang::Parser::ParseObjCAtDirectives() + 386
23 clang             0x0000000109723e87 clang::Parser::ParseExternalDeclaration(clang::Parser::ParsedAttributesWithRange&,clang::Parser::ParsingDeclSpec*) + 759
24 clang             0x0000000109723b19 clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&) + 249
25 clang             0x000000010970688b clang::ParseAST(clang::Sema&,bool) + 299
26 clang             0x00000001097053d9 clang::CodeGenAction::ExecuteAction() + 857
27 clang             0x00000001096d793f clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 879
28 clang             0x00000001096d65cb clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2683
29 clang             0x00000001096c8dce cc1_main(char const**,char const**,char const*,void*) + 5086
30 clang             0x00000001096a35d8 main + 648
31 clang             0x00000001096a3344 start + 52
32 clang             0x0000000000000071 start + 18446744069256629601
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 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 
1.  /Users/aaron/Dropbox/XCode Projects/iDB/iDB/SCheckBox.m:36:47: current parser token ';'
2.  /Users/aaron/Dropbox/XCode Projects/iDB/iDB/SCheckBox.m:27:146: in compound statement ('{}')
3.  /Users/aaron/Dropbox/XCode Projects/iDB/iDB/SCheckBox.m:29:102: in compound statement ('{}')
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/1y/fbhzgfpn2ld9qxdfpgl7d_rm0000gn/T/SCheckBox-GckJrn.mi
clang: note: diagnostic msg: /var/folders/1y/fbhzgfpn2ld9qxdfpgl7d_rm0000gn/T/SCheckBox-GckJrn.sh
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254

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

[super.inputField addSubview:_checked];

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

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

解决方法

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

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

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

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

将其更改为正确版本: –

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

工作正常,解决问题!

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


当我们远离最新的 iOS 16 更新版本时,我们听到了困扰 Apple 最新软件的错误和性能问题。
欧版/美版 特别说一下,美版选错了 可能会永久丧失4G,不过只有5%的概率会遇到选择运营商界面且部分必须连接到iTunes才可以激活
一般在接外包的时候, 通常第三方需要安装你的app进行测试(这时候你的app肯定是还没传到app store之前)。
前言为了让更多的人永远记住12月13日,各大厂都在这一天将应用变灰了。那么接下来我们看一下Flutter是如何实现的。Flutter中实现整个App变为灰色在Flutter中实现整个App变为灰色是非常简单的,只需要在最外层的控件上包裹ColorFiltered,用法如下:ColorFiltered(颜色过滤器)看名字就知道是增加颜色滤镜效果的,ColorFiltered( colorFilter:ColorFilter.mode(Colors.grey, BlendMode.
flutter升级/版本切换
(1)在C++11标准时,open函数的文件路径可以传char指针也可以传string指针,而在C++98标准,open函数的文件路径只能传char指针;(2)open函数的第二个参数是打开文件的模式,从函数定义可以看出,如果调用open函数时省略mode模式参数,则默认按照可读可写(ios_base:in | ios_base::out)的方式打开;(3)打开文件时的mode的模式是从内存的角度来定义的,比如:in表示可读,就是从文件读数据往内存读写;out表示可写,就是把内存数据写到文件中;
文章目录方法一:分别将图片和文字置灰UIImage转成灰度图UIColor转成灰度颜色方法二:给App整体添加灰色滤镜参考App页面置灰,本质是将彩色图像转换为灰度图像,本文提供两种方法实现,一种是App整体置灰,一种是单个页面置灰,可结合具体的业务场景使用。方法一:分别将图片和文字置灰一般情况下,App页面的颜色深度是24bit,也就是RGB各8bit;如果算上Alpha通道的话就是32bit,RGBA(或者ARGB)各8bit。灰度图像的颜色深度是8bit,这8bit表示的颜色不是彩色,而是256
领导让调研下黑(灰)白化实现方案,自己调研了两天,根据网上资料,做下记录只是学习过程中的记录,还是写作者牛逼
让学前端不再害怕英语单词(二),通过本文,可以对css,js和es6的单词进行了在逻辑上和联想上的记忆,让初学者更快的上手前端代码
用Python送你一颗跳动的爱心
在uni-app项目中实现人脸识别,既使用uni-app中的live-pusher开启摄像头,创建直播推流。通过快照截取和压缩图片,以base64格式发往后端。
商户APP调用微信提供的SDK调用微信支付模块,商户APP会跳转到微信中完成支付,支付完后跳回到商户APP内,最后展示支付结果。CSDN前端领域优质创作者,资深前端开发工程师,专注前端开发,在CSDN总结工作中遇到的问题或者问题解决方法以及对新技术的分享,欢迎咨询交流,共同学习。),验证通过打开选择支付方式弹窗页面,选择微信支付或者支付宝支付;4.可取消支付,放弃支付会返回会员页面,页面提示支付取消;2.判断支付方式,如果是1,则是微信支付方式。1.判断是否在微信内支付,需要在微信外支付。
Mac命令行修改ipa并重新签名打包
首先在 iOS 设备中打开开发者模式。位于:设置 - 隐私&安全 - 开发者模式(需重启)
一 现象导入MBProgressHUD显示信息时,出现如下异常现象Undefined symbols for architecture x86_64: "_OBJC_CLASS_$_MBProgressHUD", referenced from: objc-class-ref in ViewController.old: symbol(s) not found for architecture x86_64clang: error: linker command failed wit
Profiles >> 加号添加 >> Distribution >> "App Store" >> 选择 2.1 创建的App ID >> 选择绑定 2.3 的发布证书(.cer)>> 输入描述文件名称 >> Generate 生成描述文件 >> Download。Certificates >> 加号添加 >> "App Store and Ad Hoc" >> “Choose File...” >> 选择上一步生成的证书请求文件 >> Continue >> Download。
今天有需求,要实现的功能大致如下:在安卓和ios端实现分享功能可以分享链接,图片,文字,视频,文件,等欢迎大佬多多来给萌新指正,欢迎大家来共同探讨。如果各位看官觉得文章有点点帮助,跪求各位给点个“一键三连”,谢啦~声明:本博文章若非特殊注明皆为原创原文链接。