react-native-reanimated
react-native-reanimated copied to clipboard
build framework Undefined symbols for architecture arm64 ,"facebook::jsc::makeJSCRuntime()", referenced from:
Description
error :
❌ Undefined symbols for architecture arm64 ❌ "facebook::jsc::makeJSCRuntime()", referenced from: ❌ ld: symbol(s) not found for architecture arm64 ❌ clang: error: linker command failed with exit code 1 (use -v to see invocation) ** ARCHIVE FAILED **
The following build commands failed: Ld /Users/xxx/Library/Developer/Xcode/DerivedData/DummyApp-dibstxxgsdhrauffyhyyrajmhsmz/Build/Intermediates.noindex/ArchiveIntermediates/MyAPP/InstallationBuildProductsLocation/Library/Frameworks/RNReanimated.framework/RNReanimated normal (in target 'RNReanimated' from project 'Pods')
Steps to reproduce
- cmd -> xcodebuild archive
Snack or a link to a repository
https://stackoverflow.com/help/mcve.
Reanimated version
3.0.2
React Native version
0.71.4
Platforms
iOS
JavaScript runtime
JSC
Workflow
None
Architecture
Paper (Old Architecture)
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
Hey! 👋
The issue doesn't seem to contain a minimal reproduction.
Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?
mode
xcodebuild archive -workspace DummyApp.xcworkspace -scheme DummyApp -configuration Debug -archivePath /Users/MYTest/DummyApp-iphoneos.xcarchive -sdk iphoneos ENABLE_BITCODE=NO SKIP_INSTALL=NO ARCHS=arm64 CODE_SIGNING_ALLOWED=NO CODE_SIGN_IDENTITY= CODE_SIGNING_REQUIRED=NO SUPPORTS_MACCATALYST=NO | xcbeautify
I am getting a similar error on v2.14.3, same RN version as OP: Error: Undefined symbol: Facebook::jsc::makeJSCRuntime()
@sunhongda I was able to fix the error on my end. Had to patch the package by adding s.dependency 'React-jsc'
to the RNReanimated.podspec file
Thanks for the workaround.
Does someone know why this is missing?
And does someone have an automated solution eg a pre_install
routine for our Podfile?
I have tried to reproduce this issue on Example app, is it possible for you to provide reproduction? 🙏
Getting this error on react-native
v0.72.3
and react-native-reanimated
v3.4.2
. Any news on when this will get fixed?
@PrinceD96 you can work around this here: https://github.com/software-mansion/react-native-reanimated/issues/4254#issuecomment-1489342936
Use in conjunction with patch-package
or your package manager if it's built in. For me since I'm using RN 0.72
my change was required at the end of the podspec file.
if config[:react_native_minor_version] >= 72 && !fabric_enabled
- s.dependency 'React-RCTAppDelegate'
+ s.dependency 'React-jsc'
end
@atomicpages and @jdbarrera How did you go about rebuilding your app? I haven't patched a package before so am a bit confused about the steps and would appreciate a quick rundown if you could about applying the changes to the .podspec file to your project.
@atomicpages
Tried but it's not really working, somehow it makes the app crash immediately when we try to reload the application ... Some kind of error in the JSC causing this. Does anyone have any ideas about this?
The entire issue only occur when the hermes is disabled.
It's very similar with this: https://github.com/software-mansion/react-native-reanimated/issues/1424
I removed this line from App.js and fixed issue
import 'react-native-reanimated'
After I applied the patch, it was not working still.
But adding this to the podfile fixed it: inspired by https://github.com/software-mansion/react-native-screens/issues/842#issuecomment-790498006
pre_install do |installer|
installer.pod_targets.each do |pod|
if pod.name.eql?('RNReanimated')
def pod.build_type;
Pod::BuildType.static_library
end
end
end
end