Hi Suzuki,

(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).

Getting a newer version of GCC is quite challenging by yourself indeed, but you 
may be interested in the Spack package manager: 
http://spack.readthedocs.io/en/latest/getting_started.html 
<http://spack.readthedocs.io/en/latest/getting_started.html>

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).

Some quick tips:

1. Once you start installing things, you cannot 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

    cd /opt
    sudo git clone https://github.com/spack/spack.git

    Assuming you are `user` on this system (echo $USER)
    sudo chown -R user spack/

Then proceed with the getting started tutorial.

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! 
 Note 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).

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 :)

Good luck!

-Stephen

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
https://cmake.org/mailman/listinfo/cmake

Reply via email to