Open snej opened 11 months ago
OK, there is a HomeBrew package for faiss
, and while it was installing, I saw openmpc as a dependency being installed.
However, afterwards make loadable
still fails in the same way.
By using the test.yaml workflow as a cheat sheet I was able to get it to work. It's basically:
brew install llvm libomp # for some reason this step is missing from build-macos-aarch64-extension, but it's in x86
make patch-openmp
export CC=/opt/homebrew/opt/llvm/bin/clang
export CXX=/opt/homebrew/opt/llvm/bin/clang++
export CPPFLAGS=-I/opt/homebrew/include
export LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/libomp/lib"
make loadable static
It doesn't seem like LLVM's Clang should be required, instead of the one from Apple's dev tools, but if I don't set CC and CXX the build fails as I originally reported. Probably something to do with search paths, but adding CFLAGS=-I/opt/homebrew/include
doesn't help.
Trying to build on my MacBook Pro with M1 Pro CPU, macOS 13.4.1. I get as far as
make loadable
.Looks like faiss expects the library OpenMP to be installed. HomeBrew doesn't seem to have it; the closest-named formulae are
libopenmpt
andopen-mpi
, neither of which are correct. The OpenMP website has a long list of tools and I have no idea which is relevant.