Skip to content

Make versions consistent and bump fbjni to 0.3.0 #458

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

Merged
merged 9 commits into from
Sep 19, 2022

Conversation

bghgary
Copy link
Contributor

@bghgary bghgary commented Sep 10, 2022

This change fixes a runtime problem when integrating Babylon React Native with an NDK greater than r21b. The symptom for this change is that some devices will crash with the following error:

java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol "_Unwind_Resume" referenced by "/data/app//base.apk!/lib/x86/libBabylonNative.so"...

Main Change

  • Update fbjni to 0.3.0.

Consistency Changes

  • Update minSdkVersion to 21. Most are already at 21.
  • Update NDK version to 21.4.7075529. Ideally, we should update to the latest NDK, but we can't as it will conflict with the API24 camera hack.
  • Update to latest versions for:
    • buildToolsVersion (33.0.0)
    • compileSdkVersion (33)
    • targetSdkVersion (33)
    • gradle maven dependency (7.2.2)
    • gradle distribution (7.3.3)

Additional Details

It all started from the following NDK change: https://github.com/android/ndk/wiki/Changelog-r21#r21b

Issue 1166: Rehid unwinder symbols all architectures.

Early version of NDK r21, the unwinder symbols were exposed, but was later fixed in r21b. This make it such that any .so libraries compiled with r21 be incompatible with libraries compiled with r21b or greater. See this.

This also includes any .so dependencies that uses the NDK, which seems obvious now, but it wasn't when we were investigating. This means that our only dependency that also must be updated is fbjni, which is the main fix for this change. I also updated version numbers to be consistent across the different cases because it was confusing what version we are actively using in the code base.

Documentation

  • Update README to reflect required NDK version

Testing

  • Locally with Android
  • 0.65 Android output against partner projects
  • Locally with iOS

Other
Just for completeness, here are some documentation links (thanks to @bbowman) that were useful while investigating this issue:

@github-actions
Copy link

Here are the build results
Assembled
Assembled-iOSAndroid0.65
Assembled-iOSAndroid0.69
Assembled-Windows0.65
Assembled-Windows0.69
Artifacts will only be retained for 90 days.

@bghgary bghgary marked this pull request as ready for review September 12, 2022 21:43
@CoPrez
Copy link
Contributor

CoPrez commented Sep 12, 2022

As a NIT comment. The root README file mentions the NDK version 21.3.6528147 which should be updated to 21.4.7075529 with this change.

@bghgary
Copy link
Contributor Author

bghgary commented Sep 12, 2022

As a NIT comment. The root README file mentions the NDK version 21.3.6528147 which should be updated to 21.4.7075529 with this change.

I added a documentation section to the description to update the README once we settle on a version.

- buildToolsVersion
- compileSdkVersion
- targetSdkVersion
- gradle maven dependency
- gradle distribution
@github-actions
Copy link

Here are the build results
Assembled
Assembled-Windows0.65
Assembled-Windows0.69
Artifacts will only be retained for 90 days.

@github-actions
Copy link

Here are the build results
Assembled
Assembled-Windows0.65
Assembled-Windows0.69
Artifacts will only be retained for 90 days.

@bghgary bghgary requested a review from CoPrez September 15, 2022 23:15
@github-actions
Copy link

Here are the build results
Assembled
Assembled-iOSAndroid0.65
Assembled-iOSAndroid0.69
Assembled-Windows0.65
Assembled-Windows0.69
Artifacts will only be retained for 90 days.

@github-actions
Copy link

Here are the build results
Assembled
Assembled-iOSAndroid0.65
Assembled-iOSAndroid0.69
Assembled-Windows0.65
Assembled-Windows0.69
Artifacts will only be retained for 90 days.

@bghgary bghgary merged commit f6e168d into BabylonJS:master Sep 19, 2022
Alex-MSFT added a commit to Alex-MSFT/BabylonReactNative that referenced this pull request Sep 20, 2022
@bghgary bghgary deleted the consistent-versions branch December 7, 2022 23:57
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.

3 participants