-
Notifications
You must be signed in to change notification settings - Fork 22
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
dlopen failed: cannot locate symbol "__cxa_pure_virtual" #28
Comments
Should we give up linking with c++ stdlib by default? |
I think it is more appropriate to consider adding a c++ stdlib feature on the ndk side |
@imxood Note that |
I think we have to make this by default. Because we also managed to run an android app only after linking to c++ stdlib. |
It surprised me that the same build works on Android 10 but not on 11 & 12 (symbol Turning on the feature oboe = { version = "0.5", features = ["shared-stdcxx"] } I wrote the following Gradle script to copy tasks.register("copyCppSharedLibrary") {
val src = android.ndkDirectory
.resolve("toolchains/llvm/prebuilt")
.listFiles()
.first { it.isDirectory }
.resolve("sysroot/usr/lib/aarch64-linux-android")
val dst = layout.buildDirectory.dir("rustJniLibs/android/arm64-v8a")
copy {
from(src)
into(dst)
include("libc++_shared.so")
}
}.configure {
dependsOn("cargoBuild")
} Note that it only copy the aarch64 version. |
This is a continuation of #14
I originally filed this same issue in cpal because I tried using cpal android example, as well as the oboe demo in this repository.
I even tried using the prebuilt oboe-demo in the releases (the latest one, 0.4.1), and i am still getting that error where the __cxa_pure_virtual is not found. More details here:
RustAudio/cpal#563
The text was updated successfully, but these errors were encountered: