Kermit: Kermit 1.2.2: ld: symbol(s) not found for architecture arm64

> Task :core:linkDebugFrameworkIosArm64 FAILED
e: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors
Please try to disable compiler caches and rerun the build. To disable compiler caches, add the following line to the gradle.properties file in the project's root directory:
    
    kotlin.native.cacheKind.iosArm64=none
    
Also, consider filing an issue with full Gradle log here: https://kotl.in/issue
The /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld command returned non-zero exit code: 1.
output:
Undefined symbols for architecture arm64:
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in libco.touchlab.crashkios:crashlytics-cache.a(result.o)
  "_OBJC_CLASS_$_FIRExceptionModel", referenced from:
      objc-class-ref in libco.touchlab.crashkios:crashlytics-cache.a(result.o)
  "_OBJC_CLASS_$_FIRStackFrame", referenced from:
      objc-class-ref in libco.touchlab.crashkios:crashlytics-cache.a(result.o)
ld: symbol(s) not found for architecture arm64

Execution failed for task ':core:linkDebugFrameworkIosArm64'.
> Compilation finished with errors

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

Kermit 1.2.1-alpha works fine.

Environment: macOS 12.6 Monterey 12.6 Xcode Version 14.1 (14B47b)

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 22

Most upvoted comments

I will update the Kermit docs, though, to make this more visible.

I’ve recreated that issue in Kotlin 1.7.10 and Kermit 1.2.1-alpha. As I said, in your sample, you have CrashlyticsLogWriter() commented out. When you uncomment that and run core:build, it fails with the linker error, which again, is in the doc. It explains why you see that.

Well, on the liner error, again, from the docs here: https://github.com/touchlab/CrashKiOS#linking

“If you are using dynamic frameworks, you’ll see a linker error when building your framework.”

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_FIRStackFrame", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRExceptionModel", referenced from:
      objc-class-ref in result.o
  "_OBJC_CLASS_$_FIRCrashlytics", referenced from:
      objc-class-ref in result.o
  "_FIRCLSExceptionRecordNSException", referenced from:
      _co_touchlab_crashkios_crashlytics_FIRCLSExceptionRecordNSException_wrapper0 in result.o
ld: symbol(s) not found for architecture x86_64

Please add branches that demonstrate the actual build failures. I don’t want to keep editing your sample code to try to recreate the issues you’re seeing. As in, please make the changes to your versions file, and put them in another branch. I would rather not keep trying to make local edits to recreate issues you’re seeing.

Yes, that is. The plugin is 2 years old. Just sayin.