7

当我试图在 Xcode 上构建我的代码时,我得到了

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

有谁知道为什么?该代码在我同事的机器上构建良好。只是不在我身上。我把 DerivedData 清空了好几次,没用。

4

3 回答 3

3

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

我试试,成功了!

于 2013-10-29T07:53:52.410 回答
0

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

于 2016-11-29T15:58:53.577 回答
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.

这可能发生在不同的场景中。就我而言,是在进行迦太基更新时。

只有通过日志,您才能确定确切的原因。检查这个苹果文档链接

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

  1. 清理项目/构建文件夹并运行项目
  2. 删除派生数据-> 运行项目
  3. 重启系统 ->删除派生数据-> 运行项目

在我的情况下,解决方案 3 有效

于 2021-05-12T10:17:49.620 回答