had the same problem yesterday when I was compiling koffice on gentoo, i cannot remember what the problem was specifically, but it stopped from me compiling and everything else worked just fine...