Hello Again, I believe I have found the culprit for my 'broken' search path for gcc and g++. In 'Introduction to Xorg-7' we are told to run the following if we are using a directory other than /usr as our $XORG_PREFIX. ...
cat >> /etc/profile.d/xorg.sh << "EOF" pathappend $XORG_PREFIX/bin PATH pathappend $XORG_PREFIX/lib/pkgconfig PKG_CONFIG_PATH pathappend $XORG_PREFIX/share/pkgconfig PKG_CONFIG_PATH pathappend $XORG_PREFIX/lib LIBRARY_PATH pathappend $XORG_PREFIX/include C_INCLUDE_PATH pathappend $XORG_PREFIX/include CPLUS_INCLUDE_PATH ACLOCAL="aclocal -I $XORG_PREFIX/share/aclocal" export PATH PKG_CONFIG_PATH ACLOCAL LIBRARY_PATH C_INCLUDE_PATH CPLUS_INCLUDE_PATH EOF The setting of C_INCLUDE_PATH and CPLUS_INCLUDE_PATH here cause a gcc and g++ to change their search order, to put /usr/include at the beginning of their search path. This breaks some builds like mesa. To be clear, this was my fault as the note before this states to skip these instructions if I am using /usr as my $XORG_PREFIX, which I am. Hope this helps someone else. Chris On Sat, Aug 22, 2020 at 1:06 PM Chris Gorman <chrisjohgor...@gmail.com> wrote: > > Hello Again, > > After a rebuild of LFS-10.0-rc1, it appears to be fixed. > > (lfs chroot) root:/# echo main'(){}' | g++ -v -xc++ - |& grep include > ignoring nonexistent directory > "/usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../include/c++/10.2.0 > > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../include/c++/10.2.0/x86_64-lfs-linux-gnu > > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../include/c++/10.2.0/backward > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/include > /usr/local/include > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/include-fixed > /usr/include > > and > > (lfs chroot) root:/# echo int main'(){}' | gcc -v -xc - |& grep include > ignoring nonexistent directory > "/usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/../../../../x86_64-lfs-linux-gnu/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/include > /usr/local/include > /usr/lib/gcc/x86_64-lfs-linux-gnu/10.2.0/include-fixed > /usr/include > > Not too sure what I did originally. Thanks to Ken and Pierre. > > Chris -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page