-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
swigfaiss.so incompatible with mac arm64 #2432
Comments
you mean you are cross-compiling by accident? |
No, I want to build Faiss on my MBP(arm infra.),but meet problems on the python interface, where the makefile can only generate swigfaiss.so rather than "swigfaiss.dylib". |
So this is not a problem with arm64 , but a problem on macOS with arm64 . I install and develop faiss on Linux with arm64. Then, how did you install |
You are right! I have changed the title by adding "mac". |
Hmm, it seems that current homebrew has prebuilt swig for apple silicon, so swig probably works correctly. Of course your homebrew is for arm64, not for x86_64, right? |
Yes, my homebrew is for arm64. % swig -version SWIG Version 4.0.2 Compiled with clang++ [arm-apple-darwin21.1.0] Configured options: +pcre |
@CaucherWang Hmm... some people had succeeded to build faiss on M1 Mac like #2111 and #2386, so it should be able, but actually I have no mac environment, so I can't any check at my own... Would you show me your CMake command and log? |
Summary
swigfaiss.so cannot be read by arm infrastructure, like Apple M1
Platform
OS: macOS 12.5
Installed from: compiled from source
Faiss compilation options: --without-cuda
Running on:
Interface:
Reproduction instructions
at python/Makefile, I only have the rule to generate swigfaiss.so, despite in arm64 infra.
when I try to import faiss:
ImportError: dlopen(
/faiss-learned-termination/python/faiss/_swigfaiss.so, 0x0002): tried: '/faiss-learned-termination/python/faiss/_swigfaiss.so' (mach-o file, but is an incompatible architecture (have (arm64), need (x86_64)))The text was updated successfully, but these errors were encountered: