Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Clang failed with exit code 254 while converting non-ARC project to Objective-C ARC using XCode

I am trying to converting a non-ARC project ( https://github.com/allaboutapps/A3GridTableView ) to ARC using the XCode ARC Converter. I am getting the following error

Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254.

I followed the scenario 1 of the http://maniacdev.com/2012/01/easily-get-non-arc-enabled-open-source-libraries-working-in-arc-enabled-projects/ tutorial.

I am using XCode Version 4.5.2 with Apple LLVM compiler 4.1.

I tried to google the error but couldn't relate it to my case. Thanks in advance.

The entire error output is

CompileC /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.o A3GridTableView/A3GridTableView.m normal i386 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/mihirrege/Downloads/A3GridTableView-master
    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 -Wno-trigraphs -fpascal-strings -O0 -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -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/iPhoneSimulator6.0.sdk -fexceptions -fasm-blocks -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch "-DIBOutlet=__attribute__((iboutlet))" "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" "-DIBAction=void)__attribute__((ibaction)" -ccc-arcmt-check -mios-simulator-version-min=5.1 -iquote /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-generated-files.hmap -I/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-own-target-headers.hmap -I/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-all-target-headers.hmap -iquote /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-project-headers.hmap -I/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Products/Debug-iphonesimulator/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/DerivedSources/i386 -I/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/DerivedSources -F/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Products/Debug-iphonesimulator -include /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/PrecompiledHeaders/A3GridTableViewSample-Prefix-exjedgarwqkaqyfxqduaqwpafmyv/A3GridTableViewSample-Prefix.pch -MMD -MT dependencies -MF /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.d --serialize-diagnostics /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.dia -c /Users/mihirrege/Downloads/A3GridTableView-master/A3GridTableView/A3GridTableView.m -o /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.o

0  clang             0x0000000101058eb2 main + 17130418
1  clang             0x0000000101059339 main + 17131577
2  libsystem_c.dylib 0x00007fff8e4098ea _sigtramp + 26
3  libsystem_c.dylib 0x0000000101cadf80 _sigtramp + 18446603342454605488
4  clang             0x00000001005a60df main + 5912031
5  clang             0x0000000100c99793 main + 13200531
6  clang             0x0000000100a76270 main + 10958704
7  clang             0x0000000100b6d7ff main + 11971839
8  clang             0x0000000100b1ffbe main + 11654334
9  clang             0x0000000100b8e74c main + 12106828
10 clang             0x0000000100b900c1 main + 12113345
11 clang             0x0000000100b907dc main + 12115164
12 clang             0x0000000100a76c11 main + 10961169
13 clang             0x0000000100a791f9 main + 10970873
14 clang             0x00000001000211e5 main + 124645
15 clang             0x00000001000199d6 main + 93910
16 clang             0x0000000100018648 main + 88904
17 clang             0x0000000100006308 main + 14344
18 clang             0x0000000100002d87 main + 647
19 clang             0x0000000100002af4
Stack dump:



0.  Program arguments: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -cc1 -triple i386-apple-ios5.1.0 -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -main-file-name A3GridTableView.m -pic-level 1 -mdisable-fp-elim -relaxed-aliasing -masm-verbose -target-cpu yonah -target-linker-version 134.9 -coverage-file /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.o -resource-dir /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/4.1 -arcmt-check -dependency-file /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.d -MT dependencies -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk -iquote /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-generated-files.hmap -iquote /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-project-headers.hmap -include-pch /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/PrecompiledHeaders/A3GridTableViewSample-Prefix-exjedgarwqkaqyfxqduaqwpafmyv/A3GridTableViewSample-Prefix.pch.pth -D DEBUG=1 -D IBOutlet=__attribute__((iboutlet)) -D IBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName))) -D IBAction=void)__attribute__((ibaction) -I /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-own-target-headers.hmap -I /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/A3GridTableViewSample-all-target-headers.hmap -I /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Products/Debug-iphonesimulator/include -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/DerivedSources/i386 -I /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/DerivedSources -F/Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Products/Debug-iphonesimulator -fmodule-cache-path /var/folders/j3/t6t3fgr52szcn945c3jn261c0000gn/T/clang-module-cache -O0 -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Wreturn-type -Wno-implicit-atomic-properties -Wno-receiver-is-weak -Wduplicate-method-match -Wformat -Wno-missing-braces -Wparentheses -Wswitch -Wno-unused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -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-sign-conversion -std=gnu99 -ferror-limit 19 -fmessage-length 0 -stack-protector 1 -mstackrealign -fblocks -fobjc-runtime-has-arc -fobjc-runtime-has-weak -fobjc-runtime-has-terminate -fobjc-default-synthesize-properties -fobjc-exceptions -fexceptions -fpascal-strings -fdiagnostics-show-option -serialize-diagnostic-file /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.dia -o /Users/mihirrege/Library/Developer/Xcode/DerivedData/A3GridTableViewSample-azjqesubssdefeedzlssseklompv/Build/Intermediates/A3GridTableViewSample.build/Debug-iphonesimulator/A3GridTableViewSample.build/Objects-normal/i386/A3GridTableView.o -x objective-c /Users/mihirrege/Downloads/A3GridTableView-master/A3GridTableView/A3GridTableView.m 
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple clang version 4.1 (tags/Apple/clang-421.11.66) (based on LLVM 3.1svn)
Target: i386-apple-darwin12.2.0
Thread model: posix
clang: note: diagnostic msg: PLEASE submit a bug report to http://developer.apple.com/bugreporter/ and include the crash backtrace, preprocessed source, and associated run script.
clang: error: unable to execute command: Segmentation fault: 11
clang: note: diagnostic msg: Error generating preprocessed source(s).
Command /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang failed with exit code 254
like image 692
mihirrege Avatar asked Nov 03 '22 08:11

mihirrege


1 Answers

I had a similar issue. In your case, adding @synthesize dataSource = _dataSource in A3GridTableView.m should help.

[A3GridTableView setDataSource:] has a memory management bug in it which is somehow related to this clang crash.

like image 189
proxi Avatar answered Nov 13 '22 05:11

proxi