Xcode Clang Bus错误10

时间:2013-02-21 16:19:45

标签: xcode llvm clang

当我尝试在Xcode上构建代码时,我正在

clang: error: unable to execute command: Bus error: 10
clang: error: linker command failed due to signal (use -v to see invocation)

任何人都知道为什么? 代码在我同事的机器上构建得很好。只是没有我的。我多次使用DerivedData,没用。

3 个答案:

答案 0 :(得分:2)

您是否尝试删除所有项目派生数据文件夹,在您的情况下,它在这里:/ Users / User_Name / Library / Developer / Xcode / DerivedData /。删除所有项目的文件夹[不用担心,安全]并执行产品>从Xcode菜单中清理项目。

我试试,它很成功!

答案 1 :(得分:0)

删除派生数据有时是不够的。检查框架路径的正确性也是一个好主意。我遇到了#'总线错误10'我将框架复制到项目中时链接问题,但我的框架路径是我安装.dmg文件时创建的卷的路径。除了删除派生数据之外,删除框架路径(在构建设置中)解决了我的问题。

答案 2 :(得分:0)

SIGBUS (10) / Bus error 10 means a signal sent to an application if an attempts is made to access memory outside of its address space. This  may be due to bad pointer that has an invalid address in it.

这可能发生在不同的场景中。就我而言,它是在执行 Carthage 更新时。

您只有在查看日志后才能确定确切原因。检查这个apple documentation link

您也可以尝试以下解决方案:

  1. 清理项目/构建文件夹并运行项目
  2. Delete derived data -> 运行项目
  3. 重启系统 -> Delete derived data -> 运行项目

就我而言解决方案 3 有效