LFS libstdc 失败 - make: *** 未指定目标且未找到 makefile。停止

LFS libstdc 失败 - make: *** 未指定目标且未找到 makefile。停止

我正在阅读 LFS 的第 5 章。我正在尝试编译 LibSTDC。进入我创建并运行的构建目录后:

../libstdc++-v3/configure \
--host=$LFS_TGT \
--build=$(../config.guess) \
--prefix=/usr \
--disable-multilib \
--disable-nls \
--disable-libstdcxx-pch \
--with-gxx-include-dir=/tools/$LFS_TGT/include/c++/13.2.0

我得到:

checking for unistd.h... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if x86_64-lfs-linux-gnu-gcc supports -fno-rtti -fno-exceptions... no
checking for x86_64-lfs-linux-gnu-gcc option to produce PIC... -fPIC -DPIC
checking if x86_64-lfs-linux-gnu-gcc PIC flag -fPIC -DPIC works... yes
checking if x86_64-lfs-linux-gnu-gcc static flag -static works... yes
checking if x86_64-lfs-linux-gnu-gcc supports -c -o file.o... yes
checking if x86_64-lfs-linux-gnu-gcc supports -c -o file.o... (cached) yes
checking whether the x86_64-lfs-linux-gnu-gcc linker (/mnt/lfs/tools/x86_64-lfs-linux-gnu/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... configure: error: Link tests are not allowed after GCC_NO_EXECUTABLES.

我忽略了这些错误并继续运行“make”

运行 make 后我得到了这个:

make: *** No targets specified and no makefile found.  Stop.

使用 ls,没有 makefile 或其他任何东西。只是一个“config.log”文件。其中有很多行。以下是最后 25 条:

target='x86_64-lfs-linux-gnu'
target_alias='x86_64-lfs-linux-gnu'
target_cpu='x86_64'
target_os='linux-gnu'
target_vendor='lfs'
thread_header=''
tmake_file=''
toplevel_builddir='/mnt/lfs/sources/gcc-13.2.0/build/..'
toplevel_srcdir='/mnt/lfs/sources/gcc-13.2.0/libstdc++-v3/..'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "package-unused"
#define PACKAGE_TARNAME "libstdc++"
#define PACKAGE_VERSION "version-unused"
#define PACKAGE_STRING "package-unused version-unused"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define STDC_HEADERS 1
#define LT_OBJDIR ".libs/"

configure: exit 1

cd 进入上一个目录“gcc-13.2.0”并运行 make 会产生相同的错误。运行“配置”会产生此错误:

configure: error: Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations.  Source code for these libraries can be found at
their respective hosting sites as well as at
https://gcc.gnu.org/pub/gcc/infrastructure/.  See also
http://gcc.gnu.org/install/prerequisites.html for additional info.  If
you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header
files.  They may be located in separate packages.

我是 LFS 用户,$LFS 变量已设置。任何关于这可能是什么的想法都值得赞赏。谢谢你!

相关内容