nvcc fatal : Failed to detect host compiler properties
An answer to this question on Stack Overflow.
Question
I'm using nvcc in a very standard way:
nvcc -ccbin g++ mycode.cu
And it's suddenly stopped working, giving the error:
nvcc fatal : Failed to detect host compiler properties
Why might this be?
Answer
In this case, the issue was caused by the root partition running out of memory, as verified by df -h:
/dev/nvme0n1p2 24G 23G 0 100% /
As a quick way to get memory back, I ran:
sudo apt clean
Which recovered 2.4GB.
After this, nvcc again works without problems.