kotlinx-datetime icon indicating copy to clipboard operation
kotlinx-datetime copied to clipboard

No support for linuxArm32Hfp as a target for Kotlin/Native

Open v79 opened this issue 5 years ago • 2 comments

I notice that there's no support for ARM linux platforms in kotlinx-datetime (a common problem across K/N projects, sadly!).

Specifically, I am writing for the Raspberry Pi (linuxArm32Hfp) and it's not listed as a valid target. All I've found are:

kotlinx-datetime-iosarm32/ kotlinx-datetime-iosarm64/ kotlinx-datetime-iosx64/ kotlinx-datetime-js/ kotlinx-datetime-jvm/ kotlinx-datetime-linuxx64/ kotlinx-datetime-macosx64/ kotlinx-datetime-metadata/ kotlinx-datetime-mingwx64/ kotlinx-datetime-tvosarm64/ kotlinx-datetime-tvosx64/ kotlinx-datetime-watchosarm32/ kotlinx-datetime-watchosarm64/ kotlinx-datetime-watchosx86/ kotlinx-datetime/

Are there likely to be any major challenges in just duplicating the codebase from kotlinx-datetime-linuxx64 and recompiling? Is that something I could help with?

v79 avatar Nov 29 '20 17:11 v79

I prepared a local build for my Raspberry Pi 4, and it just worked. I added:

kotlin {
    infra {
        target("linuxArm32Hfp")
  }
}

To build.gradle.kts and executed gradle clean publishLinuxArm32HfpPublicationToMavenLocal. I could then add it to my project, compile it (in Windows) and deploy it to the Pi. The code works, so version 0.2.0-SNAPSHOT looks good to add linuxArm32Hfp as a supported target.

v79 avatar Dec 01 '20 21:12 v79

Yeah, it would make sense to provide builds for some other targets. The main problem is infrastructural: we don't have automated testing for linuxArm yet. The code probably works as is, but we are not going to publish it until we have a working CI. Not having CI (especially for some platforms while other platforms do have it!) can lead to nightmarish subtle problems due to human errors, and as an official library, we have additional responsibility. We are just not going to risk it.

That said, there are some good news: an active discussion of this problem is underway. A public-facing issue where you can track progress can be found here: https://youtrack.jetbrains.com/issue/KT-43996

dkhalanskyjb avatar Dec 21 '20 10:12 dkhalanskyjb

Alas, the linuxArm32Hfp target is deprecated: https://kotlinlang.org/docs/native-target-support.html#deprecated-targets There's nothing we can do in this library to work around that.

dkhalanskyjb avatar Mar 15 '23 11:03 dkhalanskyjb