Nabil
12/18/2021, 1:40 AM0.8.0
has been released 🎉 we added support for Kotlin 1.6, M1 Silicon and Dates (via RealmInstant
) full change log hereJohn O'Reilly
12/18/2021, 12:19 PMincompatible architecture (have 'x86_64', need 'arm64e')
)
java.lang.UnsatisfiedLinkError: /Users/joreilly/Library/Caches/io.realm.kotlin/1d98d42d9af8c59bc9cf6ee93d287b442833b592/librealmc.dylib: dlopen(/Users/joreilly/Library/Caches/io.realm.kotlin/1d98d42d9af8c59bc9cf6ee93d287b442833b592/librealmc.dylib, 0x0001): tried: '/Users/joreilly/Library/Caches/io.realm.kotlin/1d98d42d9af8c59bc9cf6ee93d287b442833b592/librealmc.dylib' (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64e')), '/usr/lib/librealmc.dylib' (no such file)
Nabil
12/18/2021, 1:00 PMmacosArm64
target similarly to what we do for ios. This is working for me
val macosTarget: (String, KotlinNativeTarget.() -> Unit) -> KotlinNativeTarget = when {
System.getenv("NATIVE_ARCH")?.startsWith("arm") == true -> ::macosArm64
else -> ::macosX64
}
macosTarget("macos") {}
John O'Reilly
12/18/2021, 1:00 PMJohn O'Reilly
12/18/2021, 1:17 PMjvm
Nabil
12/18/2021, 1:18 PMjvm
should run as usual the x86_64
Shared Object will run via rosetta. Let me push an example where all these targets works so you can double checkJohn O'Reilly
12/18/2021, 1:18 PMNabil
12/18/2021, 1:22 PMMultiplatformDemo
has jvm, macos & iOS https://github.com/realm/realm-kotlin-samples/tree/nh/update_to_v0.8.0/MultiplatformDemoJohn O'Reilly
12/18/2021, 1:41 PMJohn O'Reilly
12/18/2021, 1:42 PMNabil
12/18/2021, 1:46 PMJohn O'Reilly
12/18/2021, 1:48 PM./gradlew :jvmApp:run
(on command line)....maybe related to JDK used?John O'Reilly
12/18/2021, 1:52 PMjava --version
openjdk 11.0.13 2021-10-19 LTS
OpenJDK Runtime Environment Zulu11.52+13-CA (build 11.0.13+8-LTS)
OpenJDK 64-Bit Server VM Zulu11.52+13-CA (build 11.0.13+8-LTS, mixed mode)
Nabil
12/18/2021, 1:52 PMrm -rf ~/Library/Caches/io.realm.kotlin/
this will force unbundling the .so again for the JarNabil
12/18/2021, 1:53 PMjava -version
]java version "11.0.12" 2021-07-20 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.12+8-LTS-237)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.12+8-LTS-237, mixed mode)
realm@administrators-Mac-mini-2 MultiplatformDemo % ]
On Big Sur 11.6.2 (20G314)
John O'Reilly
12/18/2021, 1:55 PM12.1
John O'Reilly
12/18/2021, 1:58 PMJohn O'Reilly
12/18/2021, 1:59 PMNabil
12/18/2021, 1:59 PMNabil
12/18/2021, 2:02 PMJohn O'Reilly
12/18/2021, 2:03 PMNabil
12/18/2021, 2:06 PMJohn O'Reilly
12/18/2021, 2:07 PM