[v10.0.0-beta.12] [iOS] ld: symbol(s) not found for architecture x86_64
See original GitHub issueGoals
Build a React Native app using v10.0.0-beta.12.
Expected Results
iOS app builds and runs successfully.
Actual Results
Build fails with linker errors (undefined symbols) in libRealmJS.a. I have tried cleaning Xcode build directories, removing node_modules/, removing ios/Pods/, and reinstalling.
Note: Android builds and runs fine, so this is only an iOS issue.
Undefined symbols for architecture x86_64:
"realm::Transaction::duplicate()", referenced from:
realm::_impl::ResultsNotifier::do_prepare_handover(realm::Transaction&) in libRealmJS.a(results_notifier.o)
realm::_impl::ResultsNotifier::prepare_to_deliver() in libRealmJS.a(results_notifier.o)
"realm::TableVersions::operator==(realm::TableVersions const&) const", referenced from:
realm::_impl::ResultsNotifier::need_to_run() in libRealmJS.a(results_notifier.o)
"realm::util::File::try_remove(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
realm::SyncFileManager::remove_realm(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in libRealmJS.a(sync_file.o)
"realm::util::try_remove_dir_recursive(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
realm::SyncFileManager::remove_user_directory(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in libRealmJS.a(sync_file.o)
realm::SyncFileManager::remove_realm(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) const in libRealmJS.a(sync_file.o)
realm::SyncFileManager::remove_metadata_realm() const in libRealmJS.a(sync_file.o)
"realm::ClusterTree::ConstIterator::operator++()", referenced from:
realm::ClusterTree::Iterator::operator++() in libRealmJS.a(sync_metadata.o)
"realm::Query::equal(realm::ColKey, realm::StringData, bool)", referenced from:
realm::SyncMetadataManager::get_or_make_user_metadata(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) const in libRealmJS.a(sync_metadata.o)
"realm::ClusterTree::ConstIterator::operator->() const", referenced from:
realm::ClusterTree::Iterator::operator->() const in libRealmJS.a(sync_metadata.o)
"realm::Table::begin()", referenced from:
realm::SyncMetadataManager::SyncMetadataManager(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, realm::util::Optional<std::__1::vector<char, std::__1::allocator<char> > >)::$_1::operator()() const in libRealmJS.a(sync_metadata.o)
realm::SyncMetadataManager::get_current_user_identity() const in libRealmJS.a(sync_metadata.o)
realm::SyncMetadataManager::set_current_user_identity(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in libRealmJS.a(sync_metadata.o)
realm::SyncMetadataManager::get_or_make_user_metadata(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool) const in libRealmJS.a(sync_metadata.o)
realm::SyncMetadataManager::SyncMetadataManager(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, bool, realm::util::Optional<std::__1::vector<char, std::__1::allocator<char> > >)::$_0::operator()(std::__1::shared_ptr<realm::Realm>, std::__1::shared_ptr<realm::Realm>, realm::Schema&) const in libRealmJS.a(sync_metadata.o)
"realm::ConstTableView::average_decimal(realm::ColKey, unsigned long*) const", referenced from:
realm::(anonymous namespace)::AggregateHelper<realm::Decimal128, realm::TableView&>::avg(realm::ColKey, unsigned long*) in libRealmJS.a(results.o)
"realm::ConstTableView::average_int(realm::ColKey, unsigned long*) const", referenced from:
realm::(anonymous namespace)::AggregateHelper<long long, realm::TableView&>::avg(realm::ColKey, unsigned long*) in libRealmJS.a(results.o)
"realm::ConstTableView::average_float(realm::ColKey, unsigned long*) const", referenced from:
realm::(anonymous namespace)::AggregateHelper<float, realm::TableView&>::avg(realm::ColKey, unsigned long*) in libRealmJS.a(results.o)
"realm::Table::average_int(realm::ColKey, unsigned long*) const", referenced from:
realm::(anonymous namespace)::AggregateHelper<long long, realm::Table const&>::avg(realm::ColKey, unsigned long*) in libRealmJS.a(results.o)
(... many more omitted due to comment length limits)
"realm::ConstLstIf<realm::Decimal128>::distinct(std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, realm::util::Optional<bool>) const", referenced from:
vtable for realm::Lst<realm::Decimal128> in libRealmJS.a(thread_safe_reference.o)
construction vtable for realm::ConstLstIf<realm::Decimal128>-in-realm::Lst<realm::Decimal128> in libRealmJS.a(thread_safe_reference.o)
"realm::Obj& realm::Obj::set<realm::Timestamp>(realm::ColKey, realm::Timestamp, bool)", referenced from:
void realm::(anonymous namespace)::ValueUpdater<OpaqueJSValue const*, realm::js::NativeAccessor<realm::jsc::Types> >::operator()<realm::Timestamp>(realm::Timestamp*) in libRealmJS.a(jsc_init.o)
void realm::(anonymous namespace)::ValueUpdater<OpaqueJSValue const*, realm::js::NativeAccessor<realm::jsc::Types> >::operator()<realm::Timestamp>(realm::Timestamp*) in libRealmJS.a(rpc.o)
"realm::Group::validate_primary_columns()", referenced from:
realm::ObjectStore::apply_schema_changes(realm::Transaction&, unsigned long long, realm::Schema&, unsigned long long, realm::SchemaMode, std::__1::vector<realm::SchemaChange, std::__1::allocator<realm::SchemaChange> > const&, std::__1::function<void ()>) in libRealmJS.a(object_store.o)
"realm::ConstLstIf<realm::Timestamp>::sort(std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >&, bool) const", referenced from:
vtable for realm::Lst<realm::Timestamp> in libRealmJS.a(thread_safe_reference.o)
construction vtable for realm::ConstLstIf<realm::Timestamp>-in-realm::Lst<realm::Timestamp> in libRealmJS.a(thread_safe_reference.o)
"realm::LinkPathPart::LinkPathPart(realm::ColKey, realm::ConstTableRef)", referenced from:
realm::query_builder::apply_ordering(realm::DescriptorOrdering&, realm::ConstTableRef, realm::parser::DescriptorOrderingState const&, realm::query_builder::Arguments&, realm::parser::KeyPathMapping) in librealm-parser-ios.a(query_builder.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Steps to Reproduce
Repro case here: https://github.com/ioveracker/mongodb-realm-react-native-playground/tree/realm-v10.0.0-beta.12
- Install packages with
yarn
. - Install iOS dependencies with
cd ios && pod install
(or useyarn setup:ios
if you have rbenv and want to lock in the same ruby / bundler / cocoapods versions). - Attempt to build and run the iOS app with
yarn ios
.
Code Sample
https://github.com/ioveracker/mongodb-realm-react-native-playground/tree/realm-v10.0.0-beta.12
Version of Realm and Tooling
- Realm JS SDK Version: 10.0.0-beta.12
- Node or React Native: React Native 0.63.2
- Client OS & Version: macOS 10.15.5
- Which debugger for React Native: N/A
- Xcode version: 11.6
Issue Analytics
- State:
- Created 3 years ago
- Reactions:4
- Comments:13 (5 by maintainers)
Top Results From Across the Web
ld: symbol(s) not found for architecture arm64, linking issue
I have just starting coding in my new mac. But whenever i make a program that contains other program files to link. It...
Read more >Xcode link error "symbol(s) not found for architecture x86_64"
I've faced similar issue after upgrading cocoapods/using use_frameworks! and it wouldn't work for one of the build targets.
Read more >d: symbol(s) not found for architecture arm64 - You.com
Hi, I'm trying to integrate your SDK into our iOS app to give it a try, and I'm getting the Undefined symbol: OBJCCLASS$SuperpoweredIOSAudioIO:...
Read more >Undefined Symbols For Architecture Armv7: "_Objc_Class_$_ ...
Environment Please tell us the versions of Flurry SDK, XCode, and iOS you are using. I am getting this error : "Undefined symbol:...
Read more >Undefined symbol: ___isOSVersionAtLeast - Using Swift
... ld: symbol(s) not found for architecture x86_64 clang-7: error: linker command failed with exit code 1 (use -v to see invocation).
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
The fix has been merged and we will release it soon.
It is clearly a bug at our end.
Until we get a fix out, you can try to change
librealm-ios.a
tolibrealm-sync-ios.a
in https://github.com/realm/realm-js/blob/v10/RealmJS.podspec#L94.