[SERVER-44687] error: 'operator delete' is unavailable: introduced in macOS 10.12 Created: 17/Nov/19 Updated: 29/Oct/23 Resolved: 22/Nov/19 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Build |
| Affects Version/s: | 4.2.1 |
| Fix Version/s: | 4.2.2, 4.0.14, 4.3.3 |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Ryan Schmidt | Assignee: | Andrew Morrow (Inactive) |
| 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 | ||||
| Backport Requested: |
v4.2, v4.0
|
||||
| Sprint: | Dev Platform 2019-12-02 | ||||
| Participants: | |||||
| Description |
|
mongodb 4.2.1 builds fine on macOS 10.12 and later, but on OS X 10.11 when compiling with MacPorts clang 8.0, it fails with this message: error: 'operator delete' is unavailable: introduced in macOS 10.12 There is a full build log here if you need it. Here is another project's bug report about this problem. In their fix they say:
I see that your SConstruct does this: # Enable sized deallocation support. I am guessing this is just checking whether the compiler understands -fsized-deallocation, and not whether the C++ library (which may be older than the compiler) supports it. Maybe it can be changed to a context.TryCompile(). |
| Comments |
| Comment by Githook User [ 11/Dec/19 ] |
|
Author: {'name': 'Andrew Morrow', 'email': 'andrew.morrow@10gen.com'}Message: (cherry picked from commit b3367608654d5ae827ecb0b6d7afe17b241daa7b) |
| Comment by Andrew Morrow (Inactive) [ 03/Dec/19 ] |
|
ryandesign - FYI this change has been backported to the v4.2 branch, and should be reflected in the upcoming v4.2.2 release. |
| Comment by Githook User [ 02/Dec/19 ] |
|
Author: {'email': 'andrew.morrow@10gen.com', 'name': 'Andrew Morrow'}Message: (cherry picked from commit b3367608654d5ae827ecb0b6d7afe17b241daa7b) |
| Comment by Andrew Morrow (Inactive) [ 22/Nov/19 ] |
|
ryandesign - Per the above commit, we now enforce the correct target minimum on master. I'll be backporting this to v4.2 sometime in the next week or so. |
| Comment by Githook User [ 21/Nov/19 ] |
|
Author: {'email': 'andrew.morrow@10gen.com', 'name': 'Andrew Morrow'}Message: |
| Comment by Andrew Morrow (Inactive) [ 19/Nov/19 ] |
|
ryandesign - That is definitely a bug that that value didn't get incremented, and we will fix it on master and backport it. |
| Comment by Ryan Schmidt [ 19/Nov/19 ] |
|
Oh I see. I didn't realize the requirements had increased. SConstruct still tests for and enforces a minimum of 10.10 so I had assumed that should still work: https://github.com/mongodb/mongo/blob/master/SConstruct#L2166-L2198 |
| Comment by Andrew Morrow (Inactive) [ 19/Nov/19 ] |
|
Hi ryandesign - The AddToCXXFLAGSIfSupported actually does invoke TryCompile internally. However, I think the more important thing here is that MongoDB 4.2 explicitly requires macOS 10.12+, per the support matrix: https://docs.mongodb.com/manual/installation/#supported-platforms (please see the table). If you wish to target macOS 10.11, support for that platforms stops with MongoDB 4.0. Additionally, if you wish to ensure that your 4.2 build will in fact correctly target macOS 10.12, you should add CCFLAGS=-mmacosx-version-min=10.12 LINKFLAGS=-mmacosx-version-min=10.12 to your SCons invocation. |