[SERVER-55663] Document upper bounds on supported compiler versions Created: 31/Mar/21  Updated: 27/Oct/23  Resolved: 01/Apr/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Oleg Pudeyev (Inactive) Assignee: [DO NOT ASSIGN] Backlog - Server Development Platform Team (SDP) (Inactive)
Resolution: Works as Designed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-49429 3.0 server does not build Closed
related to SERVER-55395 4.0.23 does not build with gcc 10 Closed
Assigned Teams:
Server Development Platform
Participants:

 Description   

The server building documentation currently gives lower bounds on supported compiler versions, but not upper bounds. For example, https://github.com/mongodb/mongo/blob/master/docs/building.md presently says:

A modern C++ compiler capable of compiling C++17. One of the following is required:

GCC 8.2 or newer
Clang 7.0 (or Apple XCode 10.2 Clang) or newer
Visual Studio 2019 version 16.4 or newer (See Windows section below for details)

As a server version ages, it ceases to be buildable with modern compilers (for example, the version of GCC provided by default by Debian testing). This came up for 3.0 in SERVER-49429 with GCC 9 and for 4.0 in SERVER-55395 with GCC 10.

Neither 4.0 nor 3.2 branches (to take two arbitrary examples) currently specify an upper limit on acceptable/supported compilers (https://github.com/mongodb/mongo/blob/r4.0.23/docs/building.md, https://github.com/mongodb/mongo/blob/r3.2.22/docs/building.md).

As a user of the server I would like to know which compilers are known to work with particular server versions. For example, I can trivially install GCC 9 presently. If GCC 9 is supported (and tested) for building 4.0 server, I would simply build 4.0 with GCC 9. However the documentation does not appear to indicate that GCC 9 is in any different position from GCC 10 (or 8).



 Comments   
Comment by Oleg Pudeyev (Inactive) [ 31/Mar/21 ]

I did not realize that. I had the most difficulty installing gcc versions older than 8 in SERVER-49429, hence I assumed that server was tested on something more recent than gcc 5. If indeed server is only built with gcc 5 I suppose I would change the ask in this ticket to add a note similar to the following to the building instructions:

The server is only tested to build with the minimum required compiler versions (e.g., GCC 5.4.0 and clang x.y.z).

I assumed that, since server provides builds for various OSes, that it was built by the system compiler for each (or at least most) of the respective OSes, so that for example each ubuntu build was most likely done by a different version of GCC.

Comment by Andrew Morrow (Inactive) [ 31/Mar/21 ]

oleg.pudeyev - The only compilers for which the server is known to build are the ones we build and test with. We don't build and test with newer compilers. Even if we did hand test and find that it worked with e.g. GCC 9 today, that could cease to be true at any time as new commits are made. We document the minimum because that is the only thing we can honestly attest to.

Comment by Oleg Pudeyev (Inactive) [ 31/Mar/21 ]

acm I'm having a bit of trouble understanding your comment. This ticket asks for information on which compilers the server is known to build. It doesn't ask for the status of each compiler that exists today or will in the future, nor does it ask for expanding the test configurations. Perhaps I phrased it poorly?

Comment by Andrew Morrow (Inactive) [ 31/Mar/21 ]

Even if we documented the state as of today (per-branch?), there is no way to ensure that it wouldn't change/regress on any given commit without having testing for those newer compiler versions. I don't see this as something we can effectively achieve.

Generated at Thu Feb 08 05:37:06 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.