iOS Build Environment Help Center

ld: symbols not found for architecture arm64

append delete bassel

I cannot seem to fix this problem. Can you please help. Thank you
Pruning compilation results...
+ Pre-parsing project files...
+ Building GoogleDataTransport for iphoneos (configuration: Release)
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORAssert.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORClock.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORConsoleLogger.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORDataFuture.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCOREvent.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORFlatFileStorage.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORLifecycle.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORPlatform.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORReachability.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORRegistrar.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORTransformer.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORTransport.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORUploadCoordinator.m...
+ [arm64] Compiling GoogleDataTransport/GoogleDataTransport/GDTCORLibrary/GDTCORUploadPackage.m...
+ [arm64] Compiling GoogleDataTransport/../Target Support Files/GoogleDataTransport/GoogleDataTransport-dummy.m...
+ [arm64] Linking GoogleDataTransport...
+ [arm64] Relinking GoogleDataTransport with extra flags: -framework CoreFoundation -framework Foundation -framework CoreTelephony
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_NSURL", referenced from:
objc-class-ref in GDTCORDataFuture.m.obj
objc-class-ref in GDTCOREvent.m.obj
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSObject", referenced from:
_OBJC_CLASS_$_GDTCORClock in GDTCORClock.m.obj
_OBJC_CLASS_$_GDTCORDataFuture in GDTCORDataFuture.m.obj
_OBJC_CLASS_$_GDTCOREvent in GDTCOREvent.m.obj
_OBJC_CLASS_$_GDTCORFlatFileStorage in GDTCORFlatFileStorage.m.obj
_OBJC_CLASS_$_GDTCORLifecycle in GDTCORLifecycle.m.obj
_OBJC_CLASS_$_GDTCORApplication in GDTCORPlatform.m.obj
_OBJC_CLASS_$_GDTCORReachability in GDTCORReachability.m.obj
...
"_OBJC_CLASS_$_NSData", referenced from:
objc-class-ref in GDTCOREvent.m.obj
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSAssertionHandler", referenced from:
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_METACLASS_$_NSObject", referenced from:
_OBJC_METACLASS_$_GDTCORClock in GDTCORClock.m.obj
_OBJC_METACLASS_$_GDTCORDataFuture in GDTCORDataFuture.m.obj
_OBJC_METACLASS_$_GDTCOREvent in GDTCOREvent.m.obj
_OBJC_METACLASS_$_GDTCORFlatFileStorage in GDTCORFlatFileStorage.m.obj
_OBJC_METACLASS_$_GDTCORLifecycle in GDTCORLifecycle.m.obj
_OBJC_METACLASS_$_GDTCORApplication in GDTCORPlatform.m.obj
_OBJC_METACLASS_$_GDTCORReachability in GDTCORReachability.m.obj
...
"_OBJC_CLASS_$_NSKeyedUnarchiver", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
objc-class-ref in GDTCORUploadPackage.m.obj
"_OBJC_CLASS_$_NSNumber", referenced from:
objc-class-ref in GDTCORClock.m.obj
objc-class-ref in GDTCOREvent.m.obj
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
objc-class-ref in GDTCORRegistrar.m.obj
objc-class-ref in GDTCORTransformer.m.obj
objc-class-ref in GDTCORUploadCoordinator.m.obj
...
"_OBJC_CLASS_$_NSFileManager", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSString", referenced from:
objc-class-ref in GDTCORConsoleLogger.m.obj
objc-class-ref in GDTCOREvent.m.obj
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
objc-class-ref in GDTCORTransformer.m.obj
objc-class-ref in GDTCORTransport.m.obj
objc-class-ref in GDTCORUploadCoordinator.m.obj
...
"_OBJC_CLASS_$_NSMutableDictionary", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORRegistrar.m.obj
objc-class-ref in GDTCORUploadCoordinator.m.obj
"_OBJC_CLASS_$_NSBundle", referenced from:
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSError", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSMutableSet", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORUploadCoordinator.m.obj
"_OBJC_CLASS_$_NSSet", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
objc-class-ref in GDTCORUploadCoordinator.m.obj
objc-class-ref in GDTCORUploadPackage.m.obj
"_OBJC_CLASS_$_NSArray", referenced from:
objc-class-ref in GDTCORUploadCoordinator.m.obj
"_OBJC_CLASS_$_NSMutableOrderedSet", referenced from:
objc-class-ref in GDTCORFlatFileStorage.m.obj
"_OBJC_CLASS_$_NSNotificationCenter", referenced from:
objc-class-ref in GDTCORLifecycle.m.obj
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSDictionary", referenced from:
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_CTTelephonyNetworkInfo", referenced from:
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSKeyedArchiver", referenced from:
objc-class-ref in GDTCORPlatform.m.obj
"_OBJC_CLASS_$_NSTimer", referenced from:
objc-class-ref in GDTCORUploadPackage.m.obj
ld: suggested extra flags: -framework CoreFoundation -framework Foundation -framework CoreTelephony
ld: 21 symbol(s) not found for architecture arm64

Reply RSS

Replies

append delete #1. bassel

Setup is as follows:
• Cocoapods are enabled
• Extra Linker Flags are the following
○ -framework GLKit -framework SystemConfiguration -framework CoreGraphics -framework CoreData -framework CoreTelephony -framework MessageUI
• xCode is on Root Folder
• iOS SDK 14.0

append delete #2. bassel

Also, did the following:
• Turned Off Real-Time Protection

append delete #3. Pierre-Marie Baty

Hello

I hate being insisting, but will you please *conform to the posting rules* that I am trying to enforce to keep this forum readable ?

Although it sounds impossible that you haven't seen them, let me quote them again :

⚠ DO READ BEFORE POSTING ⚠

When reporting a problem, please include the following items:

• Windows version (7 or 10 - I don't need the build number)
• Builder version (from the builder UI title bar)
• iOS SDK version (from the builder UI title bar)
• A description of the context

Please write at least a few lines about the particularities of the app you're trying to build if it has some (e.g. whether it uses a particular capability of iOS devices, what third-party SDKs it relies on, etc).

Please *do not post the full build log in the message*. Instead put it for example on PasteBin: https://pastebin.com and provide just the link in your message. This will greatly improve the readability of your message. But do provide the log (on PasteBin) if you have one.

For screenshots, you can put them for example on PostImages: https://postimages.org and provide just the link to them in your message.

Of course, please post only after you've:
1. read the Troubleshooting section in the documentation and haven't found the solution to your problem in it
2. searched the forum for a similar problem already answered and haven't found a satisfying answer. -- Thank you!

Copy/pasting a full log makes a post hard to read. Not telling me about your Windows version or your builder version leaves me with incomplete info, without which I can't reliably diagnose anything.

Your problem looks very simple to fix - once I have the missing information. If you want me to make the effort to understand your problem and tell you how to fix it, please make the *minimal effort* to present it suitably. I wouldn't be rude if it wasn't the second time. Thank you for your understanding.

append delete #4. bassel

After Adding -lz in the Embedded binaries, I got the following errors, and it has bypassed the above errors. Now I have new errors, which are the following:

Building the CocoaPods dependency project Pods-Unity-iPhone...
+ Preparing output directory...
+ Libraries: 0 supplied, 0 built
+ Frameworks: 5 supplied, 11 built
+ Pre-parsing project files...
+ Building Pods_Unity_iPhone for iphoneos (configuration: Release)
+ [arm64] Target Support Files/Pods-Unity-iPhone/Pods-Unity-iPhone-dummy.m.obj is up to date
+ [arm64] Linking Pods_Unity_iPhone...
Undefined symbols for architecture arm64:
"_OBJC_CLASS_$_FIRApp", referenced from:
objc-class-ref in FIRAnalyticsConnector(FIRAnalyticsConnector_8094107d82c527bf23f93e98c9db96d1.o)
objc-class-ref in FirebaseAnalytics(FIRAnalytics_bb540b7bc432fd4c54bf2d7f57c43305.o)
"_OBJC_CLASS_$_FIRComponent", referenced from:
objc-class-ref in FIRAnalyticsConnector(FIRAnalyticsConnector_8094107d82c527bf23f93e98c9db96d1.o)
"_kFIRLoggerAnalytics", referenced from:
+[FIRAnalytics startWithConfiguration:options:] in FirebaseAnalytics(FIRAnalytics_bb540b7bc432fd4c54bf2d7f57c43305.o)
"_FIRInstallationIDDidChangeNotification", referenced from:
+[FIRAnalytics observeFirebaseInstallationIDChanges] in FirebaseAnalytics(FIRAnalytics_bb540b7bc432fd4c54bf2d7f57c43305.o)
"_OBJC_CLASS_$_FIROptions", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAnalytics_bb540b7bc432fd4c54bf2d7f57c43305.o)
"_OBJC_CLASS_$_FIRInstallations", referenced from:
objc-class-ref in FirebaseAnalytics(FIRAnalytics_bb540b7bc432fd4c54bf2d7f57c43305.o)
ld: 6 symbol(s) not found for architecture arm64

append delete #5. Pierre-Marie Baty

Do you fully understand what I post ? Maybe English is not your native language. On what part of what I said do you need explanations ?

append delete #6. bassel

Hello,
I didn't catch your first post, the page was open and didn't refresh :) It is clearly obvious that the native language has nothing to do with it. Anyway, bellow you'll find what you've requested:

• Windows Version: 10.0.19041
• iOS Builder Version: 3.35.4
• iOS SDK 14.0
• Context: I am having trouble building Cocoapods for Firebase. You can find the full log here: https://pastebin.com/HjzMUqVy
• I have added the following frameworks in the extra linker flags:
○ -framework CoreFoundation -framework Foundation -framework GLKit -framework SystemConfiguration -framework CoreGraphics -framework CoreData -framework CoreTelephony -framework MessageUI -ObjC
• I have added -lz in embedd binaries

Do you need anything else? Thank you

append delete #7. bassel

Furthermore, Allow me to apologize for not reading your first post. Thank you again

append delete #8. Pierre-Marie Baty

Apologies accepted. Okay, so there are very basic Objective-C symbols that the linker can't find, which is why it hinted you into supplying Foundation, CoreFoundation and some other very basic iOS frameworks that every well-formed project already includes automatically. It is clearly abnormal that you had to do so. Which leaves us with two options:

- Either the Xcode project is malformed (it can happen that Unity generates bogus projects, with incompatible Pods for example)
- Or there is something (virus scanner interfering, bug in the iOS SDK) that fails to expose some very basic things in the stock iOS frameworks, which is why the linker complains.

Troubleshooting:
- If you can upgrade your builder *and* your iOS SDK to the latest version, please do so. It is important to start here.
- If you can validate the project consistency by building it with Xcode once, please do so.
- If you can rule out the security software interference theory by building from a freshly installed Windows machine (possibly a virtual one, and Windows 7 preferentially), please do so.
- After you've updated the builder and the SDK and ruled out what you could, rebuild your project without anything specified in the extra linker flags.

Are the symptoms the same ?

:: @Pierre-Marie Baty added on 02 Sep ’21 · 17:05

Edit: a third option is a genuine bug in the builder script, which I'll be happy to fix, but we have to rule out the other possibilities first.

:: @Pierre-Marie Baty added on 02 Sep ’21 · 17:07

Edit 2: if you prefer an immediate workaround, and if you are certain that your Xcode project is consistent, you may build with the Firebase binary frameworks. It will result in faster builds. See the documentation for directions on how to do that.

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Moderators: Pierre-Marie Baty