dlopen failed: cannot locate symbol
inferrna opened this issue · 7 comments
Each error in android log starts with "Load libary ERROR: java.lang.UnsatisfiedLinkError: dlopen failed: cannot locate symbol ..." so I skip it. But with different option lost symbol is also different:
- No feature
"_ZN4oboe30AudioStreamBuilder_setCallbackEPNS_18AudioStreamBuilderEPNS_26AudioStreamCallbackWrapperE"
features = ["compile-library", "static-link"]
"_ZN4oboe26AudioStreamCallbackWrapper10setContextEPv"
features = ["static-link"]
"_ZN4oboe30AudioStreamBuilder_setCallbackEPNS_18AudioStreamBuilderEPNS_26AudioStreamCallbackWrapperE"
features = ["compile-library"]
"_ZN4oboe23AudioStream_requestStopEPNS_11AudioStreamE"
My android app based on https://github.com/Dushistov/rust_swig crate. I just added your "play sine" example to it's example app and got the same error. Can you please look on it?
https://github.com/inferrna/rust_swig - to build it disable features = ["generate-bindings"]
in Cargo.toml
I just found that there is no build.rs file in oboe-sys from crates.io. Very possible it's the reason.
Can you test current version from this repo?
Unfortunately I have similar issue (oboe::flowgraph::MultiToMonoConverter::MultiToMonoConverter(int)
):
Unable to load native library "/data/app/rust.oboe_demo-Oy18rWKbgxhoabtxhXaTPQ==/lib/arm64/liboboe_demo.so": dlopen failed: cannot locate symbol "_ZN4oboe9flowgraph20MultiToMonoConverterC1Ei" referenced by "/data/app/rust.oboe_demo-Oy18rWKbgxhoabtxhXaTPQ==/lib/arm64/liboboe-ext.so
When static linking is used I have another unresolved symbol (std::__ndk1::__shared_weak_count::lock()
):
Unable to load native library "/data/app/rust.oboe_demo-1UsbLwVJVHU0vrkEAzLqNQ==/lib/arm64/liboboe_demo.so": dlopen failed: cannot locate symbol "_ZNSt6__ndk119__shared_weak_count4lockEv" referenced by "/data/app/rust.oboe_demo-1UsbLwVJVHU0vrkEAzLqNQ==/lib/arm64/liboboe_demo.so"