I have an issue with `Undefined symbols for archit...
# kotlin-native
I have an issue with
Undefined symbols for architecture x86_64
in a KMM project based on https://github.com/Kotlin/kmm-sample/blob/master/README.md. The ios framework (
) only fails to link when disabling caching with
(or if using Gradle composite builds for the dependencies), but works when using the cache when consuming the dependencies from a Maven repository. The unresolved symbols are defined as custom declarations in a cinterop-wrapper’s def-file and used by static libraries in the dependent module. The klibs passed to konanc seems right and the klibs seems to contain the right symbols in the
. The only difference on the konanc command line when it works (i.e. without
) is a couple of additional
entries, that indeed contains archives containing the symbols. I have tried getting details from the linking phase (by various `freeCompilerArgs`/ `linker-option`s) without luck. Any idea on how to get insight in the linker invocation through konanc or any known limitations/issues around linking against custom declarations in a module’s? The project is available at https://github.com/realm/realm-kotlin/tree/master/examples/kmm-sample
Hello, @Claus Rørbech! To get some insights about the konanc linking, one can try using
compiler argument.
Thanks, that seems to print the
invocation too. I will try to decipher the outputs and see if it raises any questions.
It looks like only the static libraries of the dependencies klibs are passed to the linker and not the
(in any form). I created https://youtrack.jetbrains.com/issue/KT-44447 with steps to reproduce
🙏 1