11

I upgraded from MacOS X 10.6 (Snow Leopard) to 10.7 (Lion) this morning, and also from Xcode 4.2 to Xcode 4.3.2. Perhaps more importantly, that means that I'm now building my project against the iOS 5.1 SDK instead of 5.0. That's a lot of changes, and one of them caused my project to break: the project will no longer build due to the following error:

Command /Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil
failed with exit code 11

The full command given in the build results is as follows (full disclosure: I've changed the project name to 'MyProject' to protect the innocent):

GenerateDSYMFile /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject
    cd /Users/caleb/MyProject/iphone
    setenv PATH "/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/usr/bin/dsymutil /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app/MyProject -o /Users/caleb/xcode-build/MyProject-fmkmldxfmhvmoicxrcsqsptzuvjs/Build/Products/Debug-iphoneos/MyProject.app.dSYM

This only happens when I try to build for an iOS device; building for the simulator works fine.

I've done quite a bit of searching to find an explanation of this error, but haven't found anything yet that explains the error. I did find one SO question about the same error, caused in that case by a bad tag in an Info.plist file, but my Info.plist looks fine. Another question suggests creating a new target and copying everything over. I haven't tried that yet as my project is quite large, but it's looking like the best next step.

Can anyone tell me what "exit code 11" from dsymutil means and how to fix it?

Update: Running the dsymutil command at the command line shows that exit code 11 is a segmentation fault. Still don't know what causes it, though.

Community
  • 1
  • 1
Caleb
  • 124,013
  • 19
  • 183
  • 272
  • You should be able to see more information if you look in the build results. If you hover over the item in question, an icon should appear on the right that you can click to see what command was executed and what output it gave. – Jim Mar 22 '12 at 19:06
  • @Jim You're right -- I should have included that in the first place. I've added the full command to the question. – Caleb Mar 22 '12 at 19:17
  • Some things I've read seem to say it can be an `Info.plist` problem. But it should have been fixed that problem. Perhaps check your `Info.plist` though? – mattjgalloway Mar 26 '12 at 15:25
  • @Caleb Try cleaning the project. – Evan Mulawski Mar 26 '12 at 15:29
  • @mattjgalloway Have looked at the Info.plist pretty carefully, as described in the question above. More specifically, I haven't found any incorrect tags in the XML (that was a problem for the author of the question I linked above). – Caleb Mar 26 '12 at 15:32
  • @EvanMulawski Always good advice, but I've cleaned the project many times. – Caleb Mar 26 '12 at 15:34
  • @Caleb - oops sorry that I missed that in your question. I've no idea unfortunately. My suggestion is to cut everything back until it starts building. – mattjgalloway Mar 26 '12 at 15:35
  • @Caleb I figured - just wanted to make sure. – Evan Mulawski Mar 26 '12 at 15:37
  • What happens if you run the dsymutil command in terminal with the --verbose option? Maybe you'll get a bit more info. – rooftop Mar 26 '12 at 15:58

4 Answers4

27

A workaround that's working for me so far is to change the Debug Information Format setting in the project from "DWARF with dsym" to plain old "DWARF".

Debug Information Format setting

This at least lets me build the project for iOS devices and debug, so that's a very good start. I'm not sure what we lose by leaving out dsym, so I'm going to keep looking.

Update: Apple DTS suggests reinstalling Xcode. I haven't been able to try that yet, but will update this answer if it's helpful.

Caleb
  • 124,013
  • 19
  • 183
  • 272
6

For future users who come here via Google :

It happened to me because my working directory was full.

EDIT: Clear Some Space in your disk.

P.S. You can always go ahead and delete everything residing in this directory if you have developed so many apps till date on the same machine. /Users/<username>/Library/Developer/Xcode/DerivedData

P.P.S: Don't forget to check the size of the directory to get surprised. It may take upto 4 hours deleting the entire path, so do it in free time, just delete 2-3 sub directories and resume your work.

jeet.chanchawat
  • 5,842
  • 5
  • 38
  • 59
3

Changing "iOS Deployment Target" from 6.1 to 4.0 helped me !

enter image description here

Artyom
  • 851
  • 11
  • 15
2

have you made sure that your project build settings, compiler version is set to system default?

A.sharif
  • 1,977
  • 1
  • 16
  • 27
  • I have been doing some searching, sadly couldn't find the reasoning behind, however a lot of people have said creating a new project and copying everything over did solve the problem. I know you said you were going to try this step, next. Did it work? – A.sharif Mar 27 '12 at 13:33
  • Apparently the Exit code 11 is a "SIGSEGV - codesign crashed with a segmentation fault." A suggestion is that the issue has to be a problem with corrupted certificates, and reapplying them might solve the problem – A.sharif Mar 27 '12 at 13:56
  • Thanks for your comments. I've created a new target within the same project, but the result is the same. You're right that exit code 11 is a segmentation error -- I discovered that recently when I tried running the same `dsymutil` at the command line. Still don't know what causes it, though. – Caleb Mar 27 '12 at 16:48
  • Bounty awarded. Thanks for trying to help me find an answer to this frustrating problem. – Caleb Apr 02 '12 at 12:38
  • I wish I could have helped more >.< Please msg me if you solve the problem. – A.sharif Apr 02 '12 at 14:27