17

I have a project which compiled perfectly in the past, but after the last Xcode update (6.3.2) I get a compile error whenever I try to run it directly on a device. Building and Running it in the simulator works fine. The Archive function works fine as well. But no matter what device I connect or what iOS version the device is running, I always get the same compile error:

Stack dump:

0.  /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS8.3.sdk/System/Library/Frameworks/CoreImage.framework/Headers/CIFilter.h:221:39: current parser token 'NS_REQUIRES_NIL_TERMINATION'
clang: error: unable to execute command: Segmentation fault: 11
clang: error: clang frontend command failed due to signal (use -v to see invocation)
Apple LLVM version 6.1.0 (clang-602.0.53) (based on LLVM 3.6.0svn)
Target: arm-apple-darwin14.3.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: note: diagnostic msg: 
********************

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.m
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.cache
clang: note: diagnostic msg: /var/folders/p5/2yjs4f055hb0vvgl12yvj38r0000gq/T/SmallAdsSystem-a86b3e.sh
clang: note: diagnostic msg: 

********************
  1. It shows me random files that I'm supposed to submit to the bug report.
  2. I haven't made any code changes from a working version to the version causing the current problems and I even reverted to an earlier version which is live and running in the Appstore but still the same error.
  3. I have deleted xcode and installed again trough the app store
  4. I tried making changes to my code to maybe pinpoint any problems but since the source file of the problem changes every time, I don't really think anymore that it has anything to do with my code.

This is driving me mad. Any help is much appreciated

4
  • 2
    Did you do this? "diagnostic msg: PLEASE submit a bug report to developer.apple.com/bugreporter and include the crash backtrace, preprocessed source, and associated run script. clang: note: diagnostic msg:"
    – picciano
    Jun 1, 2015 at 14:58
  • 1
    No, not yet. Wanted to know if it's just simply my fault first.
    – Cane
    Jun 1, 2015 at 15:18
  • please change your compiler GCC instead of LLVM ,,and try.
    – VD Patel
    Jun 2, 2015 at 12:59
  • 1
    Picciano is correct: you should always report a compiler crash, which can’t be your fault. (Though as user2444342 notes, you can sometimes work around the crash by fiddling with your code.) VD Patel: GCC was removed from Xcode years ago. (The last GPL 2 version was getting quite old, and Apple can’t use any GPL 3 version.) Apr 9, 2016 at 16:02

15 Answers 15

33

I tried to add the paypal framework to my iOS Project (Using Xcode 7.2 and Objective-C language), When building it is not giving any error, but when I try to archive the Project and trying to make the IPA, I am getting that Error

unable to execute command: Segmentation fault: 11

Screenshot:

enter image description here

After huge trying I have disabled the Bitcode in Project's Target->Build Settings->Enable Bitcode. Now the build can be achieved. Please check the following screenshot.

enter image description here

4
  • will there any issue if I put it in app store? Apr 13, 2016 at 13:25
  • Hi @BhavinRamani I have tried to make that on 2-3 projects for Google Sign up by WebView, and paypal framework, But till now app store testers did not respond me anything for that, I mean still now the App can be lived by that change. I do not know later on they change anything or not. Apr 15, 2016 at 11:53
  • Your answer helped me. I got error while archive the project not in run time after integrated facebook analytics in my app. Thanks for your reply. 😀 Apr 15, 2016 at 11:57
  • It helped me. Fresh new project, Xcode 7.2, OS X 10.10.5, archiving was lead to segmentation fault. Disabled bitcode, and oops, archiving done.
    – mkll
    Nov 18, 2016 at 18:17
17

I found a fix for my problem:

I'm using a virtual machine and opened the project directly in the shared folder. I moved the project to the documents and now it works!

2
  • Closing and reopening project worked... I feel dumb, but thanks! Dec 19, 2019 at 21:41
  • Had the same problem. It seems that clang indeed can not handle sources in a shared folder. After copying the sources into a local folder within the virtual machine, everything worked. Jun 30, 2020 at 12:02
6
unable to execute command: Segmentation fault: 11.

I was able to turn off the bitcode and able to achieve the ipa. An in depth of what bitcode means can be seen here

enter image description here

1
  • 1
    It worked, but I also needed to remove the project from WorkSpace and open it again. May 22, 2020 at 16:08
4

We've just realized that segfault was caused by invalid unicode characters in our sources.

3

If you are using a virtual machine, then copy the files inside the virtual machine, don't import from your shared files, and it will work.

2

I had the exact same problem. In my case I looked at the offending file and played around with it. I was able to resolve the error by commenting out a giant NSDictionary declaration:

 NSDictionary* glyphNameToUnicode = [[NSDictionary alloc] initWithObjectsAndKeys:
                                    @"A", @"A",
                                    @"\u00C6", @"AE",
                                    @"\u01FC", @"AEacute",
                                    @"\u01E2", @"AEmacron",

This thing had probably 300 lines maybe more. Instead I moved the declaration into a file and loaded the dictionary from the file. Not sure if that helps, but in my case those files were not random...

Its deff a bug with xcode though...

2

Pods are provided xcode/.... path for installation from git and i installed xcode 7.3.1 and its named like xcode3 so i face this type of error but when i renamed it to xcode then this error is solved for me.

So In summary, First of all please check your xcode name in application section.

If it is not xcode then please rename it to xcode and try to run your app.

2
  • Thanks, this put me on the right track and I asked the moderator to undelete it. See my answer (Sept 29, '16) for details. Sep 29, 2016 at 19:17
  • Thanks @JoshuaNozzi for understand it. Sep 30, 2016 at 5:48
1

Apparently it was a bug in my Xcode version. Had to revert to an old one and everything worked again. With the newest update everything was working ok again.

1

In order to solve a problem (a known bug closed as a duplicate as of this writing) that caused apps built under 10.12 (macOS Sierra) to fail to launch under 10.9 (even when they'd done so without trouble previously), I'd installed 10.11 and Xcode 7.3.1 under a VMWare instance. Xcode (due to laziness on my part) was copied to the Desktop.

After reading SmarterSusheel's answer regarding a renamed Xcode, it dawned on me it may be path-related, so I moved Xcode to /Applications and tried again. Problem (mostly) solved. I say "mostly" because I also had to copy my project folder into the VMWare instance since it seemed to have issues building under the shared folder as well.

1

Setting Link-Time Optimization to NO in both Debug and Release mode is what resolved the problem for me.

2
  • 1
    Incremental did not work on device, but Monolithic works fine. So I used No for debug and Monolithic for Release. Mar 22, 2019 at 14:43
  • @StanislavGoryachev is correct select "Whole Module" for "Compilation Mode" in "Build Settings".
    – ThE uSeFuL
    May 3, 2022 at 22:47
0

I was facing similar issue:

clang: error: unable to execute command: Segmentation fault: 11
clang: error: linker command failed due to signal (use -v to see invocation)

Simply updating from Xcode 7.2 to 7.3.1 has resolved the issue!

1
  • It helped me too. But after a while having the same problem with Xcode 7.3.1.
    – Biga
    Jul 15, 2016 at 8:28
0

I only had problem for i386 architecture when building for iPhone 4s simulator running 9.3

When disabling bitcode didn't work (suggested above), i tried to look at the source code. I didn't find any ascii related stuff (suggested by others), so I tried to comment out method by method until I found the offending line. For me the error was caused by this:

let keyboardSize = ((info![UIKeyboardFrameBeginUserInfoKey] as AnyObject).cgRectValue.size)

Changed it into:

let keyboardSize = (info![UIKeyboardFrameBeginUserInfoKey] as! NSValue).cgRectValue.size
0

Quit and reopen the Xcode worked for me !

make sure you clean the build folder after reopening the Xcode !

0
0

Adding this flag -ld64 to Other Linker Flags fixed it on Xcode 15

-1

I was facing similar issue:

clang: error: unable to execute command: Segmentation fault: 11 clang: error: linker command failed due to signal (use -v to see invocation)

then i was change my Provisioning profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.