View Full Version : compileation error: No space left on device

July 3rd, 2009, 04:37 PM
I am compiling my C++ program with g++ on a server and receive out of space error:

count.cc:76: fatal error: error writing to /tmp/cckf2zK1.s: No space left on device
compilation terminated.

Does it mean that the usage in /tmp is full? Is this problem for the whole server or only for my account? What can I do to free up space so that I can compile my program?
Thanks and regards!

July 3rd, 2009, 04:48 PM
How about giving the -pipe switch to g++?

July 3rd, 2009, 04:50 PM
How to give the -pipe switch to g++? What does it mean? Thanks!

July 3rd, 2009, 05:01 PM
It means exactly what it says ;) Use pipes instead of temporary files. You might still get into trouble during linking though, so see if there's some junk in /tmp that you can rm.

g++ -pipe ....

Or add it to the Makefile CFLAGS/ CPPFLAGS or whatever you are using.

July 3rd, 2009, 05:40 PM
It works. Thanks!

July 3rd, 2009, 09:24 PM
Also consider cleaning out the /tmp directory or rebooting.