Repository navigation
Description
Description
We are using react native 0.71.7 version without enabling new architecture its working fine for both platform android and ios.
But After Enabling New Architecture build failing for Ios, Android Build working fine.
we are getting linking error
Undefined symbols for architecture x86_64:
"_RCTAppSetupDefaultModuleFromClass", referenced from:
-[RCTAppDelegate getModuleInstanceFromClass:] in libReact-RCTAppDelegate.a(RCTAppDelegate.o)
"RCTAppSetupDefaultJsExecutorFactory(RCTBridge*, RCTTurboModuleManager*)", referenced from:
-[RCTAppDelegate jsExecutorFactoryForBridge:] in libReact-RCTAppDelegate.a(RCTAppDelegate.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
React Native Version
0.71.7
Output of npx react-native info
info Fetching system and libraries information...
System:
OS: macOS 13.3.1
CPU: (16) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz
Memory: 897.02 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 19.9.0 - /usr/local/bin/node
Yarn: Not Found
npm: 9.6.3 - /usr/local/bin/npm
Watchman: 2023.04.10.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.12.0 - /Users/XYZ/.rvm/gems/ruby-2.7.6/bin/pod
SDKs:
iOS SDK:
Platforms: DriverKit 22.4, iOS 16.4, macOS 13.3, tvOS 16.4, watchOS 9.4
Android SDK: Not Found
IDEs:
Android Studio: 2022.1 AI-221.6008.13.2211.9619390
Xcode: 14.3/14E222b - /usr/bin/xcodebuild
Languages:
Java: 11.0.18 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: Not Found
react-native: Not Found
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
Steps to reproduce
Enable New Architecture using RCT_NEW_ARCH_ENABLED=1 && pod install
and build from xcode version 14.3
Snack, code example, screenshot, or link to a repository
I have tried with arm64 active arch.
Activity
cortinico commentedon Apr 26, 2023
cc @cipolleschi
cipolleschi commentedon Apr 28, 2023
Hi @kaushal9808, thanks for the issue. Could you please provide a reproducer?
I tried to create a new app, install the pods and build with Xcode 14.3 as you suggested, but new apps build fine, so I guess there is something specific of your setup...
What I run:
⌘ + r
kaushal9808 commentedon Apr 29, 2023
we have migrated our app from RN - 0.67.0 version to 0.71.7, Android and IOS version without new architecture working fine,
After Enable the New Architecture Android is also working fine, But we are facing this issues only for iOS. I am working on it if I found more information then will update here, repository is private so currently we can unable to share the same.
we are checking with new init project and migrating our project, if that's work then great.
Could you please share ruby version with using -> npx react-native info
we can check that if that will create issues or not.
cipolleschi commentedon May 4, 2023
version 0.71.7 dropped any requirement for Ruby. Everything should work from version 2.6.10, shipped with the Macbook to version 3.2.0.
We also have test in CircleCI that builds React Native in a new app from the template using Ruby 2.7.7 (latest Ruby 2 stable) and Ruby 3.2.0.
Personally, my global ruby version, through
rbenvis 3.2.0. But I don't think that Ruby is the problem.Can you share the
Podfileat least? Also, can you confirm that you reinstall the pods?kaushal9808 commentedon May 4, 2023
Hello ,
for PodFile reference, I have copy paste it here . and I have reinstall pods multiple times after removing cache as well.
I think react-native-cli or may other lib will create this issues.
And yes Ruby version is expected as you have mentioned 3.2.0 right now, but we have tested with gt 2.7.0. yes Ruby version is the not the one.
cipolleschi commentedon May 4, 2023
I think I got the problem. The error reports that the
RCTAppSetupDefaultModuleFromClassandRCTAppSetupDefaultJsExecutorFactorysymbols are not found.If we look at the
RCTAppSetupUtilsclass, this symbols are protected behind a flagRCT_NEW_ARCH_ENABLED=1.What's happening is that the flag is not propagated to the pod, so those symbols are actually excluded from the build. This code should make sure that those flag are set, but there could be a bug there. Or there could be some other pieces of infra that tinkers with the C/CXX flags we are setting up.
To double check that that's the problem, you can:
xcworkspace,React-Corepod, // <-- this changed in 0.72OTHER_CPLUSPLUS_FLAGSkaushal9808 commentedon May 4, 2023
Thanks Buddy, Perfect Catch. In Our Case Two React-core is created and I have added these parameter in both react core, now it's building successfully.
I do not know the reason about two react-core right now, I have attached the screenshot for reference.

cipolleschi commentedon May 5, 2023
That's effectively weird. I don't know how's possible that you have two React-Core... 😅
Let me know if you find the reason. I'm closing the issue as it seems like we found the root cause but there is no direct actionable for the React Native framework.
douglowder commentedon May 25, 2023
@cipolleschi It is very possible to have two React-Core if you have multiple targets, as we do for the TV repo. In this case, instead of just 'React-Core', we have 'React-Core-iOS' and 'React-Core-tvOS'.
This patch fixed the issue for me. If you agree that this is reasonable, I can open a PR to the core repo.
cipolleschi commentedon May 25, 2023
@douglowder as temporary patch/fixes, would you mind set up a PR for this? 🙏
Fix Fabric issue with React-Core pod when Xcode project has multiple …
Fix Fabric issue with React-Core pod when Xcode project has multiple …