Hello guys! I don't where to put this issue... I'm...
# ktor
s
Hello guys! I don't where to put this issue... I'm trying to build my native module from a mpp project, but I'm getting this error:
Copy code
<--------Parallel execution is an incubating feature.

> Task :ios:compileDebugIos_arm64KotlinNative FAILED
Undefined symbols for architecture arm64:
  "_kfun:io.ktor.client.engine.ios.IosClient()io.ktor.client.engine.HttpClientEngineFactory<io.ktor.client.engine.HttpClientEngineConfig>", referenced from:
      _kfun:io.ktor.client.HttpClient(kotlin.Function1<io.ktor.client.HttpClientConfig<#STAR>,kotlin.Unit>)io.ktor.client.HttpClient in combined.o
  "_kfun:kotlinx.coroutines.CoroutineScope.<get-isActive>()ValueType", referenced from:
      _kmethods:io.ktor.util.pipeline.PipelineContext in combined.o
      _kmethods:io.ktor.client.call.HttpClientCall in combined.o
      _kmethods:io.ktor.client.HttpClient in combined.o
ld: symbol(s) not found for architecture arm64
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld invocation reported errors

FAILURE: Build failed with an exception.
Looks like it can't find the ktor client methods, no? The coroutines version is 1.0.0-RC1, and ktor client is 1.0.0-beta1. Android and JS works fine
j
looks like coroutines 1.0.0-rc1 is not supported with ktor 1.0.0-beta1 - I got a NPE at org.jetbrains.kotlin.backend.konan.optimizations.Devirtualization$DevirtualizationAnalysis$InstantiationsSearcher.processVirtualCall(Devirtualization.kt:281) 0.30.2-eap13 works fine
s
But... If I switch to 0.30.2 I get lot of issues
Copy code
exception: java.lang.AssertionError: Assertion failed
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.translateClassName(ObjCExportHeaderGenerator.kt:303)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.mapReferenceTypeIgnoringNullability$backend_native_compiler(ObjCExportHeaderGenerator.kt:855)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.mapReferenceType$backend_native_compiler(ObjCExportHeaderGenerator.kt:797)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.mapType(ObjCExportHeaderGenerator.kt:892)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.mapReturnType(ObjCExportHeaderGenerator.kt:754)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.buildMethod(ObjCExportHeaderGenerator.kt:687)
        at org.jetbrains.kotlin.backend.konan.objcexport.ObjCExportHeaderGenerator.translatePlainMembers(ObjCExportHeaderGenerator.kt:547)
e
Please note that you should use the same versions of libraries as in ktor.
s
I'm using right now same versions for coroutines and ktor client
coroutines (now, after changed): 0.30.2-eap13 ktor client: 1.0.0-beta1
e
And what is the version of compiler?
s
I've tested with 146 and 131
Any suggestion? 😞