Realm-cocoa: Undefined symbols for architecture arm64

Created on 9 Aug 2016  Â·  8Comments  Â·  Source: realm/realm-cocoa

Goals

Compile my app after upgrading from Realm 0.102.1 to 1.02

Expected Results

Compile Successfully

Actual Results

Not compiling error:

Undefined symbols for architecture arm64:
  "realm::util::terminate_internal(std::__1::basic_stringstream<char, std::__1::char_traits<char>, std::__1::allocator<char> >&)", referenced from:
      void realm::util::terminate<unsigned long, unsigned long>(char const*, char const*, long, unsigned long, unsigned long) in libRealm.a(RLMArrayLinkView.o)
      void realm::util::terminate<unsigned long, int>(char const*, char const*, long, unsigned long, int) in libRealm.a(RLMArrayLinkView.o)
      void realm::util::terminate_with_info<int&>(char const*, int, char const*, char const*, int&&&) in libRealm.a(RLMAccessor.o)
      void realm::util::terminate_with_info<bool const&, bool const&>(char const*, int, char const*, char const*, bool const&&&, bool const&&&) in libRealm.a(RLMAccessor.o)
      void realm::util::terminate<realm::SharedGroup::TransactStage, realm::SharedGroup::TransactStage>(char const*, char const*, long, realm::SharedGroup::TransactStage, realm::SharedGroup::TransactStage) in libRealm.a(realm_coordinator.o)
      void realm::util::terminate<unsigned long long, unsigned long long>(char const*, char const*, long, unsigned long long, unsigned long long) in libRealm.a(realm_coordinator.o)
      void realm::util::terminate<char*, char const*>(char const*, char const*, long, char*, char const*) in libRealm.a(transact_log_handler.o)
      ...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Realm version: 1.0.2

Xcode version: 7.3.1

iOS version: 9.3.2

Dependency manager + version: CocoaPods 1.0.1

T-Help

Most helpful comment

This error message looks like either the wrong version of Realm's core library is being used, or Realm's core library is not being linked in at all. Can you please try the steps listed in our documentation on troubleshooting installation issues with CocoaPods:

pod cache clean Realm
pod cache clean RealmSwift
pod deintegrate || rm -rf Pods
pod install --verbose
rm -rf ~/Library/Developer/Xcode/DerivedData

All 8 comments

This error message looks like either the wrong version of Realm's core library is being used, or Realm's core library is not being linked in at all. Can you please try the steps listed in our documentation on troubleshooting installation issues with CocoaPods:

pod cache clean Realm
pod cache clean RealmSwift
pod deintegrate || rm -rf Pods
pod install --verbose
rm -rf ~/Library/Developer/Xcode/DerivedData

+1 Thanks, Cleaning the build directory itself and removing DerivedData worked!

Also used the following: http://stackoverflow.com/questions/23616605/clean-build-folder-option-disabled-in-xcode-5

I've got exactly the same problem, over two projects.

I run a cocoapods install to update things, and it smashes a previously clean project to pieces...

screen shot 2016-10-24 at 11 52 50
screen shot 2016-10-24 at 11 39 55
screen shot 2016-10-24 at 11 39 40

It feels a little like it's something like the cocoapod version hasn't been built for arm64 or something...

The above mentioned troubleshooting issue doesn't solve it > <

Some more clues:

I get 107 warnings of this nature:

file:///Users/liam/Development/Project/Pods/Realm/Realm/ObjectStore/object_store.cpp: warning: Missing file: /Users/liam/Development/Project/Pods/Realm/Realm/ObjectStore/object_store.cpp is missing from working copy

Yet when I investigate the folder structure source is actually present in a different location:
12:04:13 ✔ liam:(master)~/Development/Project/Pods/Realm/Realm/ObjectStore/src$ ls
total 344
drwxr-xr-x 17 liam staff 578 24 Oct 12:02 ./
drwxr-xr-x 3 liam staff 102 24 Oct 12:02 ../
-r--r--r-- 1 liam staff 1986 24 Oct 12:02 collection_notifications.cpp
drwxr-xr-x 11 liam staff 374 24 Oct 12:02 impl/
-r--r--r-- 1 liam staff 19976 24 Oct 12:02 index_set.cpp
-r--r--r-- 1 liam staff 5687 24 Oct 12:02 list.cpp
-r--r--r-- 1 liam staff 8994 24 Oct 12:02 object_schema.cpp
-r--r--r-- 1 liam staff 31502 24 Oct 12:02 object_store.cpp
-r--r--r-- 1 liam staff 42 24 Oct 12:02 placeholder.cpp
-r--r--r-- 1 liam staff 18853 24 Oct 12:02 results.cpp
-r--r--r-- 1 liam staff 7436 24 Oct 12:02 schema.cpp
-r--r--r-- 1 liam staff 24303 24 Oct 12:02 shared_realm.cpp
-r--r--r-- 1 liam staff 6301 24 Oct 12:02 sync_manager.cpp
-r--r--r-- 1 liam staff 7746 24 Oct 12:02 sync_metadata.cpp
-r--r--r-- 1 liam staff 17146 24 Oct 12:02 sync_session.cpp
-r--r--r-- 1 liam staff 3810 24 Oct 12:02 thread_confined.cpp
drwxr-xr-x 3 liam staff 102 24 Oct 12:02 util/

@LiamInJapan please file a new issue if you'd like us to help you.

@bdash The problem pops up again with pod update to Realm 3.18. Downgrading to 3.17.3 works just fine. I tried cleaning pods as you suggested but didn't work. Thanks.

After update to xCode12 i am also facing this same issue with realm version '3.21.0'

Undefined symbols for architecture arm64:

i know to remove the arm64 simulator the code will work but i need the simulator support..Can anyone help me in this

Was this page helpful?
0 / 5 - 0 ratings

Related issues

carvalho-oak picture carvalho-oak  Â·  3Comments

jpsim picture jpsim  Â·  3Comments

dmorrow picture dmorrow  Â·  3Comments

matteodanelli picture matteodanelli  Â·  3Comments

BackWorld picture BackWorld  Â·  3Comments