如何在macos 10.13上安装gcc @ 7?

时间:2017-07-02 16:22:00

标签: macos gcc homebrew macos-high-sierra

我使用自制软件在macOS 10.13 high sierra上安装gcc,我有以下错误消息:

-> brew install gcc

==> Using the sandbox

==> Downloading http_s://ftp.gnu.org/gnu/gcc/gcc-7.1.0/gcc-7.1.0.tar.bz2
Already downloaded: /Users/xxxx/Library/Caches/Homebrew/gcc-7.1.0.tar.bz2

==> Downloading http_s://raw.githubusercontent.com/Homebrew/formula-patches/e9e0ee09389a54cc4c8fe1c24ebca3cd765ed0ba/gcc/6.1.0-jit.patch
Already downloaded: /Users/xxxx/Library/Caches/Homebrew/gcc--patch-863957f90a934ee8f89707980473769cff47ca0663c3906992da6afb242fb220.patch

==> Patching

==> Applying 6.1.0-jit.patch
patching file gcc/jit/Make-lang.in

==> ../configure --build=x86_64-apple-darwin17.0.0 --prefix=/usr/local/Cellar/gcc/7.1.0 --libdir=/usr/local/Cellar/gcc/7.1.0/lib/gcc/7 --e

==> make
 Last 15 lines from /Users/xxxx/Library/Logs/Homebrew/gcc/02.make:
/private/tmp/gcc-20170702-1460-1xbd0ht/gcc-7.1.0/build/x86_64-apple-darwin17.0.0/i386/libstdc++-v3/include/bits/stl_algobase.h:66:10: fatal error: bits/stl_iterator_base_funcs.h: No such file or directory

 #include 〈bits/stl_iterator_base_funcs.h〉

           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

compilation terminated.

make[9]: *** [x86_64-apple-darwin17.0.0/bits/stdc++.h.gch/O2ggnu++0x.gch] Error 1

make[9]: *** Waiting for unfinished jobs....

make[8]: *** [all-recursive] Error 1

make[7]: *** [all] Error 2

make[6]: *** [multi-do] Error 1

make[5]: *** [all-multi] Error 2

make[4]: *** [all-recursive] Error 1

make[3]: *** [all] Error 2

make[2]: *** [all-stage3-target-libstdc++-v3] Error 2

make[1]: *** [stage3-bubble] Error 2

make: *** [all] Error 2


Do not report this issue to Homebrew/brew or Homebrew/core!

These open issues may also help:
gcc@4.6 formula seg faults on sierra http_s://github.com/Homebrew/homebrew-core/issues/15127

gcc: Hack version_suffix to fix --HEAD builds http_s://github.com/Homebrew/homebrew-core/pull/7642

gcc (7.1.0) does not automatically link libatomic with C11 code http_s://github.com/Homebrew/homebrew-core/issues/14633

Error: You are using macOS 10.13.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

Error: You are using macOS 10.13.
We do not provide support for this pre-release version.
You may encounter build failures or other breakages.
Please create pull-requests instead of filing issues.

1 个答案:

答案 0 :(得分:4)

“你可以酿造安装--force-bottle foo用于任何你在建造时遇到的麻烦,它应该倒入Sierra瓶子。”,ilovezfs

  

https://github.com/Homebrew/homebrew-core/issues/14418