|
Boost : |
Subject: Re: [boost] GCC versions
From: Roger Leigh (rleigh_at_[hidden])
Date: 2018-05-28 15:31:30
On 27/05/2018 14:54, Ian Emmons via Boost wrote:
> Apologies if this is off topic, but the audience here is perfect for this question:
>
> I need to support CentOS version 7 with my C++ software. The version of GCC that is supported out-of-the-box on that version of Linux is rather old -- it supports C++11, but not C++14, and of course I would like to use a newer standard.
>
> Is it common practice on Linux to install a later version of GCC than the out-of-the-box on version? If so, how do you handle the run-time shared library dependencies? Any pointers would be helpful.
Replying off-list since it was deemed off-topic.
Install "devtoolset-7" from software collections
(https://www.softwarecollections.org/en/scls/rhscl/devtoolset-7/)
Enable it with e.g. ". /opt/rh/devtoolset-7/enable" and you have a new
gcc/g++ etc. on your PATH.
Then build a current Boost with it. Devtoolset uses static linking of
libstdc++ so it will continue to be ABI compatible with the base system
and its libstdc++ but will include new bits from the static copy. Avoid
trouble by using system copies of libraries rather than building a
second copy.
I would suggest searching for and reading around existing discussion of
devtoolset-7 (and the older devtoolset-4) to get some ideas about the
tradeoffs it makes. It will get you an up to date C++14 compiler.
Regards,
Roger
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk