0

When i fellow the command of the lfs book 12.1 i chapter 5 to compile gcc 13.2.0 , i got the error.

Supported LTO compression algorithms: zlib gcc version 13.2.0 (GCC) configure:3560: $? = 0 configure:3549: /mnt/lfs/sources/gcc-13.2.0/build/./gcc/xgcc -B/mnt/lfs/sources/gcc-13.2.0/build/./gcc/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib/ -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/include -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/sys-include -V >&5 xgcc: error: unrecognized command-line option '-V' xgcc: fatal error: no input files compilation terminated. configure:3560: $? = 1 configure:3549: /mnt/lfs/sources/gcc-13.2.0/build/./gcc/xgcc -B/mnt/lfs/sources/gcc-13.2.0/build/./gcc/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib/ -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/include -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/sys-include -qversion >&5 xgcc: error: unrecognized command-line option '-qversion'; did you mean '--version'? xgcc: fatal error: no input files compilation terminated. configure:3560: $? = 1 configure:3576: /mnt/lfs/sources/gcc-13.2.0/build/./gcc/xgcc -B/mnt/lfs/sources/gcc-13.2.0/build/./gcc/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib/ -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/include -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/sys-include -o conftest -g -O2 conftest.c >&5 In file included from conftest.c:9: /usr/include/stdio.h:27:10: fatal error: bits/libc-header-start.h: No such file or directory 27 | #include <bits/libc-header-start.h> | ^~~~~~~~~~~~~~~~~~~~~~~~~~ compilation terminated. configure:3579: $? = 1 configure:3792: checking for suffix of object files configure:3814: /mnt/lfs/sources/gcc-13.2.0/build/./gcc/xgcc -B/mnt/lfs/sources/gcc-13.2.0/build/./gcc/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ -B/mnt/lfs/tools/x86_64-lfs-linux-gnu/lib/ -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/include -isystem /mnt/lfs/tools/x86_64-lfs-linux-gnu/sys-include -c -g -O2 conftest.c >&5 /mnt/lfs/sources/gcc-13.2.0/build/./gcc/as: 114: exec: --64: not found configure:3818: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "GNU C Runtime Library" | #define PACKAGE_TARNAME "libgcc" | #define PACKAGE_VERSION "1.0" | #define PACKAGE_STRING "GNU C Runtime Library 1.0" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "http://www.gnu.org/software/libgcc/" | /* end confdefs.h. */ | | int | main () | { | | ; | return 0; | } configure:3832: error: in `/mnt/lfs/sources/gcc-13.2.0/build/x86_64-lfs-linux-gnu/libgcc': configure:3834: error: cannot compute suffix of object files: cannot compile See `config.log' for more details 

the configure options is below as the book recommend.

../configure --target=$LFS_TGT --prefix=$LFS/tools --with-glibc-version=2.39 --with-sysroot=$LFS --with-newlib --without-headers --enable-default-pie --enable-default-ssp --disable-nls --disable-shared --disable-multilib --disable-threads --disable-libgomp --disable-libquadmath --disable-libssp --disable-libvtv --disable-libstdcxx --enable-languages=c,c++ 

my host information is Debian 12 and the gcc version of host is 12.

#uname -r Linux debian-ms 6.1.0-22-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.94-1 (2024-06-21) x86_64 GNU/Linux #gcc -v Using built-in specs. COLLECT_GCC=gcc COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/12/lto-wrapper OFFLOAD_TARGET_NAMES=nvptx-none:amdgcn-amdhsa OFFLOAD_TARGET_DEFAULT=1 Target: x86_64-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Debian 12.2.0-14' --with-bugurl=file:///usr/share/doc/gcc-12/README.Bugs --enable-languages=c,ada,c++,go,d,fortran,objc,obj-c++,m2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-12 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --enable-libphobos-checking=release --with-target-system-zlib=auto --enable-objc-gc=auto --enable-multiarch --disable-werror --enable-cet --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-nvptx/usr,amdgcn-amdhsa=/build/gcc-12-bTRWOB/gcc-12-12.2.0/debian/tmp-gcn/usr --enable-offload-defaulted --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu Thread model: posix Supported LTO compression algorithms: zlib zstd gcc version 12.2.0 (Debian 12.2.0-14) 

And i also link the /usr/include of lfs root path to the host system /usr/include , and i could find the missing file in /usr/include/ of lfs root path.

Is there is something need to be set? Thanks for help.

2
  • And i also link the /usr/include of lfs root path to the host system /usr/include , and i could find the missing file in /usr/include/ of lfs root path. I'm not sure that's how you compile LFS. Commented Jul 14, 2024 at 8:04
  • i have compiled before , the logs shows can not find stduio.sh . so i exec the command ' ln -sv $LFS/usr/include /usr/include ' , then i try again . the error message change to the descrption. Commented Jul 14, 2024 at 11:49

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.