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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor - P4
    • Resolution: Fixed
    • Affects Version/s: 4.2.1
    • Fix Version/s: 4.2.2, 4.0.14, 4.3.3
    • Component/s: Build
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Backport Requested:
      v4.2, v4.0
    • Sprint:
      Dev Platform 2019-12-02

      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:

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

        Attachments

          Activity

            People

            Assignee:
            acm Andrew Morrow
            Reporter:
            ryandesign Ryan Schmidt
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: