Hello, I recently (yesterday) bought one of those old refurbished laptops to poke at Linux with, Kali in particular. I wanted to try hacking on the Swift compiler with it as well, and tried just following the Ubuntu directions since they’re both based on Debian. Everything went fine until the actual build command, which errored out after a while. On a hunch, I ran the exact same command again (utils/build-script —release-debug
) and noticed that it got further before failing... well, 20-30 invocations of that command later, and it’s successfully built.
Now, this is an old refurb... a Lenovo T420 with only 4GB of RAM. I couldn’t help but notice that the system looked to be using all of that and nearly all of the swap right before the build command would throw an error and abort...
So, my question is could this be some weird problem stemming from following the build instructions for one platform (Ubuntu) on a similar not entirely the same platform (Kali), or is this like 99% probably the obvious “crashing because out of memory” and ninja just keeps picking up where it left off?
If it’s the later, how much RAM would I need to avoid this problem? I mean, I know it’ll never build fast, but I’d like it to build unattended if possible. Or is there a way to tell ninja that if a file fails to compile because of some certain error then it should just try again with 1 fewer threads (and I guess not actually fail completely unless that number gets to 0)?