Hi, I am getting the following error when compilin...
# kotlin-native
t
Hi, I am getting the following error when compiling for watchosX86 with Kotlin 1.3.70:
Copy code
fatal error: error in backend: Section too large, can't encode r_address (0x10022e9) into 24 bits of scattered relocation entry.
Does anyone know what this means? It only happens for the simulator. If I build for watchosArm64 there are no issues. Also when I build in release mode the issue is gone. https://kotlinlang.slack.com/archives/C3SGXARS6/p1578922829122300?thread_ts=1578912211.116800&cid=C3SGXARS6
a
Hello, @Thomas! Thanks for the report, now we managed to reproduce the error. It seems that for some reason the compiler works incorrectly for the x86 architecture when the code is big enough. As the release build is thinner, it manages to work. For now, there is no good advice on the issue, just try to minimize the code size. Also, you look through and upvote the YT issue here.
t
Hi @Artyom Degtyarev [JB], good to hear you were able to reproduce it.
there is no good advice on the issue, just try to minimize the code size.
Are you talking about code size for a single .kt file or the total app size? If it is a for a single file, is there a way to find the file that is "too large"? My project is quite big and has many files.
a
Total app size, AFAIK. There is some problem with generated bitcode amount, so cutting all unused code would make sense as a workaround. But, I cannot estimate an exact amount of code that should work. If there is nothing to save on, probably the best option will be to avoid debug binaries use until the fix arrives.
👍 1