FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix "Undefined symbols" linker error when DocumentChange::npos was used by dconeybe · Pull Request #474 · firebase/firebase-cpp-sdk · GitHub

Fix "Undefined symbols" linker error when DocumentChange::npos was used - #474

Merged
dconeybe merged 6 commits into
mainfrom
dconeybe/DefineDocumentChangeNpos
Jun 21, 2021
Merged

Fix "Undefined symbols" linker error when DocumentChange::npos was used#474
dconeybe merged 6 commits into
mainfrom
dconeybe/DefineDocumentChangeNpos

Conversation

dconeybe commented Jun 16, 2021
edited
Loading

Copy link
Copy Markdown
Contributor

Fix a bug where accessing firebase::firestore::DocumentChange::npos from a non-Android platform results in a linker error:

Undefined symbols for architecture x86_64:
  "firebase::firestore::DocumentChange::npos", referenced from:
      firebase_testapp_automated::FirebaseFirestoreBasicTest_TestDocumentChangeNpos_Test::TestBody() in integration_test.cc.o
ld: symbol(s) not found for architecture x86_64

Here is the declaration of npos:

#if defined(ANDROID)
// Older NDK (r16b) fails to define this properly. Fix this when support for
// the older NDK is removed.
static const std::size_t npos;
#else
static constexpr std::size_t npos = static_cast<std::size_t>(-1);
#endif // defined(ANDROID)

The fix is to add a definition of npos into the corresponding .cc file

dconeybe self-assigned this Jun 16, 2021
google-cla Bot added the cla: yes label Jun 16, 2021
dconeybe requested a review from var-const June 16, 2021 16:14
dconeybe assigned var-const and unassigned dconeybe Jun 16, 2021
var-const previously approved these changes Jun 18, 2021

var-const left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks for fixing this! Please make sure that this is ok to merge/the version number in the changelog is up-to-date.

Comment thread release_build_files/readme.md Outdated

### 8.1.0
- Changes
- Firestore: Fixed a linker error when DocumentChange::npos was used.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Nit: please wrap DocumentChange::npos in backticks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done.

### 8.1.0
- Changes
- Firestore: Fixed a linker error when DocumentChange::npos was used.
([#474](https://github.com/firebase/firebase-cpp-sdk/pull/474)).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Optional: I think the changelog usually links to issues, not PRs, so this link could probably be omited.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like there is a mixture of issues and PRs linked to in previous change log entries. I see your point but I personally feel like adding a link to additional context is useful for future readers. If this issue had been discovered externally then there would be an issue number; however, since it was discovered by me, a developer on the Firestore team, no issue was created. IMO, providing this link adds value at no cost. If you feel strongly I can remove it, but I like having it here.

var-const assigned dconeybe and unassigned var-const Jun 18, 2021

dconeybe left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Please make sure that this is ok to merge/the version number in the changelog is up-to-date.

I confirmed the version number at go/firebase-cpp-release.

Comment thread release_build_files/readme.md Outdated

### 8.1.0
- Changes
- Firestore: Fixed a linker error when DocumentChange::npos was used.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done.

### 8.1.0
- Changes
- Firestore: Fixed a linker error when DocumentChange::npos was used.
([#474](https://github.com/firebase/firebase-cpp-sdk/pull/474)).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like there is a mixture of issues and PRs linked to in previous change log entries. I see your point but I personally feel like adding a link to additional context is useful for future readers. If this issue had been discovered externally then there would be an issue number; however, since it was discovered by me, a developer on the Firestore team, no issue was created. IMO, providing this link adds value at no cost. If you feel strongly I can remove it, but I like having it here.

dconeybe enabled auto-merge (squash) June 21, 2021 15:25
dconeybe requested a review from var-const June 21, 2021 15:25
dconeybe assigned var-const and unassigned dconeybe Jun 21, 2021
dconeybe merged commit de68c2b into main Jun 21, 2021
github-actions Bot added the tests: in-progress This PR's integration tests are in progress. label Jun 21, 2021

github-actions Bot commented Jun 21, 2021
edited
Loading

Copy link
Copy Markdown

❌  Integration test FAILED

Requested by @dconeybe on commit de68c2b
Last updated: Mon Jun 21 13:28 PDT 2021
View integration test log & download artifacts

Failures Configs
remote_config [TEST] [FAILURE] [iOS] [macos] [ios_target](1 failed tests)  TestFetchInterval

github-actions Bot added the tests: failed This PR's integration tests failed. label Jun 21, 2021
firebase-workflow-trigger Bot removed the tests: in-progress This PR's integration tests are in progress. label Jun 21, 2021
dconeybe deleted the dconeybe/DefineDocumentChangeNpos branch June 22, 2021 19:44
firebase locked and limited conversation to collaborators Jul 22, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: firestore cla: yes tests: failed This PR's integration tests failed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL