Xcode not compiling any project? 'clang failed with exit code 255'

Hi everyone basically what the name says, I worked on my project without problems, and then suddenly stopped compiling. The only thing that led to this was one of my .m files, blushing when I accidentally renamed it, and I had to remove it and replace it, but that’s all. I searched around and can confirm that this is not my Bundle identifier that is causing the problem. I also ran it with llvm-gcc and got this "llvm-gcc-4.2 with exit code 1" and helped? Thank!

ETA: This is also what he says in the small error field:

clang: error: failed to execute command: posix_spawn failed: resource is temporarily unavailable clang: error: clang frontend command failed due to signal 1 (use -v to see the call) /Developer/Platforms/iPhoneOS.platform/Developer command / usr / bin / clang failed with exit code 255

+58
objective-c iphone xcode
Nov 05 2018-11-11T00:
source share
9 answers

I had the same error, the same situation (the code worked completely fine, and then this error message suddenly appeared). For me, I just closed the simulator and reopened it, and xCode no longer complained.

Did you try to run your code on the device?

+183
Nov 01
source share
β€” -

This is because your installation of OS X is running at a process limit for each user. And this is because Xcode does not always cleanly kill your process at the end of a debugging session.

On my machine, I have 709 processes for each user:

El Smeg:~$ sysctl kern.maxprocperuid kern.maxprocperuid: 709 

Looking at the number of zombie processes on my machine:

 El Smeg:~$ ps aux | grep \(GridView\) | wc -l 608 

So you can see that I am very close to the process limit for each user just because Xcode is leaving zombie processes.

Unfortunately, I do not see a good way to kill them. kill -9 does not work. Rebooting is apparently the only solution besides temporarily raising the limit on each process, which is not really a fix. You cannot kill the parent process, because this start and kill is in any case equivalent to a reboot.

+66
Nov 01 '12 at 18:44
source share

For me, I just had to reboot (OS X 10.7, Xcode 4.5).

+20
Oct 25 '12 at 23:57
source share

Roboot your MAC, Run xcode and before you do anything, clean your project (cmd + shift + k).

+2
Jan 24 '13 at 13:07
source share

I have had it several times. The easiest way I found to fix is ​​to simply close the simulator.

+2
Jan 31 '13 at 12:37
source share

Perhaps this may be useful to someone.

I had the same problem and I just compile it with make -j .

As you know, this makes make use as many threads as possible, and I think one of these threads used ressource when the other tried to access it.

Let make -j compile before the error, it will end automatically, and then just make .

It should work fine.

Of course, you can just compile with make from the start, but it will be longer.

+2
Sep 16 '17 at 15:12
source share

I just ran into this, closing xcode and opening it again, did the trick. I'm wondering if purge would do anything now.

0
Jan 25 '13 at 4:01
source share

I did a clean and restored, also "removed the application from the simulator." The problems simply did not disappear, sometimes this manifests itself as another compiler error in the xib file (which is a false alarm). In the end, I rebooted the machine and fixed the problem.

I remember how in the past I did the Xcode / simulator kill process, but I can’t remember the exact situation.

0
May 10 '13 at 20:41
source share

I tried this with the beta version of Xcode 11 and it doesn’t work, I changed the build configuration to Release and it works like a charm. Project ---> Edit scheme β†’ Run ---> Build Configuration ---> Release

0
Jul 12 '19 at 7:44
source share



All Articles