gpt4 book ai didi

macos - 在 OS X 上安装 GCC 4.7.1

转载 作者:行者123 更新时间:2023-12-04 11:26:59 31 4
gpt4 key购买 nike

我正在尝试安装 GCC 4.7.1 在我的 Mac 上,因为我想更新 LLVM GCC 4.2 在 XCode 中给出。

我已下载 GCC 4.7.1 我已经放置了 gcc-4.7.1 ~/Downloads 中的文件夹,然后我按照此处给出的说明进行操作:http://gcc.gnu.org/install/我写了

cd ~/Desktop
mkdir objdir
cd objdir
~/Downloads/gcc-4.7.1/configure --with-gmp=/usr/local/include --with-mpfr=/usr/local/include --with-mpc=/usr/local/include

并且配置确实显示了问题。

然后我写了
make

一切都很顺利,直到我收到这条消息
rm -f stage_current
Comparing stages 2 and 3
warning: gcc/cc1-checksum.o differs
warning: gcc/cc1obj-checksum.o differs
warning: gcc/cc1plus-checksum.o differs
Bootstrap comparison failure!
gcc/intl.o differs
make[2]: *** [compare] Error 1
make[1]: *** [stage3-bubble] Error 2
make: *** [all] Error 2

然后是 make check给我这个消息
/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [check-fixincludes] Error 1
make: *** [do-check] Error 2

make install这条消息
/bin/sh /Users/fpiro07/Downloads/gcc-4.7.1/mkinstalldirs /usr/local /usr/local
/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [install-fixincludes] Error 1
make: *** [install] Error 2

我该如何解决这些问题并拥有我的 GCC 4.7.1 安装了吗?

最佳答案

安装 MacPorts并运行:

$ sudo port selfupdate
$ sudo port install gcc47

它将负责正确配置和安装 gcc(撰写本文时为 4.7.2)和所有依赖项。

关于macos - 在 OS X 上安装 GCC 4.7.1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14153725/

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