gcc 源码 编译错误

onfigure: error: source directory already configured; run "make distclean" there first
Makefile:5449: recipe for target 'configure-stage1-gmp' failed
make[2]: *** [configure-stage1-gmp] Error 1
make[2]: 离开目录“/home/nuc/gcc-10-20200301”
Makefile:27875: recipe for target 'stage1-bubble' failed
make[1]: *** [stage1-bubble] Error 2
make[1]: 离开目录“/home/nuc/gcc-10-20200301”
Makefile:1004: recipe for target 'all' failed
make: *** [all] Error 2

 

需要

./contrib/download_prerequisites
gmp-6.1.0.tar.bz2: 成功
mpfr-3.1.4.tar.bz2: 成功
mpc-1.0.3.tar.gz: 成功
isl-0.18.tar.bz2: 成功


四个不带--prefix安装就是./configure make make install
然后编译 gcc

mkdir build
cd build

sudo ../configure --disable-multilib --prefix=/home/nuc/gcc

你可能感兴趣的:(c++)