Kotlin / Kotlin/multik

build error: libmultik_jni-linuxX64.so is not an ABI even though I'm not building for that target

Open
#214 5 comments 3 reactions 0 assignees View on GitHub
bug platform:android
Dominant language
Kotlin
Stars
734
Forks
51
Avg merge
9h 52m
Merged PRs (30d)
6

Description

Hi, I'm currently hitting this error when trying to build my Android app (for an arm64 emulator) on macOS:

```
Cause: multik-openblas-jvm-0.2.3 extracted from path ~/.gradle/caches/8.9/transforms/4d3515c442b573850b7bc131f7841f9c/transformed/multik-openblas-jvm-0.2.3/linuxX64/libmultik_jni-linuxX64.so is not an ABI
```

That file exists (as does the `libmultik_jni-androidArm64.so` version it seems is actually relevant) but I'm not building on Linux nor do I define `linuxX64` anywhere in my config.

I can build and run my `commonTest` test cases which indirectly depend upon `multik-core` and `multik-default`.

I've got the following in my `build.gradle.kts`:

```
kotlin {
androidTarget {
publishAllLibraryVariants()
}

iosArm64 {
config("iphoneos")
}
iosSimulatorArm64 {
config("iphonesimulator")
}

sourceSets {
commonMain.dependencies {
...
implementation("org.jetbrains.kotlinx:multik-core:0.2.3")
implementation("org.jetbrains.kotlinx:multik-default:0.2.3")
}

commonTest.dependencies {
implementation(libs.kotlin.test)
}

androidMain.dependencies {
...
}

iosMain.dependencies {
...
}
}
...
}
```

Do I have a mistake in my `build.gradle.kts`? Can I / do I need to somehow explicitly exclude `linuxX64` or that `.so` file?

Thanks!

Contributor guide

Open the contributing guide

Research direction

Start with build.gradle.kts and the commonMain dependency declarations, then reproduce the Android arm64 build while inspecting resolution of multik-openblas-jvm:0.2.3 and its linuxX64 and androidArm64 native libraries. Done means the Android build no longer treats libmultik_jni-linuxX64.so as an Android ABI while retaining the relevant androidArm64 library.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.