title: how to install gcc@7 on macos 10.13?
body: <p>I use homebrew to install gcc on macOS 10.13 high sierra and I have the following error message:</p>
  
  <pre><code>-&gt; brew install gcc
  
  ==&gt; Using the sandbox
  
  ==&gt; 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
  
  ==&gt; 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
  
  ==&gt; Patching
  
  ==&gt; Applying 6.1.0-jit.patch
  patching file gcc/jit/Make-lang.in
  
  ==&gt; ../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
  
  ==&gt; 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.
  </code></pre>