Hi, I am getting the following error when compilin...
# clikt
s
Hi, I am getting the following error when compiling a simple Kotlin Native program using Clikt and Mordant (latest versions and kotlin 2.1.20-Beta1) on GH. I’m unsure whether this is a Kotlin or Clikt issue. Posting it here in case anyone has encountered it before.
Copy code
> Task :backend:native:linkDebugTestLinuxX64 FAILED
The /home/runner/.konan/dependencies/llvm-16.0.0-x86_64-linux-essentials-80/bin/ld.lld command returned non-zero exit code: 1.
output:
ld.lld: error: duplicate symbol: kfun:com.github.ajalt.clikt.core#selfAndAncestors__at__com.github.ajalt.clikt.core.Context(){}kotlin.sequences.Sequence<com.github.ajalt.clikt.core.Context>
>>> defined at Context.kt:0 (/home/runner/work/clikt/clikt/clikt/src/commonMain/kotlin/com/github/ajalt/clikt/core/Context.kt:0)
>>>            libclikt:clikt-cache.a.o:(kfun:com.github.ajalt.clikt.core#selfAndAncestors__at__com.github.ajalt.clikt.core.Context(){}kotlin.sequences.Sequence<com.github.ajalt.clikt.core.Context>) in archive /home/runner/.konan/kotlin-native-prebuilt-linux-x86_64-2.1.20-Beta1/klib/cache/linux_x64-gSTATIC-pl/clikt:clikt/2bx6m2c1bk30f.1y4oy7igjc182/clikt:clikt-cache/bin/libclikt:clikt-cache.a
>>> defined at MordantContext.kt:0 (/home/runner/work/clikt/clikt/clikt-mordant/src/commonMain/kotlin/com/github/ajalt/clikt/core/MordantContext.kt:0)
>>>            libclikt:clikt-mordant-cache.a.o:(.text.kfun:com.github.ajalt.clikt.core#selfAndAncestors__at__com.github.ajalt.clikt.core.Context(){}kotlin.sequences.Sequence<com.github.ajalt.clikt.core.Context>+0x0) in archive /home/runner/.konan/kotlin-native-prebuilt-linux-x86_64-2.1.20-Beta1/klib/cache/linux_x64-gSTATIC-pl/clikt:clikt-mordant/3uo87q16hlqb.wo5fwkyzrtn4/clikt:clikt-mordant-cache/bin/libclikt:clikt-mordant-cache.a
a
I haven't seen that. Maybe clikt needs to be recompiled with 2.1.20.
s
Thanks! It’s working fine on my mac including cross compiling to linux and windows.
recompiled with 2.1.20.
Will this happen anytime soon or are you waiting for a stable release?