Would snooping on the compiler's own error messages help weed out transient failures like out of memory, disk full, and so on? I recently compiled webkit-gtk and it managed to exhaust all of my memory AND swap.