lance
lance copied to clipboard
linker errors on arm64(macos m1)
I am trying to use your lib in my project, but I have linker errors:
"_dot_f16", referenced from:
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::fold::h080d748cdf7deb0a in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.03.rcgu.o)
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h746e81f2c7f3050b (.llvm.14035103181559843495) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.09.rcgu.o)
core::iter::traits::iterator::Iterator::advance_by::h750353b719bcffc1 (.llvm.14035103181559843495) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.09.rcgu.o)
core::iter::traits::iterator::Iterator::nth::hea7ee519afa021d0 (.llvm.14035103181559843495) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.09.rcgu.o)
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h241a9f2b31720224 (.llvm.5599426574168741917) in liblance_index-b8c275b537c21ba8.rlib(lance_index-b8c275b537c21ba8.lance_index.6f9ed82d0e9bc5f-cgu.06.rcgu.o)
core::iter::traits::iterator::Iterator::advance_by::hfbca56ea3612e73d (.llvm.5599426574168741917) in liblance_index-b8c275b537c21ba8.rlib(lance_index-b8c275b537c21ba8.lance_index.6f9ed82d0e9bc5f-cgu.06.rcgu.o)
core::iter::traits::iterator::Iterator::nth::hb201e278bfc81459 (.llvm.5599426574168741917) in liblance_index-b8c275b537c21ba8.rlib(lance_index-b8c275b537c21ba8.lance_index.6f9ed82d0e9bc5f-cgu.06.rcgu.o)
...
"_l2_f16", referenced from:
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::hb15835e904d90602 (.llvm.10025790976382166874) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.10.rcgu.o)
core::iter::traits::iterator::Iterator::advance_by::had24c9cacc7c209a (.llvm.10025790976382166874) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.10.rcgu.o)
core::iter::traits::iterator::Iterator::nth::h58ee762c27a277ad (.llvm.10025790976382166874) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.10.rcgu.o)
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::try_fold::h4554b8c0e4ab2a99 in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.03.rcgu.o)
_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h414704e4be8ef32a (.llvm.14035103181559843495) in liblance-84f7e467743007a2.rlib(lance-84f7e467743007a2.lance.7b369cbc9584cb07-cgu.09.rcgu.o)
_$LT$core..iter..adapters..map..Map$LT$I$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::h0a4e1745d83059b7 (.llvm.5599426574168741917) in liblance_index-b8c275b537c21ba8.rlib(lance_index-b8c275b537c21ba8.lance_index.6f9ed82d0e9bc5f-cgu.06.rcgu.o)
_$LT$core..iter..adapters..flatten..FlatMap$LT$I$C$U$C$F$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$::next::hb95d010e575fe310 (.llvm.5599426574168741917) in liblance_index-b8c275b537c21ba8.rlib(lance_index-b8c275b537c21ba8.lance_index.6f9ed82d0e9bc5f-cgu.06.rcgu.o)
...
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)```
Hi, could you provide the version of lance
you are trying to use. Also, steps to reproduce would be helpful.
lance = "=0.9.0" lance-linalg = "=0.9.0" lance-index = "=0.9.0"
hope you see it https://github.com/smallcloudai/refact-lsp/actions/runs/7868826396/job/21466743659
Just to help you with more deta-points for debugging this, we are facing this too at:
https://github.com/tensorlakeai/indexify/actions/runs/7940336554/job/21681480626
Hi @reymondzzzz @rakshith-ravi I believe the GHA runner you are using are both intel macs, which we don't support. Could you try running on macos-14
?
https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
But all packages with cross compile flag are built fine, except lance. Unfortunately, we cannot try macos-14
https://github.com/lancedb/lance/issues/1621 This is relevant.
I've tested the cross compile on an intel mac
cargo build --release --target=aarch64-apple-darwin
it works after https://github.com/lancedb/lance/pull/1979 change
Great, when release?
And release of lancedb? I tried to build on macos-11, macos-12 and macos-13. It didn't build with error https://github.com/reymondzzzz/lance/actions/runs/8052424280 Is it normal?
macos-{11, 12, 13} is on intel CPU macos-14 is Apple silicon only.
We had a release yesterday https://github.com/lancedb/lance/releases/tag/v0.9.19. Does it work for you
crate was not released. https://github.com/lancedb/lance/actions/runs/8043923206
I used git repo in my Cargo.yml and it works. But I don't like this way
macos-{11, 12, 13} is on intel CPU
Cross compile for arm64 with flag --target aarch64-apple-darwin
? Before attaching lance to my project I used cross compile successfully, but lance has some cross compile problems....
@reymondzzzz Did you manage to solve this ?
In case this is useful to someone else...
I first had lance-linalg compile errors ( Mac M1 Max - Sonoma 14.3.1 )
error: failed to run custom build command for lance-linalg v0.10.2
Turns out it crashed on " let rust_toolchain = env::var("RUSTUP_TOOLCHAIN").unwrap(); " in build.rs:18:55
The problem went away when I uninstalled rust & rustup - and started over ( not using brew ) and instead installed using curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh as described on https://www.rust-lang.org/tools/install
No... I switched to macos-14(honestly I didn't know what GH made m1 free) and that's all
Close this as it is resolved by switching GHA runner