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

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

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Minor - P4
    • Resolution: Fixed
    • 4.2.1
    • 4.2.2, 4.0.14, 4.3.3
    • Build
    • None
    • Fully Compatible
    • ALL
    • v4.2, v4.0
    • 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

            andrew.morrow@mongodb.com Andrew Morrow
            ryandesign Ryan Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: