On Sun, Aug 30, 2020 at 10:04:59PM +0200, Pierre Labastie via blfs-support wrote: > On Sat, 2020-08-29 at 20:20 -0400, Chris Gorman via blfs-support wrote: > > 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. > > Thanks a lot for the investigation and the finding. You are not the > first to run instructions for $XORG_PREFIX != /usr while setting > XORG_PREFIX=/usr... This generates several hard to debug failures. I > think we should explicitly have an if...fi pair around those > instructions (that would help jhalfs too :). > > Pierre > Belated follow-up on this, after I too jsut got bitten by it. I see that Bruce preferred to put a big Warning in setting up the environment, but it definitely adds to the overhead of things to fix. I suppose that next time I'll remember this (assuming, for the moment, that there _is_ a next time - I'm not yet certain if using jhalfs in chroot is going to work for what I want to do).
And a big Thank You to Chris for finding out what was causing this. When I saw the cmath error I thought 'seen that somewhere' ĸen -- To say that it (his hair) was black and bound up in a ponytail is to miss the opportunity of using the term 'elephantine'. It was hair with personality. -- The Thief Of Time (about the monk, Sato). -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
