Hi, I’m trying to write a little CLI app in kotli...
# kotlin-native
Hi, I’m trying to write a little CLI app in kotlin-native. I’d like to produce executables to work on all Linux distros and both macOS distros. Obviously I get that the Linux & macOS executables will need to be different, and that the macOS executables will need to be different too. I’ve been reading, and failing to understand, this thread: https://youtrack.jetbrains.com/issue/KT-38876 I think the takeaway is that you can’t build on a particular distro and then reliably shift the resulting executable between all Linux distros because it links to dependencies that may or may not be there - is that correct?
Wondering if I should switch to graalvm’s
, which does produce an executable that works on any Linux distro (I think) when run with
My understanding is that kotlin-native mostly requires glibc (the issue you linked has worarounds), which alpine linux doesn't use to save some space
So it's fine to build on Ubuntu and run on Gentoo for an example because they both use glibc
But if you care about super small docker images like alpine, you'll have go through the workarounds in the issue
Ok, great, I'll just do that then. It's an app designed to be used interactively by someone developing software locally, not really in a minimal docket container.