【问题标题】:Xcode Clang Bus error 10Xcode Clang 总线错误 10
【发布时间】:2013-02-07 01:37:21
【问题描述】:

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

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

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

【问题讨论】:

  • 什么版本的clang?

标签: xcode llvm clang


【解决方案1】:

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

我试试,成功了!

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:
      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 有效

      【讨论】:

        猜你喜欢
        • 2016-07-14
        • 2017-07-06
        • 2019-08-19
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多