【发布时间】:2018-02-05 10:28:36
【问题描述】:
我在从头开始为 Linux 编译 GCC pass 2 时遇到此错误。
configure: summary of build options:
Version: GNU MP 6.1.2
Host type: none-pc-linux-gnu
ABI: standard
Install prefix: /tools
Compiler: x86_64-lfs-linux-gnu-gcc
Static libraries: yes
Shared libraries: no
make[1]: Leaving directory '/mnt/lfs/sources/gcc-7.2.0/build'
Makefile:900: recipe for target 'all' failed
make: *** [all] Error 2
当我再次制作(只是再次输入 make)而不更改或重新配置任何内容时,我得到了不同的错误。
configure: error: libmpfr not found or uses a different ABI (including static vs shared).
Makefile:5232: recipe for target 'configure-mpc' failed
make[1]: *** [configure-mpc] Error 1
make[1]: Leaving directory '/mnt/lfs/sources/gcc-7.2.0/build'
Makefile:900: recipe for target 'all' failed
make: *** [all] Error 2
我正在关注this 指南。配置是:
CC=$LFS_TGT-gcc \
CXX=$LFS_TGT-g++ \
AR=$LFS_TGT-ar \
RANLIB=$LFS_TGT-ranlib \
../configure \
--prefix=/tools \
--with-local-prefix=/tools \
--with-native-system-header-dir=/tools/include \
--enable-languages=c,c++ \
--disable-libstdcxx-pch \
--disable-multilib \
--disable-bootstrap \
--disable-libgomp
使用以下版本的mpfr、gmp、mpc
mpfr-4.0.0
gmp-6.1.2
mpc-1.1.0
【问题讨论】:
-
编译器的错误是什么?这份报告还不够。在您制作时捕获您的
stderr和stdout,并在那里查找错误。 -
当我再次制作而不更改或重新配置任何东西时,我得到了不同的错误。
-
之前尝试
make clean和make clean all。如果失败,请下载到一个干净的目录中,然后在那里尝试。 -
我错过了新错误 - 这是我们可以解决的问题。 stackoverflow.com/questions/25831680/… 有帮助吗?
-
另一个问题。你跑
./configure了吗?