Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.

share|improve this question
    
I'd try to type: #include "/usr/include/x86_64-linux-gnu/asm/errno.h It's not the best solution but it should work. –  omnidan May 8 '11 at 8:16
    
I have not tried it myself, but here is some information on compiling g++ 4.7: lukaszbyczynski.com/archives/208 –  sroecker Nov 7 '11 at 21:16
add comment

closed as too localized by Bruno Pereira Mar 7 '12 at 22:59

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.