EDIT: Resolved; this was due to importing `seriali...
# ios
d
EDIT: Resolved; this was due to importing
serialization-core
and not
serialization-json
as the documentation advises 🙃 . 😞 Help needed... Encountering a nasty crash in the compiler/linker in
1.4.30
during either: •
linkDebugFrameworkIosArm64
or •
linkDebugFrameworkIosX64
(
compile
alone, for either platform, succeeds):
Compilation failed: Unbound symbols not allowed
More in thread 👉
Any recommendations for how to debug this link failure? I've run with
--debug
but none of the output seems to indicate an area of my code that's causing the problem (if it even is my code).
y
It might be my guess, but have you turned on hmpp? There might be trouble if you turned that on, while trying to build a framework.
d
I have
kotlin.mpp.enableGranularSourceSetsMetadata=true
yes. It hasn't been a problem until now. I could devolve the configuration into manually configured platform-dependency tree to remove the need for this... but I am not seeing the connection.
y
Turning that off, helped me a lot. With that config up, I keep encountering more problems, rather than help.
👍 1
i
cc @Artyom Degtyarev [JB]
a
Hello, @darkmoon_uk! Do you have a direct dependency on the kotlinx.serialization? I can also recommend using
--info
gradle flag to reveal the compiler arguments.
👍 1
d
It's resolved, thank you for your suggestions @Artyom Degtyarev [JB] and @Ivan Kubyshkin [JetBrains]. I feel rather foolish since it turned out I have dependency on
serialization-core
and not
serialization-json
as advised. However it's interesting that this was working prior to
1.4.30
. Also that the Android target still compiled, only the Native compile broke; though I guess they have totally different dependency linking mechanisms.
d
hi @darkmoon_uk where is that advised? Can you point it out? I just realized in my CommoinMain I am just importing:
Copy code
implementation("org.jetbrains.kotlinx:kotlinx-serialization-core:1.0.1")
so, is that wrong?
d
@Daniele B I was doing the same, but checking https://github.com/Kotlin/kotlinx.serialization, just including
core
doesn't include any serialization method, and this manifest in my first
1.4.30
builds throwing an error about unlinked symbols in the K/N build.
Documentation now advises to include the
-json
artifact alone, to cover the common use case, and this indeed fixed my build.
d
@darkmoon_uk thanks!
d
@Daniele B No worries, looks like it was a sneaky breaking change 😛