I encountered the following problem while compiling g++ 4.7.0. The file asm/errno.h is not found because it is being search for in /usr/include/linux/ instead of /usr/include/x86_64-linux-gnu, which is the right place. After a lot of web searching I was able to diagnose the problem but not fix it. After trial and errors and dicsuccions with gcc developers, they suggested that it is an Ubuntu packaging problem: the headers are not properly set. I really don't know to report this, but I found a solution. Set the following environment variables:
export C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu export CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
The directory name may change with the machine.
In fact this problem does not allow one to compile any C or C++ programs.