There are recommendations about the memory needed for compiling.
If you do not have enough RAM just use the docker image which is already precompiled.