You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

LFS 7.8编译GCC-5.2.0 Pass1报错求助(Gentoo宿主系统)

LFS 7.8 GCC第一阶段编译错误求助(Gentoo宿主系统)

初次发帖,格式若有疏漏还请见谅。目前正以Gentoo作为宿主系统构建LFS 7.8,但在GCC第一阶段编译时遇到错误,无法解决。

报错日志

configure: loading cache ./config.cache
checking build system type... x86_64-unknown-linux-gnu checking host system type... none-unknown-linux-gnu
checking for a BSD-compatible install... /bin/install -c checking whether build environment is sane... yes
checking for none-unknown-linux-gnu-strip... no
checking for strip... strip
configure: WARNING: using cross tools not prefixed with host triplet checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
[checking whether make sets $(MAKE)... yes
checking whether to enable maintainer-specific portions of Makefiles... no configure: WARNING: the "none" host is obsolete, use --disable-assembly
checking ABI=standard
checking compiler gcc -g -02 ... no, long long reliability test 1
checking for none-unknown-linux-gnu-gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking build system compiler gcc... no
configure: error: Specified CC_FOR_BUILD doesn't seem to work
make[1]: *** [Makefile: 4498: configure-gmp] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-build' make: *** [Makefile: 859: all] Error 2

宿主环境版本检查结果

bash, version 5.2.37(1)-release
/bin/sh -> /usr/bin/bash
Binutils: (Gentoo 2.42 p6) 2.42.0 bison (GNU Bison) 3.8.2
/usr/bin/yacc -> /usr/bin/yacc.bison bzip2, Version 1.0.8, 13-Jul-2019. Coreutils: 9.5
diff (GNU diffutils) 3.10
find (GNU findutils) 4.10.0
GNU Awk 5.3.1, API 4.0
/usr/bin/awk -> /usr/bin/gawk
gcc (Gentoo 14.2.1_p20241116 p3) 14.2.1 20241116
g++ (Gentoo 14.2.1_p20241116 p3) 14.2.1 20241116 (Gentoo 2.40-r5 (patchset 5)) 2.40
grep (GNU grep) 3.11
gzip 1.13
Linux version 6.6.62-gentoo-dist (portage@localhost) (x86_64-pc-linux-gnu-gcc (Gentoo 14.2.1_p20241116 p3) 14.2.1 20241116, GNU ld (Gentoo 2.42 p6) 2.42.0) #1 SMP PREEMPT_DYNAMIC Sun Nov 24 22:37:56 UTC 2024
m4 (GNU M4) 1.4.19
GNU Make 4.4.1
GNU patch 2.7.6
Perl version='5.40.0';
sed (GNU sed) 4.9
Star (GNU tar) 1.35
texi2any (GNU texinfo) 7.1.1
xz (XZ Utils) 5.6.3
g++ compilation OK

本人推测问题可能源于Gentoo系统中宿主依赖包版本较新,除此之外暂无其他思路。已知LFS 7.8版本老旧,若能提供解决方案,将不胜感激!

内容的提问来源于stack exchange,提问作者Any

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.15 19:54:50