Remove core modules from the default tmmdelegate#43939
Closed
RSNara wants to merge 2 commits intofacebook:mainfrom
Closed
Remove core modules from the default tmmdelegate#43939RSNara wants to merge 2 commits intofacebook:mainfrom
RSNara wants to merge 2 commits intofacebook:mainfrom
Conversation
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55613024 |
Base commit: efb0007 |
Differential Revision: D55769774
Summary: Pull Request resolved: facebook#43939 ## Problem If we link the default tmmdelegate with our vr apps, we get this issue: ``` ld.lld: error: duplicate symbol: facebook::react::NativeDevLoadingViewSpecJSI::NativeDevLoadingViewSpecJSI(facebook::react::JavaTurboModule::InitParams const&) >>> defined at firsttimenux_v2AppModulesCodegen-generated.cpp:1367 (buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/arvr/libraries/react-panellib/FirstTimeNux/__firsttimenux_v2AppModulesCodegen-codegen-modules-jni_cpp__/out/firsttimenux_v2AppModulesCodegen-generated.cpp:1367) >>> firsttimenux_v2AppModulesCodegen-generated.cpp.pic.o:(facebook::react::NativeDevLoadingViewSpecJSI::NativeDevLoadingViewSpecJSI(facebook::react::JavaTurboModule::InitParams const&)) in archive buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/arvr/libraries/react-panellib/FirstTimeNux/__firsttimenux_v2AppModulesCodegen-jni__/libfirsttimenux_v2AppModulesCodegen-jni.pic.a >>> defined at rncore-generated.cpp:606 (buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/xplat/js/react-native-github/__rncore-codegen-modules-jni_cpp__/out/rncore-generated.cpp:606) >>> rncore-generated.cpp.pic.o:(.text._ZN8facebook5react27NativeDevLoadingViewSpecJSIC2ERKNS0_15JavaTurboModule10InitParamsE+0x0) in archive buck-out/v2/gen/fbsource/bcbe7a50bd5ff29a/xplat/js/react-native-github/__rncore-jniAndroid__/librncore-jniAndroid.pic.a ``` ## Cause My best understanding of the problem: - Default tmmdelegate links against rncore, which contains codegen for react native's standard library of modules. - But, the default delegate also pulls in this appmodules.so library. That library also contains codegen for react native's standard library of modules + the app's modules. So, two so libraries define the same symbols. Hence the build fails. ## Solution Remove the codegen for react native's standard library of modules from the default tmmdelegate. Prereq: In open source, also make appmodules.so include the codegen for react native's standard library of modules. Changelog: [Android][Breaking] - Make the app responsible for returning core turbomodule jsi hostobjects Reviewed By: cortinico Differential Revision: D55613024
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D55613024 |
Contributor
|
This pull request has been merged in 7facb32. |
|
This pull request was successfully merged by @RSNara in 7facb32. When will my fix make it into a release? | How to file a pick request? |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
Problem
If we link the default tmmdelegate with our vr apps, we get this issue:
Cause
My best understanding of the problem:
So, two so libraries define the same symbols. Hence the build fails.
Solution
Remove the codegen for react native's standard library of modules from the default tmmdelegate.
Prereq: In open source, also make appmodules.so include the codegen for react native's standard library of modules.
Changelog: [Internal]
Reviewed By: cortinico
Differential Revision: D55613024