gpt4 book ai didi

c++ - 如何在 CentOS 6 x64 上构建 gcc 4.7.2

转载 作者:IT王子 更新时间:2023-10-29 01:10:10 26 4
gpt4 key购买 nike

我正在尝试在 CentOS 上构建最新的(在撰写本文时)GCC 版本。我下载并构建了 GMP、MPFR 和 MPC。这些库位于/usr/local 下(即库的 usr/local/lib 和包含的/usr/local/include)。现在我正在尝试配置 GCC 以使用以下命令进行构建:

./configure --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local

我收到以下错误消息:

checking for the correct version of gmp.h... yes
checking for the correct version of mpfr.h... yes
checking for the correct version of mpc.h... yes
checking for the correct version of the gmp/mpfr/mpc libraries... no
configure: error: Building GCC requires GMP 4.2+, MPFR 2.3.1+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify their locations.

可能是什么原因?库已构建,位置正确,头文件已识别,但库本身不是。我也试过这个:

./configure --with-gmp-lib=/usr/local/lib \
--with-mpfr-lib=/usr/local/lib --with-mpc-lib=/usr/local/lib

但结果是一样的。

最佳答案

强烈推荐使用 GCC SRC (http://www.gnu.org/software/gsrc/)

您需要先安装 Python 和 bzr。

然后在配置之后(gsrc 网页中的步骤),只需在 gsrc 目录中执行这些操作

制作-C gnu/gcc
make -C gnu/gcc 安装

关于c++ - 如何在 CentOS 6 x64 上构建 gcc 4.7.2,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12590096/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com