Le 01/12/2019 à 13:06, Henk Boswijk a écrit :
> I am following LFS-systemd Book 9.0. When compiling Gcc Pass 2 I get the
> following fatal error:
> 
> make[2]: Entering directory
> '/mnt/lfs/sources/gcc-9.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
> x86_64-lfs-linux-gnu-g++  -I../../../libcpp -I. -I../../../libcpp/../include
> -I../../../libcpp/include  -g -O2 -W -Wall -Wno-narrowing -Wwrite-strings
> -Wmissing-format-attribute -pedantic -Wno-long-long  -fno-exceptions -fno-rtti
> -I../../../libcpp -I. -I../../../libcpp/../include -I../../../libcpp/include  
> -c -o charset.o -MT charset.o -MMD -MP -MF .deps/charset.Tpo
> ../../../libcpp/charset.c
> In file included from ../../../libcpp/charset.c:21:
> ../../../libcpp/system.h:41:10: fatal error: new: No such file or directory
>    41 | #include <new>
>       |          ^~~~~
> compilation terminated.
> make[2]: *** [Makefile:224: charset.o] Error 1
> make[2]: Leaving directory
> '/mnt/lfs/sources/gcc-9.2.0/build/build-x86_64-pc-linux-gnu/libcpp'
> make[1]: *** [Makefile:2808: all-build-libcpp] Error 2
> make[1]: Leaving directory '/mnt/lfs/sources/gcc-9.2.0/build'
> make: *** [Makefile:961: all] Error 2
> 
> As far as I know I have not been deviating from the instructions in the book.
> Can anyone point me to a solution?
> Thanks in advance.

Looks like something went wrong while compiling libstdc++. the file "new"
should be installed in /tools/x86_64-lfs-linux-gnu/include/c++/9.2.0/

To check, first try:
find /tools -name new # should answer the above

If it is found, check that /tools/bin/x86_64-lfs-linux-gnu-g++ is able to find 
it:

echo 'int main () { }' | /tools/bin/x86_64-lfs-linux-gnu-g++ --verbose -xc++

and check the lines beginning at "#include <...> search starts here" in the
output. There should be a line like
/mnt/lfs/tools/bin/../lib/gcc/x86_64-lfs-linux-gnu/9.2.0/../../../../x86_64-lfs-linux-gnu/include/c++/9.2.0
If it is not there, something went wrong while compiling gcc-pass1. I guess
the best is to start over.

If it is not found, try rebuilding libstdc++, and try again the commands
above. If everything is OK, rebuild binutils pass2, then gcc pass 2.

But before that, check that the environment of user lfs is correctly set.

HTH
Pierre
-- 
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

Reply via email to