[SERVER-27956] Build successfully under G++ 6.2 Created: 09/Feb/17  Updated: 05/Apr/17  Resolved: 28/Feb/17

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: 3.5.2
Fix Version/s: 3.5.4

Type: Bug Priority: Minor - P4
Reporter: Nathan Myers Assignee: Mathias Stearn
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Related
related to SERVER-27881 Upgrade to boost >= 1.63 Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4, v3.2
Steps To Reproduce:

Build.

Participants:

 Description   

Gcc 6 has substantially better error messages than Gcc 5, and lots of other improvements. The only impediment is that builds fail warning about dicey memory management code.



 Comments   
Comment by Githook User [ 28/Feb/17 ]

Author:

{u'username': u'RedBeard0531', u'name': u'Mathias Stearn', u'email': u'mathias@10gen.com'}

Message: SERVER-27956 fix gcc6 compile warning

This is a more minimal version of
https://github.com/boostorg/function/commit/bde64bf9ebe7a05e7c56505ea33133bde0ccbad0
and
https://github.com/boostorg/function/commit/54988e8e91ac0272f9364ae1818f519621b18317
that will tide us over until we can upgrade to a newer version of boost.
Branch: master
https://github.com/mongodb/mongo/commit/87835611622ec35171506f254bfb24a560c8b741

Comment by Nathan Myers [ 09/Feb/17 ]

Yes, fixing the cause of the warnings is the aim of this ticket.

Comment by Andrew Morrow (Inactive) [ 09/Feb/17 ]

In that case, you can probably stop the escalation of warnings to errors by using the --disable-warnings-as-errors flag to SCons. Of course, if the warnings are legit, we should fix the underlying issues.

Comment by Nathan Myers [ 09/Feb/17 ]

I will just note here that this ticket is not about moving to Gcc 6 as the default development or delivery platform, but just for the system to be able to build under that compiler.

Comment by Andrew Morrow (Inactive) [ 09/Feb/17 ]

Most likely this will happen for 3.8.

Our typical flow here is as follows:

  • We upgrade the compiler in X.odd development release, retaining the same target language standard, that we have been using (e.g. C++11).
  • If the upgraded compiler supports a new language standard, we add a non-ship canary build targeting that standard to X.odd.
  • We then ship X.odd+1 (our stable release), with that compiler.
  • In X.odd+2 (our next development release), if we have a new target language standard, we make that the default/required.
  • If we are satisfied with the functionality of the compiler with the new language standard in X.odd+2, we backport the ability to use that language standard into X.odd+1, to facilitate backports.

Basically, any one rev of the toolchain is used for two stable releases. We just upgraded the compiler to GCC 5 in MongoDB 3.4 development. So, by the current roadmap, we should ship 3.6 with GCC 5 as well, and then upgrade to GCC whatever (probably 7), during development for MongoDB 3.8.

The TL;DR is that we are in the middle of the lifecycle for the current toolchain build, and we are not likely to move to a newer toolchain for, most likely, about a year.

Generated at Thu Feb 08 04:16:43 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.