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

前端 未结 9 966
执念已碎
执念已碎 2020-12-23 09:21

Hey all basically what the title says, I was working on my project with no issues and then all of the sudden it just stopped compiling. The only thing that led up to this wa

相关标签:
9条回答
  • 2020-12-23 09:43

    I just ran into this, closing xcode and reopening it did the trick. I am curious now if purge would have done anything.

    0 讨论(0)
  • 2020-12-23 09:45

    I just had that same error, same situation(the code worked totally fine, then suddenly has that error message). For me I just closed the simulator and opened it again then xCode does not complain anymore.

    Have you tried to run your code in device?

    0 讨论(0)
  • 2020-12-23 09:45

    This is happening because your OS X install is running into the per-user process limit. And that's happening because XCode doesn't always cleanly kill your process at the end of a debugging session.

    On my machine, I have 709 processes allowed per user:

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

    Looking at the number of zombied processes on my machine:

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

    So you can see that I'm pretty close to the per-user process limit just due to XCode leaving zombie processes around.

    Unfortunately, I don't see a good way to kill these off. kill -9 doesn't work. Rebooting seems to be the only fix aside from temporarily raising your per-process limit, which isn't really a fix. You can't kill the parent process because that's launchd and killing that is pretty much equivalent to a reboot anyway.

    0 讨论(0)
  • 2020-12-23 09:48

    Roboot your MAC, Launch xcode and before doing anything clean up your project (cmd+shift+k).

    0 讨论(0)
  • 2020-12-23 09:51

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

    0 讨论(0)
  • 2020-12-23 09:51

    I did the clean and rebuild, also did "remove the app from the simulator". The problems just did not go away, sometimes it shows up as another compiler error on a xib file (which is a false alarm). Eventually I did reboot the machine and it fixed the problem.

    I recall doing the kill Xcode/simulator process in the past, but can not recall the exact situation.

    0 讨论(0)
提交回复
热议问题