It's possible that during your compilation, you receive an error message because of a lack of memory. In this case, you should request a compute node using an interactive job to do the compilation. For example,
[name@server ~]$ salloc --time=1:0:0 --ntasks=1 --mem-per-cpu=8G