xcode GenerateDSYMFile:dsymutil 失败,退出代码为 11

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9828618/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:45:27  来源:igfitidea点击:

GenerateDSYMFile: dsymutil fails with exit code 11

objective-ciosxcodedsymutil

提问by Caleb

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:

我今天早上从 MacOS X 10.6 (Snow Leopard) 升级到 10.7 (Lion),也从 Xcode 4.2 升级到 Xcode 4.3.2。也许更重要的是,这意味着我现在正在针对 iOS 5.1 SDK 而不是 5.0 构建我的项目。这是很多更改,其中一个导致我的项目中断:由于以下错误,项目将不再构建:

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):

构建结果中给出的完整命令如下(完整披露:我已将项目名称更改为“MyProject”以保护无辜者):

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.

这仅在我尝试为 iOS 设备构建时发生;模拟器的构建工作正常。

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.

我已经做了很多搜索来找到这个错误的解释,但还没有找到任何解释这个错误的东西。我确实发现了一个关于相同错误的 SO 问题,在那种情况下是由 Info.plist 文件中的错误标签引起的,但我的 Info.plist 看起来不错。另一个问题建议创建一个新目标并复制所有内容。我还没有尝试过,因为我的项目非常大,但它看起来是最好的下一步。

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

谁能告诉我“退出代码 11”dsymutil是什么意思以及如何解决它?

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

更新:dsymutil在命令行运行命令显示退出代码 11 是一个分段错误。不过还是不知道是什么原因造成的。

回答by Caleb

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".

到目前为止,对我有用的解决方法是将项目中的调试信息格式设置从“DWARF with dsym”更改为普通的“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.

这至少让我可以为 iOS 设备构建项目并进行调试,所以这是一个非常好的开始。我不确定省略 dsym 会失去什么,所以我会继续寻找。

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

更新:Apple DTS 建议重新安装 Xcode。我还没有尝试过,但如果有帮助,我会更新这个答案。

回答by jeet.chanchawat

For future users who come here via Google :

对于通过 Google 来到这里的未来用户:

It happened to me because my working directory was full.

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

PS 如果您迄今为止在同一台机器上开发了如此多的应用程序,您可以随时继续删除驻留在此目录中的所有内容。 /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.

PPS:不要忘记检查目录的大小以感到惊讶。删除整个路径可能需要长达 4 个小时,所以请在空闲时间进行,只需删除 2-3 个子目录并继续您的工作。

回答by Artyom

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

将“iOS 部署目标”从 6.1 更改为 4.0 对我有帮助!

enter image description here

在此处输入图片说明

回答by A.sharif

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

你确定你的项目构建设置,编译器版本设置为系统默认值吗?