Created attachment 318112 [details] emerge --info and emerge -pqv I managed to find one bug similar to this ( bug #344783 ), but the suggestion of "just make clean and then make modules prepare" don't seem to be sufficient. I've encountered this bug twice now, in 2 separate setups, but the current one is inside a VBox VM. The only thing I can think of that would be a likely candidate for a cause would be that I use KBUILD_OUTPUT= , which is one of the more frequently broken kernel module compilation features. I tried downgrading linux-headers just in case it was related, but no.
Created attachment 318114 [details] build.log
This bug maybe a duplicate of bug 424816. I encountered the same error while emerging xf86-video-virtualbox with a separated kernel build directory. /usr/src/linux-3.5.0-gentoo/arch/x86/include/asm/unistd.h:26:29: fatal error: asm/unistd_64.h: No such file or directory In my case, the patch in bug 424816 solved the problem.
*** This bug has been marked as a duplicate of bug 424816 ***