https://kotlinlang.org logo
#ios
Title
# ios
d

darkmoon_uk

02/15/2021, 5:29 AM
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

Yernar Mendigarin

02/15/2021, 7:12 AM
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

darkmoon_uk

02/15/2021, 7:57 AM
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

Yernar Mendigarin

02/15/2021, 7:58 AM
Turning that off, helped me a lot. With that config up, I keep encountering more problems, rather than help.
👍 1
i

Ivan Kubyshkin [JetBrains]

02/15/2021, 8:36 AM
cc @Artyom Degtyarev [JB]
a

Artyom Degtyarev [JB]

02/15/2021, 8:49 AM
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

darkmoon_uk

02/15/2021, 10:13 AM
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

Daniele B

02/16/2021, 11:33 AM
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

darkmoon_uk

02/16/2021, 10:10 PM
@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

Daniele B

02/16/2021, 11:25 PM
@darkmoon_uk thanks!
d

darkmoon_uk

02/16/2021, 11:32 PM
@Daniele B No worries, looks like it was a sneaky breaking change 😛
4 Views