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

前端 未结 9 1065
执念已碎
执念已碎 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条回答
  •  旧时难觅i
    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.

提交回复
热议问题