react-native-reanimated icon indicating copy to clipboard operation
react-native-reanimated copied to clipboard

build framework Undefined symbols for architecture arm64 ,"facebook::jsc::makeJSCRuntime()", referenced from:

Open hudson-s opened this issue 1 year ago • 12 comments

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

  1. 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

hudson-s avatar Mar 21 '23 12:03 hudson-s

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?

github-actions[bot] avatar Mar 21 '23 12:03 github-actions[bot]

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

hudson-s avatar Mar 21 '23 12:03 hudson-s

I am getting a similar error on v2.14.3, same RN version as OP: Error: Undefined symbol: Facebook::jsc::makeJSCRuntime()

jdbarrera avatar Mar 28 '23 21:03 jdbarrera

@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

jdbarrera avatar Mar 29 '23 21:03 jdbarrera

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?

schmidan avatar May 30 '23 15:05 schmidan

I have tried to reproduce this issue on Example app, is it possible for you to provide reproduction? 🙏

piaskowyk avatar Jun 19 '23 16:06 piaskowyk

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 avatar Aug 07 '23 22:08 PrinceD96

@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 avatar Aug 30 '23 16:08 atomicpages

@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.

arora767287 avatar Sep 04 '23 16:09 arora767287

@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

huyvuskedulo avatar Nov 08 '23 12:11 huyvuskedulo

I removed this line from App.js and fixed issue

import 'react-native-reanimated'

mustafauyysl avatar Nov 25 '23 00:11 mustafauyysl

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

NicolasD27 avatar Apr 17 '24 13:04 NicolasD27