Skip to content

[Bug] Firestore fails to link for desktop on macOS Monterey because of unaligned pointers #712

Closed
@mark-grimes

Description

@mark-grimes

[REQUIRED] Please fill in the following fields:

  • Pre-built SDK from the website or open-source from this repo: website
  • Firebase C++ SDK version: 8.6.0
  • Problematic Firebase Component: Firestore (Auth, Database, etc.)
  • Other Firebase Components in use: n/a (Auth, Database, etc.)
  • Platform you are using the C++ SDK on: Mac M1 Max (Mac, Windows, or Linux)
  • Platform you are targeting: desktop (iOS, Android, and/or desktop)

[REQUIRED] Please describe the issue here:

(Please list the full steps to reproduce the issue. Include device logs, Unity logs, and stack traces if available.)

Firebase 8.6.0 now comes with arm64 universal libraries for Apple Silicon (which is great, thanks). Building for desktop under most circumstances fails to link with "warnings" of unaligned pointers. We have different products that build with slightly different settings, and some fail but some don't. I'm not sure yet whether this is due to using GNU makefile or xcodebuild build systems, or when building our code as static versus dynamic libraries.

Importantly the quickstarts fail.

Googling the error comes up with a lot of results for iOS Firebase, most of which seem to say it was something about the way the Firebase libraries were built.

Steps to reproduce:

Have you been able to reproduce this issue with just the Firebase C++ quickstarts ? Yes
What's the issue repro rate? (eg 100%, 1/5 etc) 100%

What happened? How can we make the problem occur?
This could be a description, log/console output, etc.

Building the firestore quickstart (exact shell commands below under "Relevant Code") results in:

Consolidate compiler generated dependencies of target desktop_testapp
[ 33%] Linking CXX executable desktop_testapp
ld: warning: direct access in function '_f_b_sk_X509_NAME_deep_copy' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_app.a(93f69bbf5771d4a5b72056dec59d993b_ssl_x509.cc.o)' to global weak symbol '_f_b_sk_X509_NAME_call_free_func' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(61bdfe207469be13490cee4a1c4bfec5_1_ssl_transport_security.cc.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '_f_b_sk_X509_NAME_deep_copy' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_app.a(93f69bbf5771d4a5b72056dec59d993b_ssl_x509.cc.o)' to global weak symbol '_f_b_sk_X509_NAME_call_free_func' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(61bdfe207469be13490cee4a1c4bfec5_1_ssl_transport_security.cc.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '_f_b_sk_X509_NAME_pop_free' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_app.a(93f69bbf5771d4a5b72056dec59d993b_ssl_x509.cc.o)' to global weak symbol '_f_b_sk_X509_NAME_call_free_func' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(61bdfe207469be13490cee4a1c4bfec5_1_ssl_transport_security.cc.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: direct access in function '_f_b_sk_X509_NAME_pop_free' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_app.a(93f69bbf5771d4a5b72056dec59d993b_ssl_x509.cc.o)' to global weak symbol '_f_b_sk_X509_NAME_call_free_func' from file '/Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(61bdfe207469be13490cee4a1c4bfec5_1_ssl_transport_security.cc.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
ld: warning: pointer not aligned at address 0x10066FB4A (__ZN8firebase9firestore29firestore_BundledQuery_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FBDB (__ZN8firebase9firestore27firestore_NamedQuery_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FBBE (__ZN8firebase9firestore27firestore_NamedQuery_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FC32 (__ZN8firebase9firestore40firestore_BundledDocumentMetadata_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FCC3 (__ZN8firebase9firestore31firestore_BundleMetadata_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FDAB (__ZN8firebase9firestore30firestore_BundleElement_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FD8E (__ZN8firebase9firestore30firestore_BundleElement_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FD71 (__ZN8firebase9firestore30firestore_BundleElement_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_bundle.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FE02 (__ZN8firebase9firestore39google_firestore_v1_Precondition_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_common.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FE93 (__ZN8firebase9firestore45google_firestore_v1_TransactionOptions_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_common.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FE76 (__ZN8firebase9firestore45google_firestore_v1_TransactionOptions_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_common.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FEEA (__ZN8firebase9firestore47google_firestore_v1_Document_FieldsEntry_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FF7B (__ZN8firebase9firestore35google_firestore_v1_Document_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FF5E (__ZN8firebase9firestore35google_firestore_v1_Document_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10066FF41 (__ZN8firebase9firestore35google_firestore_v1_Document_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670063 (__ZN8firebase9firestore32google_firestore_v1_Value_fieldsE + 195 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670046 (__ZN8firebase9firestore32google_firestore_v1_Value_fieldsE + 166 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670029 (__ZN8firebase9firestore32google_firestore_v1_Value_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670111 (__ZN8firebase9firestore35google_firestore_v1_MapValue_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067014B (__ZN8firebase9firestore37google_firestore_v1_ArrayValue_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006701A2 (__ZN8firebase9firestore47google_firestore_v1_MapValue_FieldsEntry_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006701FA (__ZN8firebase9firestore45google_firestore_v1_GetDocumentRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670339 (__ZN8firebase9firestore47google_firestore_v1_ListDocumentsRequest_fieldsE + 224 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006702FF (__ZN8firebase9firestore47google_firestore_v1_ListDocumentsRequest_fieldsE + 166 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067045B (__ZN8firebase9firestore48google_firestore_v1_CreateDocumentRequest_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067043E (__ZN8firebase9firestore48google_firestore_v1_CreateDocumentRequest_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006704CF (__ZN8firebase9firestore48google_firestore_v1_UpdateDocumentRequest_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006704B2 (__ZN8firebase9firestore48google_firestore_v1_UpdateDocumentRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670495 (__ZN8firebase9firestore48google_firestore_v1_UpdateDocumentRequest_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670543 (__ZN8firebase9firestore48google_firestore_v1_DeleteDocumentRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067060E (__ZN8firebase9firestore51google_firestore_v1_BatchGetDocumentsRequest_fieldsE + 166 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006705F1 (__ZN8firebase9firestore51google_firestore_v1_BatchGetDocumentsRequest_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006705B7 (__ZN8firebase9firestore51google_firestore_v1_BatchGetDocumentsRequest_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067069F (__ZN8firebase9firestore52google_firestore_v1_BatchGetDocumentsResponse_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006706F6 (__ZN8firebase9firestore50google_firestore_v1_BeginTransactionRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067074D (__ZN8firebase9firestore40google_firestore_v1_CommitRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006707C1 (__ZN8firebase9firestore41google_firestore_v1_CommitResponse_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067086F (__ZN8firebase9firestore42google_firestore_v1_RunQueryRequest_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670852 (__ZN8firebase9firestore42google_firestore_v1_RunQueryRequest_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006708E3 (__ZN8firebase9firestore43google_firestore_v1_RunQueryResponse_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006708A9 (__ZN8firebase9firestore43google_firestore_v1_RunQueryResponse_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006709AE (__ZN8firebase9firestore39google_firestore_v1_WriteRequest_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670A3F (__ZN8firebase9firestore40google_firestore_v1_WriteResponse_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670A22 (__ZN8firebase9firestore40google_firestore_v1_WriteResponse_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670A96 (__ZN8firebase9firestore33google_firestore_v1_Target_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670A79 (__ZN8firebase9firestore33google_firestore_v1_Target_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670B9B (__ZN8firebase9firestore40google_firestore_v1_ListenRequest_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670B61 (__ZN8firebase9firestore40google_firestore_v1_ListenRequest_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670C49 (__ZN8firebase9firestore39google_firestore_v1_TargetChange_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670C0F (__ZN8firebase9firestore39google_firestore_v1_TargetChange_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670CF7 (__ZN8firebase9firestore41google_firestore_v1_ListenResponse_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670CDA (__ZN8firebase9firestore41google_firestore_v1_ListenResponse_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670CBD (__ZN8firebase9firestore41google_firestore_v1_ListenResponse_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670C83 (__ZN8firebase9firestore41google_firestore_v1_ListenResponse_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670D4E (__ZN8firebase9firestore45google_firestore_v1_Target_QueryTarget_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_firestore.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670DD2 (__ZN8firebase9firestore34firestore_client_NoDocument_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_maybe_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670E29 (__ZN8firebase9firestore39firestore_client_UnknownDocument_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_maybe_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670E9D (__ZN8firebase9firestore37firestore_client_MaybeDocument_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_maybe_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670E63 (__ZN8firebase9firestore37firestore_client_MaybeDocument_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_maybe_document.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670F4B (__ZN8firebase9firestore34firestore_client_WriteBatch_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_mutation.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670F2E (__ZN8firebase9firestore34firestore_client_WriteBatch_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_mutation.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670F11 (__ZN8firebase9firestore34firestore_client_WriteBatch_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_mutation.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670F85 (__ZN8firebase9firestore53google_firestore_v1_StructuredQuery_Projection_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670FF9 (__ZN8firebase9firestore49google_firestore_v1_StructuredQuery_Filter_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100670FBF (__ZN8firebase9firestore49google_firestore_v1_StructuredQuery_Filter_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671033 (__ZN8firebase9firestore48google_firestore_v1_StructuredQuery_Order_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067108A (__ZN8firebase9firestore33google_firestore_v1_Cursor_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067118F (__ZN8firebase9firestore42google_firestore_v1_StructuredQuery_fieldsE + 195 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671155 (__ZN8firebase9firestore42google_firestore_v1_StructuredQuery_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067111B (__ZN8firebase9firestore42google_firestore_v1_StructuredQuery_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006710FE (__ZN8firebase9firestore42google_firestore_v1_StructuredQuery_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006710E1 (__ZN8firebase9firestore42google_firestore_v1_StructuredQuery_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671203 (__ZN8firebase9firestore58google_firestore_v1_StructuredQuery_CompositeFilter_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671277 (__ZN8firebase9firestore54google_firestore_v1_StructuredQuery_FieldFilter_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067123D (__ZN8firebase9firestore54google_firestore_v1_StructuredQuery_FieldFilter_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006712CE (__ZN8firebase9firestore54google_firestore_v1_StructuredQuery_UnaryFilter_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_query.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006713E7 (__ZN8firebase9firestore24google_rpc_Status_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_status.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067143E (__ZN8firebase9firestore41google_protobuf_Struct_FieldsEntry_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_struct.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671543 (__ZN8firebase9firestore28google_protobuf_Value_fieldsE + 166 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_struct.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671526 (__ZN8firebase9firestore28google_protobuf_Value_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_struct.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067157D (__ZN8firebase9firestore32google_protobuf_ListValue_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_struct.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671665 (__ZN8firebase9firestore30firestore_client_Target_fieldsE + 195 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_target.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067162B (__ZN8firebase9firestore30firestore_client_Target_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_target.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006716D9 (__ZN8firebase9firestore36firestore_client_TargetGlobal_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_target.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067174D (__ZN8firebase9firestore44google_firestore_v1_DocumentTransform_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671835 (__ZN8firebase9firestore59google_firestore_v1_DocumentTransform_FieldTransform_fieldsE + 195 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006717FB (__ZN8firebase9firestore59google_firestore_v1_DocumentTransform_FieldTransform_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006717DE (__ZN8firebase9firestore59google_firestore_v1_DocumentTransform_FieldTransform_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006717C1 (__ZN8firebase9firestore59google_firestore_v1_DocumentTransform_FieldTransform_fieldsE + 79 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067191D (__ZN8firebase9firestore32google_firestore_v1_Write_fieldsE + 195 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006718E3 (__ZN8firebase9firestore32google_firestore_v1_Write_fieldsE + 137 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006718C6 (__ZN8firebase9firestore32google_firestore_v1_Write_fieldsE + 108 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x10067186F (__ZN8firebase9firestore32google_firestore_v1_Write_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671957 (__ZN8firebase9firestore38google_firestore_v1_WriteResult_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x1006719AE (__ZN8firebase9firestore41google_firestore_v1_DocumentChange_fieldsE + 21 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: warning: pointer not aligned at address 0x100671A3F (__ZN8firebase9firestore41google_firestore_v1_DocumentDelete_fieldsE + 50 from /Users/myusername/Documents/dependencies/firebase_cpp_sdk/latest/libs/darwin/universal/libfirebase_firestore.a(35d977e33fa52a2d694735fe9d685b60_write.nanopb.cc.o))
ld: unaligned pointer(s) for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [desktop_testapp] Error 1
make[1]: *** [CMakeFiles/desktop_testapp.dir/all] Error 2
make: *** [all] Error 2

The warning: direct access in function I always used to get on Intel Macs too. The pointer not aligned are new since switching.

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

On an Apple Silicon Mac (tested on Apple M1 Max based MacBook Pro)

git clone https://github.com/firebase/quickstart-cpp.git
mkdir -p quickstart-cpp/builds/firestore
cd quickstart-cpp/builds/firestore
/Applications/CMake.app/Contents/bin/cmake -DFIREBASE_CPP_SDK_DIR=<install directory> ../../firestore/testapp/
make

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions