On Thu, 4 Oct 2018 23:06:32 -0600 Alex Bosworth <[email protected]> wrote:
> outfrom from `gcc -print-prog-name=cc1` -v - > > ------------- > ignoring nonexistent directory > "/usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/../../../../x86_64-pc-linux-gnu/include" > ignoring duplicate directory "/usr/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/include > /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include > /usr/local/include > /usr/lib/gcc/x86_64-pc-linux-gnu/8.2.0/include-fixed > End of search list. Alex, My system is still using gcc 7.3.0, so we will need someone using 8.2 or later to compare to your result. However, I think you were most wise to also include the results for cc1 because the include file in question, stdlib.h, is a C include, not the C++ include wrapper of the same name, which loads the stdlib.h C include. So, the search path for cc1 might be important as well. Your cc1plus search path looks like mine. However, your cc1 search path differs from mine in one important respect. On my system, `gcc -print-prog-name=cc1` -v lists /usr/include at the very *end*, but yours lists it as the very *first* one. Note that your `gcc -print-prog-name=cc1plus` -v lists /usr/include at the very *end* and this is opposite that of your cc1. Given the #include_next business, I think this might be the trouble. Then again, the compile command that failed on your system was g++ operating on a .cpp file so I don't see how cc1 settings could affect that. What do the following commands reveal: echo $CPATH echo $C_INCLUDE_PATH On my system, setting export C_INCLUDE_PATH=/usr/include will move the /usr/include to the first position of the search order. $CPATH additions add at the end. If your system is setting $C_INCLUDE_PATH to /usr/include maybe that could trigger the problem. Lastly, what does find /usr -name "stdlib.h" reveal on your system? also remember to unset C_INCLUDE_PATH unset CPLUS_INCLUDE_PATH before running `gcc -print-prog-name=cc1plus` -v if you are setting CPLUS_INCLUDE_PATH per our workaround. Cheers, Mike -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
