Sort:  

It was a problem with my server, it ran out of memory.

Aah yes, I forgot to mention that compiling requires a lot of memory.

Try to increase swap :)

Is it possible to compile on one machine and then run it on another? I can compile on my personal laptop, but it's not online 24/7, but I have some 1GB RAM servers.

I am not 100% sure, but you could try building and then porting the hived and cli_wallet binaries.

But have you tried increasing swap and building ? It will be slow but it should compile.

If not it's fine to not be online 24/7 you mostly need to be there at the moment of the hard fork (the 30 of august at 20 UTC).