Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
treitter opened this issue Dec 11, 2024 · 3 comments

Comments

@treitter
Copy link

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!

@treitter
Copy link
Author

After a lot of effort and asking around on the Kotlin Slack, I finally pieced together a stop-gap solution:

rm -rf ~/.gradle/caches/8.9/transforms//aa9c19370bfe38aa092acebe2995ebfb/transformed/multik-openblas-jvm-0.2.3/linuxX64

It works until I delete ~/.gradle so I probably won't hit it myself for a while (or until I update to the next multik release). But I'd really like a durable solution if possible.

Thanks!

@treitter
Copy link
Author

Actually, I have to delete the file any time I invalidate build caches and will probably happen every time I upgrade multik so it is a little more of a problem than I asserted above.

@treitter
Copy link
Author

After discussion on Slack, it seems the best option for me for now is to just use multik-kotlin as the build for openblas complicates the packaging (and dependency management) for Android and I don't strictly need the highest performance.

This issue still seems valid though so I'll leave it open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant