Build a React Native app using v10.0.0-beta.12.
iOS app builds and runs successfully.
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)
Repro case here: https://github.com/ioveracker/mongodb-realm-react-native-playground/tree/realm-v10.0.0-beta.12
yarn.cd ios && pod install (or use yarn setup:ios if you have rbenv and want to lock in the same ruby / bundler / cocoapods versions).yarn ios.https://github.com/ioveracker/mongodb-realm-react-native-playground/tree/realm-v10.0.0-beta.12
Same issue for me
It is clearly a bug at our end.
Until we get a fix out, you can try to change librealm-ios.a to librealm-sync-ios.a in https://github.com/realm/realm-js/blob/v10/RealmJS.podspec#L94.
➤ Kenneth Geisshirt commented:
The fix has been merged and we will release it soon.
Any timeline on when beta13 will be released?
@mxia it has been released today.
@mxia it has been released today.
Thanks so much!
@kneth Issue is still there in 10.0.0-rc.1. Getting below error.
Show Error
```c#
public class Order
ld: warning: directory not found for option '-L/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0/iphonesimulator'
Undefined symbols for architecture x86_64:
"___isPlatformVersionAtLeast", referenced from:
realm::util::terminate_internal(std::__1::basic_stringstream
Using [email protected] and Xcode 10.1.
@praveen-wal Thank you for reporting.
@praveen-wal We build for Xcode 11 and not Xcode 10. Please consider to upgrade :-)
Sure @kneth. For now, I'm using [email protected], I am getting a different issue. This might not be related to the above issue.
I'm getting this error https://github.com/realm/realm-js/issues/3105.
@kneth can you please make an update available for Xcode 10?
i also face the problem like this:
realm::util::(anonymous namespace)::ensure_reclaimer_thread_runs() in librealm-sync-ios.a(file_mapper.o)
realm::util::network::SecureTransportErrorCategory::message(int) const in librealm-sync-ios.a(network_ssl.o)
realm::util::network::ssl::Stream::verify_peer() in librealm-sync-ios.a(network_ssl.o)
@douglassthomas
can you please make an update available for Xcode 10?
Xcode 10 isn't supported by Apple.
Most helpful comment
The fix has been merged and we will release it soon.