You are currently viewing Compiling Kotlin Coroutines for Linux Arm

Compiling Kotlin Coroutines for Linux Arm

I was very frustrated to find out that a big app I’d already written and converted to Kotlin Native won’t work on Raspberry Pi only because one dependency, Coroutines, doesn’t have a build target preset for LinuxArm64 (even though K/N itself and other libraries like Kotlinx.Serialization do).

The team leader says it can be done by building from sources:

But uh… how do you do that? I have a RPi4 with IDEA on it that I can use a host machine compiler. I’ve been in sources and gradles and all the things in the past few weeks and I’m going out of my mind trying to figure out how to do this.

(Background: I’ve been working on a self driving boat for the past 3 years- yes, a real one, not an RC toy, and yes, it works- and I wrote the original controller app for Android Things on Rpi3, but Android Things is gone and, on the boat, I built the entire hardware, soldering, wire harnesses, and waterproof containers to sizes that fit the Rpi3/4 board perfectly. It would be really devastating to have to re-rig all that for a different sized board and having to rewrite the entire codebase without coroutines would be basically like starting over. So. Compiling coroutines for this architecture is really ideal).

submitted by /u/Fair_Communication_4
[link] [comments]