On Mon, Mar 23, 2020 at 10:14 AM Pierre Labastie <[email protected]> wrote:
> Le 23/03/2020 à 14:35, Jason Gauthier a écrit : > > Greetings, > > > > I'll provide some background first. > > > > Book version: SVN-20200319 > > Host: Debian Buster > > version checker output: > > ./version-check.sh > > bash, version 5.0.3(1)-release > > /bin/sh -> /bin/bash > > Binutils: (GNU Binutils for Debian) 2.31.1 > > bison (GNU Bison) 3.3.2 > > /usr/bin/yacc -> /usr/bin/bison.yacc > > bzip2, Version 1.0.6, 6-Sept-2010. > > Coreutils: 8.30 > > diff (GNU diffutils) 3.7 > > find (GNU findutils) 4.6.0.225-235f > > GNU Awk 4.2.1, API: 2.0 (GNU MPFR 4.0.2, GNU MP 6.1.2) > > /usr/bin/awk -> /usr/bin/gawk > > gcc (Debian 8.3.0-6) 8.3.0 > > g++ (Debian 8.3.0-6) 8.3.0 > > (Debian GLIBC 2.28-10) 2.28 > > grep (GNU grep) 3.3 > > gzip 1.9 > > Linux version 4.19.0-5-amd64 ([email protected] > > <mailto:[email protected]>) (gcc version 8.3.0 (Debian > 8.3.0-6)) > > #1 SMP Debian 4.19.37-5+deb10u1 (2019-07-19) > > m4 (GNU M4) 1.4.18 > > GNU Make 4.2.1 > > GNU patch 2.7.6 > > Perl version='5.28.1'; > > Python 3.7.3 > > sed (GNU sed) 4.7 > > tar (GNU tar) 1.30 > > texi2any (GNU texinfo) 6.5 > > xz (XZ Utils) 5.2.4 > > g++ compilation OK > > > > Issue: > > Compiling ncurses-6.2 results in this error message: > > ../c++/etip.h:342:15: fatal error: iostream.h: No such file or directory > > 342 | # include <iostream.h> > > > > I checked config.log and found this: > > configure:23468: checking for iostream > > configure:23478: /usr/bin/g++ -E -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=600 > > -DNDEBUG conftest.cc > > In file included from /usr/include/c++/9.2.0/ext/string_conversions.h:41, > > from /usr/include/c++/9.2.0/bits/basic_string.h:6493, > > from /usr/include/c++/9.2.0/string:55, > > from /usr/include/c++/9.2.0/bits/locale_classes.h:40, > > from /usr/include/c++/9.2.0/bits/ios_base.h:41, > > from /usr/include/c++/9.2.0/ios:42, > > from /usr/include/c++/9.2.0/ostream:38, > > from /usr/include/c++/9.2.0/iostream:39, > > from configure:23475: > > /usr/include/c++/9.2.0/cstdlib:75:15: fatal error: stdlib.h: No such > file or > > directory > > 75 | #include_next <stdlib.h> > > | ^~~~~~~~~~ > > compilation terminated. > > > > So, i thought something must be wrong with my gcc build. > > I have not deviated from the book. However, I made one mistake. > > In chapter 6.10 "Adjusting the toolchain" I did not do this: > > gcc -dumpspecs | sed -e 's@/tools@@g' \ > > -e '/\*startfile_prefix_spec:/{n;s@.*@/usr/lib/ @}' \ > > -e '/\*cpp:/{n;s@$@ -isystem /usr/include@}' > \ > > `dirname $(gcc --print-libgcc-file-name)`/specs > > > > I caught this after GCC was built because > > "readelf -l a.out | grep ': /lib' > > Did not return [Requesting program interpreter: > /lib64/ld-linux-x86-64.so.2] > > Upon exploration it returned /tools/ld-linux-x86-64.so.2 > > > > I went back and fixed that and then moved forward. > > > > Okay, so, thinking something was wrong with my GCC build, I decided to > rebuild it. > > Unfortunately, now I cannot. So I feel like I am stuck! > > /usr/include/c++/9.2.0/cstdlib:75:15: fatal error: stdlib.h: No such > file or > > directory > > 75 | #include_next <stdlib.h> > > | ^~~~~~~~~~ > > > > Thank you for the help! > > > > Problem is that you have changed the specs of /usr/bin/gcc (which you have > installed), while you needed to change those of /tools/bin/gcc > (/usr/bin/gcc > does not exist when doing "Adjusting the toolchain"). So basically, you've > done nothing. And you are still using /usr/bin/gcc, which is broken. > > Also, since you had not done the soecs change in time, everything compiled > after "Adjusting the toolchain" may be flawed. > > If you have backed up the /tools directory when instructed to do so, you > may > want to remove everything in /mnt/lfs, then reinstall the saved /tools, and > then restart chapter 6. > > Otherwise, I think you should erase everything and start over (don't > forget to > back up /tools this time... Also double check that all the sanity check are > exactly as in the book). > > Thank you for your advice!
-- http://lists.linuxfromscratch.org/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page Do not top post on this list. A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing in e-mail? http://en.wikipedia.org/wiki/Posting_style
