-
Type: New Feature
-
Resolution: Won't Fix
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Query Execution
This seems to be the latest SDK as of creation of this ticket. When using this SDK to build (on arm or x86 macos), errors will be produced similar too:
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:540:52: error: arithmetic on a pointer to an incomplete type 'mongo::Value' {return static_cast<size_type>(__end_cap() - this->__begin_);} ~~~~~~~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:760:56: note: in instantiation of member function 'std::vector<mongo::Value>::capacity' requested here __annotate_contiguous_container(data(), data() + capacity(), ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:431:7: note: in instantiation of member function 'std::vector<mongo::Value>::__annotate_delete' requested here __annotate_delete(); ^ src/mongo/db/exec/document_value/value_internal.h:121:5: note: in instantiation of member function 'std::vector<mongo::Value>::~vector' requested here RCVector() {} ^ src/mongo/db/exec/document_value/value_internal.h:54:7: note: forward declaration of 'mongo::Value' class Value; ^ In file included from src/mongo/client/remote_command_retry_scheduler.cpp:34: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:760:54: error: arithmetic on a pointer to an incomplete type 'const std::vector<mongo::Value>::value_type' (aka 'const mongo::Value') __annotate_contiguous_container(data(), data() + capacity(), ~~~~~~ ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:431:7: note: in instantiation of member function 'std::vector<mongo::Value>::__annotate_delete' requested here __annotate_delete(); ^ src/mongo/db/exec/document_value/value_internal.h:121:5: note: in instantiation of member function 'std::vector<mongo::Value>::~vector' requested here RCVector() {} ^ src/mongo/db/exec/document_value/value_internal.h:54:7: note: forward declaration of 'mongo::Value' class Value; ^ In file included from src/mongo/client/remote_command_retry_scheduler.cpp:34: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:833:64: error: arithmetic on a pointer to an incomplete type 'mongo::Value' __alloc_traits::destroy(__alloc(), _VSTD::__to_address(--__soon_to_be_end)); ^ ~~~~~~~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:827:29: note: in instantiation of member function 'std::vector<mongo::Value>::__base_destruct_at_end' requested here void __clear() _NOEXCEPT {__base_destruct_at_end(this->__begin_);} ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:436:9: note: in instantiation of member function 'std::vector<mongo::Value>::__clear' requested here __clear(); ^ src/mongo/db/exec/document_value/value_internal.h:121:5: note: in instantiation of member function 'std::vector<mongo::Value>::~vector' requested here RCVector() {} ^ src/mongo/db/exec/document_value/value_internal.h:54:7: note: forward declaration of 'mongo::Value' class Value; ^ In file included from src/mongo/client/remote_command_retry_scheduler.cpp:32: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/algorithm:1712: In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/memory:848: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/allocator.h:128:58: error: invalid application of 'sizeof' to an incomplete type 'mongo::Value' _VSTD::__libcpp_deallocate((void*)__p, __n * sizeof(_Tp), _LIBCPP_ALIGNOF(_Tp)); ^~~~~~~~~~~ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__memory/allocator_traits.h:282:13: note: in instantiation of member function 'std::allocator<mongo::Value>::deallocate' requested here __a.deallocate(__p, __n); ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/vector:437:25: note: in instantiation of member function 'std::allocator_traits<std::allocator<mongo::Value>>::deallocate' requested here __alloc_traits::deallocate(__alloc(), this->__begin_, capacity()); ^ src/mongo/db/exec/document_value/value_internal.h:121:5: note: in instantiation of member function 'std::vector<mongo::Value>::~vector' requested here RCVector() {} ^ src/mongo/db/exec/document_value/value_internal.h:54:7: note: forward declaration of 'mongo::Value' class Value; ^
Among many others pointing into the SDK.
Workaround:
Install older SDK 12.1 or 13.1 and point to them by modifying the etc/scons/xcode_macosx_arm.vars or etc/scons/xcode_macosx.vars file to point to the target SDK:
# this selects the latest SDK, but we want a older version #sdk_path = subprocess.check_output(['xcrun', '--sdk', 'macosx', '--show-sdk-path']).decode('utf-8').strip() # This selects 13.1 sdk_path = subprocess.check_output(['xcrun', '--sdk', 'macosx13.1', '--show-sdk-path']).decode('utf-8').strip()
- related to
-
SERVER-77007 MongoDB fails to compile with Clang 15 with C++20
- Closed