Can you try this:
a) ./Setup.sh && ./GenerateProjectFiles.sh
b) Edit your Engine/Saved/UnrealBuildTool/BuildConfiguration.xml and limit the number of cores to build with, like the example below.
c) Run make
And see if that allows you to build without errors? It’ll probably take forever, but it’ll maybe let us know if the number of parallel build processes is an issue. And yeah, definitely double check you’re not running out of hard drive space as well. Thanks!
mikesart@mikesart-tr3:/epic/p4/UE4/UE4.git (4.26)$ cat Engine/Saved/UnrealBuildTool/BuildConfiguration.xml
<?xml version="1.0" encoding="utf-8" ?>
<Configuration xmlns="https://www.unrealengine.com/BuildConfiguration">
<ParallelExecutor>
<MaxProcessorCount>4</MaxProcessorCount>
</ParallelExecutor>
<LocalExecutor>
<MaxProcessorCount>4</MaxProcessorCount>
</LocalExecutor>
</Configuration>