Open zhongzc opened 2 days ago
simsimd = "4"
can be compiled, but "=5.0.0"
fails
Does it only fail on Android and passes everywhere else?
Does it only fail on Android and passes everywhere else?
Yes
@zhongzc, any chance you could reproduce its build pipeline in an isolated GitHub CI job and add it to prerelease.yml
? In that case I can research the issue and probably fix it 🤗
@zhongzc, any chance you could reproduce its build pipeline in an isolated GitHub CI job and add it to
prerelease.yml
? In that case I can research the issue and probably fix it 🤗
I can reproduce using cargo ndk
, and here is a minimal available case(it need docker to run), more instructions on how to reproduce is in the readme.md
reproduce.zip
Note the docker image it is using is not yet minimal, still working on reduce the docker image to minimal dependency, but hopefully that could be useful enough for now
edited: I found a mininal reproduce case! very strange, I think, it might be a misconfigure in cargo ndk
after all, see more in new README.MD. Basically build with instrumentisto/cargo-ndk
works, but build with saschpe/android-ndk
then install cargo ndk would cause same error, anyway see the new README.md in reproduce_min.zip
!
reproduce_min.zip
More tests show that this is introduced in 5.0.0, it can compile (in the dockerfile image from reproduce_min.zip
) using simsimd="=4.4.0"
but failed with the same error ld: error: undefined symbol: simsimd_l2sq_f64
on simsimd="=5.0.0"
Yes, that part is clear. The older versions didn't use dynamic dispatch in Rust. The new ones seem to work fine with Rust on most platforms, but we may need to find a different approach on Android.
Describe the bug
See https://github.com/GreptimeTeam/greptimedb/issues/5016
I encountered linker errors when trying to build
greptime
for Android (aarch64-linux-android) using cargo ndk. The errors indicate undefined symbols for SIMD functions (e.g., simsimd_cos_f32, simsimd_dot_f32, simsimd_l2sq_f32) from thesimsimd
crate.I'm not familiar with Android. Your guidance will be greatly appreciated if the problem is too simple or troublesome.
Steps to reproduce
Expected behavior
Pass the build.
SimSIMD version
v6.0.5
Operating System
Android
Hardware architecture
Arm
Which interface are you using?
Rust bindings
Contact Details
No response
Are you open to being tagged as a contributor?
.git
history as a contributorIs there an existing issue for this?
Code of Conduct