构建GCC 4.8.2时出现问题:找不到-lmpc

构建GCC 4.8.2时出现问题:找不到-lmpc,gcc,ld,configure,mpc,Gcc,Ld,Configure,Mpc,当我试图将GCC4.8.0作为更大系统的一部分编译到自定义目录中时。我在这个服务器上没有sudo权限,因此我从源代码构建所有内容。但是,我无法使依赖项gmp、mpfr和mpc正常工作。运行configure时,它会为我提供: configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+. Try the --with-gmp, --with-mpfr and/or --with-mpc options t

当我试图将GCC4.8.0作为更大系统的一部分编译到自定义目录中时。我在这个服务器上没有sudo权限,因此我从源代码构建所有内容。但是,我无法使依赖项gmp、mpfr和mpc正常工作。运行configure时,它会为我提供:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
configure:5619: checking for the correct version of the gmp/mpfr/mpc libraries
configure:5650: gcc -o conftest -g -O2 -Wno-error=unused-value -I$SRC/gmp/ -I$SRC/mpc/src/.libs -lmpc -lmpfr -lgmp >&5
/usr/bin/ld: cannot find -lmpc
collect2: ld returned 1 exit status
config.log给了我:

configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.
configure:5619: checking for the correct version of the gmp/mpfr/mpc libraries
configure:5650: gcc -o conftest -g -O2 -Wno-error=unused-value -I$SRC/gmp/ -I$SRC/mpc/src/.libs -lmpc -lmpfr -lgmp >&5
/usr/bin/ld: cannot find -lmpc
collect2: ld returned 1 exit status
因此,我尝试获取mpfr、gmp和mpc,并从源代码手动构建它,因为我无权在系统本身上安装。我运行了./contrib/download\u先决条件以获取库。我再次运行configure,它给了我相同的错误。因此,我也编译了它们,并在我的gcc目录中:

cd mpfr; ./configure; make
cd ../gmp; ./configure; make
cd ../mpc; ./configure --with-mpfr-include=$SRC/mpfr --with-mpfr-lib=$SRC/mpfr/.libs/ --with-gmp=$SRC/gmp; make; cd ..
请注意,由于某些原因,仅使用--with mpfr不起作用

cd $SRC/build
  ../configure \
    --build=x86_64-linux-gnu \
    CC=gcc \
    CFLAGS='-g -O2 -Wno-error=unused-value' \
    --disable-bootstrap --enable-checking=none \
    --disable-multi-arch --disable-multilib \
    --enable-languages=c,c++ \
    --with-gmp-lib=$SRC/gmp/.libs \
    --with-gmp-include=$SRC/gmp/ \
    --with-mpc-include=$SRC/mpc/src \
    --with-mpc=$SRC/mpc \
    --with-mpfr-lib=$SRC/mpfr/.libs \
    --with-mpfr-include=$SRC/mpfr \
    --prefix=$SRC/prefix
其中$SRC是我的gcc目录。但是,在最后一个命令中,它在build/config.log中给了我以下错误:

gcc -o conftest -g -O2 -Wno-error=unused-value -I$SRC/gmp/ -I$SRC/mpfr -I$SRC/mpc/src    conftest.c  -L$SRC/gmp/.libs -L$SRC/mpfr/.libs -L$SRC/mpc/lib -lmpc -lmpfr -lgmp >&5
/usr/bin/ld: cannot find -lmpc
collect2: ld returned 1 exit status
很明显,在运行makempc之后,它没有lib目录或任何包含共享对象文件的内容。因此,我不知道如何将gcc与mpc库链接

有人知道我该怎么做吗