<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">Hi Suzuki,<div class=""><br class=""></div><div class="">(Note: to other CMake mailing list readers, this pertains very little to CMake itself.  I’m sending it to the mailing list so that future users with this issue may also have a possible solution).<br class=""><div class=""><br class=""></div><div class="">Getting a newer version of GCC is quite challenging by yourself indeed, but you may be interested in the Spack package manager: <a href="http://spack.readthedocs.io/en/latest/getting_started.html" class="">http://spack.readthedocs.io/en/latest/getting_started.html</a></div><div class=""><br class=""></div><div class="">It’s designed for high performance computing, but has a special emphasis on supporting older distributions (since updating HPC cluster operating systems is the devil).</div><div class=""><br class=""></div><div class="">Some quick tips:</div><div class=""><br class=""></div><div class="">1. Once you start installing things, you <b class="">cannot</b> move the spack directory.  So decide where you want it and clone it there.  For example, I keep all of my installations in /opt/spack</div><div class=""><br class=""></div><div class="">    cd /opt</div><div class="">    sudo git clone <a href="https://github.com/spack/spack.git" class="">https://github.com/spack/spack.git</a></div><div class=""><br class=""></div><div class="">    Assuming you are `user` on this system (echo $USER)</div><div class="">    sudo chown -R user spack/</div><div class=""><br class=""></div><div class="">Then proceed with the getting started tutorial.</div><div class=""><br class=""></div><div class="">2. You have many possible newer versions of GCC available, by default `spack install gcc` installs the newest one.  Run `spack info gcc` to see the versions available.  Suppose you installed gcc@6.4.0 (which will as you know take a while).  You will want to make this available as a compiler, so you `spack load gcc@6.4.0` (it might tell you to source a script, so do that) and run `spack compiler find`.  When `spack compiler list` shows your shiny new GCC compiler, you can now `spack install cmake %gcc@6.4.0` to use GCC 6.4.0 to compile Cmake!  <b class="">Note</b> you don’t need to install GCC 6.4.0, that was purely an example.  I know there have been some issues with really old GCC versions compiling newer versions, but I think we fixed the underlying problem that caused that.  AKA my hope is this works seamlessly, but you may run into trouble.  If you do, you might try installing an older version of GCC (in this example, say 6.4.0 didn’t work, maybe try GCC 5.5.0).</div><div class=""><br class=""></div><div class="">I hope this is helpful for you!  There’s a lot more to spack, but if you get stuck raise an issue on GitHub.  The spack user community is very helpful and friendly to newcomers :)</div><div class=""><br class=""></div><div class="">Good luck!</div><div class=""><br class=""></div><div class="">-Stephen</div><div class=""><br class=""></div></div></body></html>