(posting this here so future generations can Google for it)
My work Lenovo X230 has been overheating and abruptly shutting down a bit of late. This creates problems if I'm running e.g a long compile from source. When I start again I may get an error like:
/home/fun/libreoffice/workdir/CxxObject/sd/source/filter/eppt/escherex.o: file not recognised: File truncated
If you get the errors file not recognised: File truncated or file not recognized: File truncated when compiling something from source, it means there was a crash during compilation and a damaged .o file was written that the linker is not happy about.
FIRST STEP: delete the offending .o file, make again.
SECOND STEP: if this doesn't work, the offending .o file was cached somewhere. Remove the file (again), clear the cache, then try again. If it stops at a different offending .o file, remove that file (or just make clean to remove the lot), clear cache and make again.
In my case it's LibreOffice, so of course I'm using ccache as they recommend. So enter: ccache -C to trash the cache and start again from scratch.