Skip to content
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

[ios] ld: symbol(s) not found for architecture x86_64 #67

Closed
troZee opened this issue May 10, 2021 · 11 comments
Closed

[ios] ld: symbol(s) not found for architecture x86_64 #67

troZee opened this issue May 10, 2021 · 11 comments

Comments

@troZee
Copy link

troZee commented May 10, 2021

When I added this library to my project, I can't built it, due below error:

act-native-mmkv/react_native_mmkv.framework/react_native_mmkv
Undefined symbols for architecture x86_64:
  "facebook::jsi::Value::Value(facebook::jsi::Value&&)", referenced from:
      void std::__1::allocator<facebook::jsi::Value>::construct<facebook::jsi::Value, facebook::jsi::Value>(facebook::jsi::Value*, facebook::jsi::Value&&) in YeetJSIUtils.o
  "facebook::jsi::Object::getPropertyAsFunction(facebook::jsi::Runtime&, char const*) const", referenced from:
      createPromiseAsJSIValue(facebook::jsi::Runtime&, std::__1::function<void (facebook::jsi::Runtime&, std::__1::shared_ptr<Promise>)>) in YeetJSIUtils.o
  "facebook::jsi::Value::~Value()", referenced from:
      void facebook::jsi::Object::setProperty<facebook::jsi::Function>(facebook::jsi::Runtime&, facebook::jsi::String const&, facebook::jsi::Function&&) in Mmkv.o
      facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Object const&) in Mmkv.o
      facebook::jsi::Value::Value<facebook::jsi::String>(facebook::jsi::String&&) in Mmkv.o
      facebook::jsi::Value::Value<facebook::jsi::Array>(facebook::jsi::Array&&) in Mmkv.o
      convertNSDictionaryToJSIObject(facebook::jsi::Runtime&, NSDictionary*) in YeetJSIUtils.o
      convertNSArrayToJSIArray(facebook::jsi::Runtime&, NSArray*) in YeetJSIUtils.o
      convertNSArrayToStdVector(facebook::jsi::Runtime&, NSArray*) in YeetJSIUtils.o
      ...
  "facebook::jsi::Value::Value(facebook::jsi::Runtime&, facebook::jsi::Value const&)", referenced from:
      facebook::jsi::detail::toValue(facebook::jsi::Runtime&, facebook::jsi::Value const&) in YeetJSIUtils.o
  "facebook::jsi::JSError::JSError(facebook::jsi::Runtime&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)", referenced from:
      facebook::jsi::JSError::JSError(facebook::jsi::Runtime&, char const*) in Mmkv.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Below you can find a pod file

require_relative '../node_modules/react-native/scripts/react_native_pods'
require_relative '../node_modules/@react-native-community/cli-platform-ios/native_modules'

platform :ios, '11.0'
use_frameworks!

def shared_dependencies()
    # Other pods
    pod 'AppCenter', '1.13.1'
    pod 'PromiseKit', '~> 6.0'
end

target 'MyApp' do
    config = use_native_modules!
    use_react_native!(:path => config["reactNativePath"])
    shared_dependencies()

end

Maybe it is related to use_frameowork issue ?

@mrousavy
Copy link
Owner

Looks like you're using an older version of JSI, which react-native version are you on?

@troZee
Copy link
Author

troZee commented May 11, 2021

Looks like you're using an older version of JSI, which react-native version are you on?

"react-native": "0.63.3",

and I have no problems with reanimated, which also uses JSI

@mrousavy
Copy link
Owner

and I have no problems with reanimated, which also uses JSI
there are different ways to use JSI.

I'll try to reproduce it, but it looks like this is coming from a "jsi::JSError" ctor. Does it work on Android?

@mrousavy mrousavy closed this as completed Jun 4, 2021
@oferRounds
Copy link

Any luck with this? Seeing it also

@7patricia
Copy link

Hi! Anyone has any update on this? I'm experiencing the same issue.

@kesha-antonov
Copy link

Same
"react-native": "0.67.2",

@xwartz
Copy link

xwartz commented Jun 1, 2022

any update?

@jspizziri
Copy link

I was having this issue in [email protected] and it was the direct result of adding use_frameworks! to my Podfile (which I did for react-native-firebase)

@Drzaln
Copy link

Drzaln commented Jul 19, 2022

any updates with this issue?

@b0iq
Copy link

b0iq commented Aug 18, 2022

#413 check it with this fix

@Drzaln
Copy link

Drzaln commented Aug 18, 2022

Thanks @b0iq
I just downgrade react-native-firebase for now

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

No branches or pull requests

9 participants