Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-44687

error: 'operator delete' is unavailable: introduced in macOS 10.12

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 4.2.2, 4.0.14, 4.3.3
    • Affects Version/s: 4.2.1
    • Component/s: Build
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • Dev Platform 2019-12-02

      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.
      AddToCXXFLAGSIfSupported(myenv, '-fsized-deallocation')

      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().

            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            ryandesign Ryan Schmidt
            0 Vote for this issue
            5 Start watching this issue