tf-encrypted / moose

Secure distributed dataflow framework for encrypted machine learning and data processing
Apache License 2.0
56 stars 15 forks source link

Fix OpenBLAS when installed via Homebrew #1125

Closed mortendahl closed 2 years ago

mortendahl commented 2 years ago

Closes https://github.com/tf-encrypted/moose/issues/1122

This PR makes OpenBLAS work on macOS, including Apple M1 chips. It makes the assumption that OpenBLAS has been installed using brew install openblas, which doesn't include OpenBLAS in the default linker path, hence this fix:

$ brew install openblas

openblas is keg-only, which means it was not symlinked into /opt/homebrew,
because macOS provides BLAS in Accelerate.framework.

For compilers to find openblas you may need to set:
  export LDFLAGS="-L/opt/homebrew/opt/openblas/lib"
  export CPPFLAGS="-I/opt/homebrew/opt/openblas/include"

This PR also removes the blas feature since this was only introduced to make compiling on macOS easier.