Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump gradle version #518

Closed
wants to merge 1 commit into from
Closed

Conversation

neildhar
Copy link
Contributor

Summary:
This diff updates the minimum gradle plugin version for building the
Hermes OSS release in order to avoid problems in older versions of
the Android NDK.

Specifically, there was a bug
(android/ndk#1166) in the Android NDK that
caused the exception handling functions in libc++ to be incorrectly
exported. Depending on link order, this can lead to libhermes.so
not statically linking in _Unwind_resume, and expecting it instead
to be resolved dynamically to the version in libc++. However, if
we're linking against an RN version that was built against the new
version of the NDK, those symbols may not be exported, and end up
unresolved (which crashes the app).

To allow Hermes to be built with newer versions of the NDK, we need
to bump up the gradle plugin version to 4.1. RN already uses 4.1.

Differential Revision: D28763472

@facebook-github-bot facebook-github-bot added CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported labels May 27, 2021
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28763472

Summary:
Pull Request resolved: facebook#518

This diff updates the minimum gradle plugin version for building the
Hermes OSS release in order to avoid problems in older versions of
the Android NDK.

Specifically, there was a bug
(android/ndk#1166) in the Android NDK that
caused the exception handling functions in `libc++` to be incorrectly
exported. Depending on link order, this can lead to  `libhermes.so`
not statically linking in `_Unwind_resume`, and expecting it instead
to be resolved dynamically to the version in `libc++`. However, if
we're linking against an RN version that was built against the new
version of the NDK, those symbols may not be exported, and end up
unresolved (which crashes the app).

To allow Hermes to be built with newer versions of the NDK, we need
to bump up the gradle plugin version to 4.1. RN already uses 4.1.

Bumping the gradle version seems to break the intl tests unless we
add `useLibrary 'android.test.base'` to the gradle file, so do that.
(we're technically supposed to have that anyway)

Differential Revision: D28763472

fbshipit-source-id: 5706ee86d824339c6a3f0171992fe7ffe96cd188
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D28763472

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in f61a798.

Huxpro pushed a commit that referenced this pull request Jul 12, 2021
Summary:
Pull Request resolved: #518

This diff updates the minimum gradle plugin version for building the
Hermes OSS release in order to avoid problems in older versions of
the Android NDK.

Specifically, there was a bug
(android/ndk#1166) in the Android NDK that
caused the exception handling functions in `libc++` to be incorrectly
exported. Depending on link order, this can lead to  `libhermes.so`
not statically linking in `_Unwind_resume`, and expecting it instead
to be resolved dynamically to the version in `libc++`. However, if
we're linking against an RN version that was built against the new
version of the NDK, those symbols may not be exported, and end up
unresolved (which crashes the app).

To allow Hermes to be built with newer versions of the NDK, we need
to bump up the gradle plugin version to 4.1. RN already uses 4.1.

Bumping the gradle version seems to break the intl tests unless we
add `useLibrary 'android.test.base'` to the gradle file, so do that.
(we're technically supposed to have that anyway)

Reviewed By: mhorowitz

Differential Revision: D28763472

fbshipit-source-id: 00ffcfa94ee83a9dee0ac894e20e83867200865b
@neildhar neildhar deleted the export-D28763472 branch October 20, 2021 18:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants