GCC versions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GCC versions

Boost - Dev mailing list
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.

Thanks,

Ian

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: GCC versions

Boost - Dev mailing list
On 05/27/18 17: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.

This is an offtopic discussion. This mailing list is about Boost
libraries development. You should probably try asking on StackOverflow.

To answer your question though, I wouldn't say it is common but it is
possible. If you can't find pre-built packages for your system, you can
always build the compiler yourself from sources. The usual caveats
include ensuring that the default compiler stays the same as the
original version shipped with the OS. This may be needed e.g. for DKMS.

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
Reply | Threaded
Open this post in threaded view
|

Re: GCC versions

Boost - Dev mailing list
In reply to this post by Boost - Dev mailing list
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

_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost