Skip to content

Add weak __libcpp_verbose_abort definition to app on iOS#1877

Open
AustinBenoit wants to merge 3 commits into
mainfrom
symbol-fix
Open

Add weak __libcpp_verbose_abort definition to app on iOS#1877
AustinBenoit wants to merge 3 commits into
mainfrom
symbol-fix

Conversation

@AustinBenoit

Copy link
Copy Markdown
Contributor

Description

Provide details of the change, and generalize the change in the PR title above.

On older iOS versions (iOS 15 and 16), the system libc++.1.dylib does not contain the std::__1::__libcpp_verbose_abort symbol. Since we build the Firebase C++ SDK binaries using a newer Xcode version (which references this symbol for standard library assertions), apps linking our static libraries will crash at startup on these older OS versions with a "Symbol not found" dynamic linker error. This was a change we had made to our test apps but we should include in to make the build process easier for all.

To resolve this:

  • Added a weak definition of __libcpp_verbose_abort to app/src/app_ios.mm so it is packaged into libfirebase_app.a and statically resolved for any linking application.
  • Removed the now-redundant temporary workaround definition from testing/sample_framework/src/app_framework.cc.

Fixes #1872


Testing

Describe how you've tested these changes. Link any manually triggered Integration tests or CPP binary SDK Packaging Github Action workflows, if applicable.

Ran a local test in ios 16 and verified the symbol is loading correctly. Will run the integration test to verify everything continues to work.


Type of Change

Place an x the applicable box:

  • Bug fix. Add the issue # below if applicable.
  • New feature. A non-breaking change which adds functionality.
  • Other, such as a build process or documentation change.

Notes

  • Bug fixes and feature changes require an update to the Release Notes section of release_build_files/readme.md.
  • Read the contribution guidelines CONTRIBUTING.md.
  • Changes to the public API require an internal API review. If you'd like to help us make Firebase APIs better, please propose your change in a feature request so that we can discuss it together.

@AustinBenoit AustinBenoit requested a review from a-maurice June 30, 2026 16:16
On older iOS versions (iOS 15 and 16), the system libc++.1.dylib does not contain the `std::__1::__libcpp_verbose_abort` symbol. Since we build the Firebase C++ SDK binaries using a newer Xcode version (which references this symbol for standard library assertions), apps linking our static libraries will crash at startup on these older OS versions with a "Symbol not found" dynamic linker error.

To resolve this:
- Added a weak definition of `__libcpp_verbose_abort` to `app/src/app_ios.mm` so it is packaged into `libfirebase_app.a` and statically resolved for any linking application.
- Removed the now-redundant temporary workaround definition from `testing/sample_framework/src/app_framework.cc`.

Fixes #1872

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request moves the workaround for the Xcode 15+ / Swift 5.10+ Concurrency and C++ verbose abort crash on older iOS versions from the sample framework to the core iOS app implementation, and updates the release notes accordingly. Feedback suggests using C++ standard library headers instead of C headers, and using the _LIBCPP_ABI_NAMESPACE macro instead of hardcoding the __1 inline namespace to make the workaround more robust.

Comment thread app/src/app_ios.mm Outdated
Comment thread app/src/app_ios.mm
@AustinBenoit AustinBenoit force-pushed the symbol-fix branch 2 times, most recently from 4027531 to e9cc811 Compare June 30, 2026 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Linking against the latest (13.9.0) statically built libraries panics

1 participant