Kotlin native: getting "unknown host target: linux aarch64" on Raspberry PI 3B Ubuntu 21.04 aarch64

Hello, I’m a bit new to Kotlin Native. I have a very simple example project set up using Gradle as the build system. I’m using the following build.gradle.kts script:

plugins {
    kotlin("multiplatform") version "1.5.30"

defaultTasks("clean", "build")

repositories {

kotlin {
    val nativeTarget = linuxArm64("native")

    nativeTarget.apply {
        binaries {
            executable {
                entryPoint = "main"
    sourceSets {
        val nativeMain by getting
        val nativeTest by getting

Building the script above with Gradle 7.2 on Raspberry PI 3B aarch64 with Ubuntu 21.04 fails with:

java.lang.ExceptionInInitializerError (no error message)
> Unknown host target: linux aarch64

Does it mean that ARM64 is not supported by Kotlin Native at this moment please?

I see, most probably it’s not supported yet: https://youtrack.jetbrains.com/issue/KT-36871

Yes, Kotlin-Native doesn’t support arm64 host machine at the moment. Quoting https://youtrack.jetbrains.com/issue/KT-42445:

Unfortunately, this is not a valid host machine. As described in the documentation or Kotlin/Native Github release notes, Linux targets except linuxMips32 and linuxMipsel32 should be available on macOS, Linux x86-64 and Windows hosts.

Indeed, compiling arm64 binary on x86-64 machine, then copying the binary to RPI and running it there works.