-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
Security 2019-11-18
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; ~~~~~^