https://kotlinlang.org logo
#kotlin-native
Title
# kotlin-native
e

Edward Muller

02/18/2023, 8:09 PM
Hello. I am trying to build an aarch64 native app, but gradle seems to think I’m on x64 platform. What am I missing?
e

ephemient

02/18/2023, 8:11 PM
what indicates that Gradle thinks you're on x64?
stufff like that
every dep I watched it download that said macOS-{arch} indicated
x64
also
e

ephemient

02/18/2023, 8:13 PM
are you running Gradle with an arm64 or amd64 JVM
e

Edward Muller

02/18/2023, 8:13 PM
Copy code
kotlin {
    val nativeTarget = macosArm64("native")
    println(arch)
...
}
outputs....
> Configure project :
x86_64
I’m doing so inside of intellij
Screenshot 2023-02-18 at 12.14.07 PM.png
e

ephemient

02/18/2023, 8:15 PM
that's not necessarily the same as the JVM that Gradle is using
e

Edward Muller

02/18/2023, 8:18 PM
Copy code
/usr/bin/java --version
openjdk 17.0.1 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+12-39)
OpenJDK 64-Bit Server VM (build 17.0.1+12-39, mixed mode, sharing)
I think its this java … no idea what arch that is, so probably need to assume x64
Copy code
/usr/libexec/java_home -V
Matching Java Virtual Machines (2):
    17.0.1 (x86_64) "Oracle Corporation" - "OpenJDK 17.0.1" /Users/freeformz/Library/Java/JavaVirtualMachines/openjdk-17.0.1/Contents/Home
yep
thx
48 Views