Kotlin / Kotlin/kmp-integration-sample
Task linkDebugFrameworkIosX64 Failed
- Dominant language
- Kotlin
- Stars
- 121
- Forks
- 65
- PR merge metrics
- No merged PRs in 30d
Description
Following the documentation from [here](https://kotlinlang.org/docs/kmm-integrate-in-existing-app.html#connect-the-framework-to-your-ios-project) I am getting an error on linkDebugFramewokrIosX64 task. The log is:
----------------------------
> Task :shared:linkDebugFrameworkIosX64 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.iosX64=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:
ld: warning: ignoring file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin//libclang_rt.ios.a, missing required architecture x86_64 in file /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/13.0.0/lib/darwin//libclang_rt.ios.a (4 slices)
Undefined symbols for architecture x86_64:
"___cpu_model", referenced from:
polyHash_x86(int, unsigned short const*) in libstdlib-cache.a(result.o)
ld: symbol(s) not found for architecture x86_64
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':shared:linkDebugFrameworkIosX64'.
> 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.
* Get more help at https://help.gradle.org
BUILD FAILED in 14s
2 actionable tasks: 2 executed
--------------------------------------
It happens with code from "final" branch too. Any help would be appreciated
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by reproducing :shared:linkDebugFrameworkIosX64 from the final branch and capture the full Gradle log. Inspect the root gradle.properties, including the referenced Kotlin/Native cache setting, and compare the reported linker architecture and undefined-symbol errors. Done means the task links successfully or the reproduction and required project change are documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ios, kotlin
- Domain
- build-system, mobile
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100