在OS X上安装GCC 4.7.1 [英] Installing GCC 4.7.1 on OS X

查看:180
本文介绍了在OS X上安装GCC 4.7.1的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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



我已经下载了 GCC 4.7.1,并且将 gcc-4.7.1 文件夹位于〜/ Downloads> / code>中,然后我按照这里给出的指示: 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 
比较阶段2和3
警告:gcc / cc1-checksum.o不同
警告:gcc / cc1obj-checksum .o不同
警告:gc c / cc1plus-checksum.o不同
Bootstrap比较失败!
gcc / intl.o不同
make [2]:*** [比较]错误1
make [1]:*** [stage3-bubble]错误2
make:*** [all] Error 2

然后 make check 给我这个信息

  / bin / sh:line 0:cd:./fixincludes:No such文件或目录
make [1]:*** [check-fixincludes]错误1
make:*** [do-check]错误2

以及 make install 此信息

  / bin / sh /Users/fpiro07/Downloads/gcc-4.7.1/mkinstalldirs / usr / local / usr / local 
/ bin / sh:第0行:cd: ./fixincludes:没有这样的文件或目录
make [1]:*** [install-fixincludes]错误1
make:*** [install]错误2

如何解决这些问题并安装我的 GCC 4.7.1?

解决方案

安装 MacPorts 并运行:

  $ sudo port selfupdate 
$ sudo port install gcc47

它会正确配置和安装gcc(4.7.2写作时间)和所有依赖关系。

I am trying to install GCC 4.7.1 on my Mac because I want to update the LLVM GCC 4.2 given in XCode.

I have downloaded GCC 4.7.1 and I've placed the gcc-4.7.1 folder in ~/Downloads, then I followed the instructions given here: http://gcc.gnu.org/install/ and I wrote

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

and the configuration does show problems.

Then I wrote

make

and it all goes well until I am given this message

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

Then the make check gives me this message

/bin/sh: line 0: cd: ./fixincludes: No such file or directory
make[1]: *** [check-fixincludes] Error 1
make: *** [do-check] Error 2

And the make install this messagge

/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

How can I fix these problems and have my GCC 4.7.1 installed?

解决方案

Install MacPorts and run:

$ sudo port selfupdate
$ sudo port install gcc47

It will take care of correctly configuring and installing gcc (4.7.2 at the time of writing) and all dependencies.

这篇关于在OS X上安装GCC 4.7.1的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆