[SERVER-51084] MongoDB fails to compile on Mac with XCode 12.0 Created: 22/Sep/20 Updated: 29/Oct/23 Resolved: 25/Sep/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | None |
| Fix Version/s: | 4.8.0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Kaloian Manassiev | Assignee: | Billy Donahue |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||
| Operating System: | ALL | ||||||||||||||||
| Sprint: | Service arch 2020-10-05 | ||||||||||||||||
| Participants: | |||||||||||||||||
| Description |
|
My Mac force-updated its XCode to 12.0 and with the Clang which comes with that version, MongoDB fails to compile with the following error:
This is the clang versions that I have now:
|
| Comments |
| Comment by Andrew Morrow (Inactive) [ 05/Jan/21 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
ryan.egesdahl - I added my thoughts on | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ryan Egesdahl (Inactive) [ 04/Jan/21 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
acm I think what we settled on was wanting to be able to add specific no-error flags to the build like this:
The idea was that we could exclude specific warnings from being marked as errors until we could fix them but not affect anything else that might pop up. The ordering of -Wall in the arguments wasn't as much of a problem as being able to turn off specific warnings-as-errors, which weren't being added in the right place by CFLAGS/CXXFLAGS. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Andrew Morrow (Inactive) [ 04/Jan/21 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
ryan.egesdahl - The warning flag ordering issue is a longstanding nuisance. We had a (not very detailed) ticket for that work, once: | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 01/Oct/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 01/Oct/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Everything except the rounding errors is thought-free and obvious. Doing those first. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 30/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
First commit was only to fix a basic scons invocation. Next up is what it would take to fix remaining issues with a more full scons invocation. buildscripts/scons.py --ssl --variables-files=etc/scons/xcode_macosx.vars --libc++ --detect-odr-violations --dbg=on --opt=off --ninja --build-tools=next VARIANT_DIR=ninja generate-ninja https://mongodbcr.appspot.com/663460026/ But we have to deal with what looks like a true positive warning about implicit int64->double conversions. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Githook User [ 25/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
Author: {'name': 'Billy Donahue', 'email': 'billy.donahue@mongodb.com', 'username': 'BillyDonahue'}Message: | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 24/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Billy Donahue [ 24/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
This is now personally screwing me up. I'm gong to just try to sweep the codebase and add & to loop variables to fix it. | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Ryan Egesdahl (Inactive) [ 22/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
It's possible that this would have worked except that the order of the flags is preventing it. We may simply need to add the flag after "-Wall" appears on the command line. Perhaps we should introduce a mechanism that allows us to disable specific errors and not just all of them? | |||||||||||||||||||||||||||||||||||||||||||||
| Comment by Kaloian Manassiev [ 22/Sep/20 ] | |||||||||||||||||||||||||||||||||||||||||||||
|
On Slack ryan.egesdahl suggested that I try with the -Wno-error=range-loop-analysis compiler flag, but this doesn't seem to work:
I can see in build.ninja that the flag has been reflected:
|