Xcode Clang Bus error 10
Asked Answered
L

4

7

When I am trying to build my code on Xcode, I am getting

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

Anyone knows why? The code builds fine on my colleague's machine. Just not on mine. I empied DerivedData several times, no use.

Landy answered 21/2, 2013 at 16:19 Comment(1)
What version of clang?Kallman
U
3

Did you try to remove your all projects Derived data folders, in your case it'll here: /Users/User_Name/Library/Developer/Xcode/DerivedData/. remove all project's folder [No worries, its safe] and do a Product > Clean your projects from Xcode menu.

I try, it is successful!

Underscore answered 29/10, 2013 at 7:53 Comment(0)
T
0

Removing derived data is sometimes not enough. It's also a good idea to check the correctness of paths to frameworks. I experienced the 'bus error 10' linking problem when I had copied a framework into the project, but my framework path was that of the volume created when I mounted the .dmg file. Deleting the framework path (in the build settings) solved the problem for me - in addition to removing the derived data.

Tighe answered 29/11, 2016 at 15:58 Comment(0)
T
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.

This can happens at different scenarios. In my case it was while doing Carthage update.

You’ll be able to identify exact reason only after going through logs. Check this apple documentation link.

You can also try below solutions:

  1. Clean project/build folder and run project
  2. Delete derived data -> Run project
  3. Restart system -> Delete derived data -> Run project

In my case solution 3 worked.

Travertine answered 12/5, 2021 at 10:17 Comment(0)
M
0

I had the same issue. My problem was that I opened the xCode project on my webserver (rookie mistake). For some projects, this isn't an issue but just make sure you run it locally

Marna answered 24/8, 2023 at 9:55 Comment(1)
This does not really answer the question. If you have a different question, you can ask it by clicking Ask Question. To get notified when this question gets new answers, you can follow this question. Once you have enough reputation, you can also add a bounty to draw more attention to this question. - From ReviewCircumspection

© 2022 - 2024 — McMap. All rights reserved.