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

Compilation fails with --libc++ and clang 8.0+

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.1
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Operating System:
      ALL
    • Sprint:
      Security 2019-11-18

      Description

      MongoDB fails to compile with clang 8.0 and libc++. It also affects clang 9.0.

      Libc++ 8.0+ defines the feature flag __cpp_lib_hardware_interference_size even though it has no support for the feature. See https://bugs.llvm.org/show_bug.cgi?id=41423.

      This bug is only hit on stock libc++ because Apple has not integrated https://github.com/llvm/llvm-project/commit/f56972e22489c92028e5147344ab8b31b0b4fed5 yet. I do not believe this feature will ever be supported in clang or gcc

      Error

      In file included from src/mongo/db/pipeline/document_source_match.cpp:32:
      In file included from src/mongo/db/pipeline/document_source_match.h:37:
      In file included from src/mongo/db/pipeline/document_source.h:45:
      In file included from src/mongo/db/commands.h:47:
      In file included from src/mongo/db/query/explain.h:36:
      In file included from src/mongo/db/query/plan_executor.h:35:
      In file included from src/mongo/db/catalog/util/partitioned.h:44:
      In file included from src/mongo/util/with_alignment.h:34:
      src/mongo/stdx/new.h:53:12: error: no member named 'hardware_constructive_interference_size' in namespace 'std'
      using std::hardware_constructive_interference_size;
            ~~~~~^
      src/mongo/stdx/new.h:54:12: error: no member named 'hardware_destructive_interference_size' in namespace 'std'
      using std::hardware_destructive_interference_size;
            ~~~~~^
      

        Attachments

          Activity

            People

            Assignee:
            mark.benvenuto Mark Benvenuto
            Reporter:
            mark.benvenuto Mark Benvenuto
            Participants:
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: