I can solve it by building with MAKE_JOBS_UNSAFE=yes, but then the build is so slow.
It seems that there is a small part of the build which requires a lot of RAM, and it would be nice to restrict just that portion of the build to just one CPU.
Thanks, Stephen