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:
Weirdly, some OSX compiler does allow -fsized-deallocation, yet barks on any attempt to actually use it at compile time . So lets detect this as well in configure and opt out as necessary.
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().