hnswlib icon indicating copy to clipboard operation
hnswlib copied to clipboard

Compilation issue with -march=native on macOS

Open LucasZacarias opened this issue 1 year ago • 2 comments

Hello, I am trying to install hnswlib on a macOS environment using pip3, but I'm experiencing a compilation problem. Here is the command I'm using and the output I receive:

pip3 install hnswlib

And the output is:

` Building wheel for hnswlib (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for hnswlib (pyproject.toml) did not run successfully. │ exit code: 1 clang: error: the clang compiler does not support '-march=native' error: command '/usr/bin/clang' failed with exit code 1 `

It appears that the clang compiler on my system does not support the -march=native option, which is causing the compilation failure. Is there a way to avoid using -march=native during the build, or is there another workaround I could try to install hnswlib on my system?

System details:

Operating System: macOS Big Sur 11.7.7 Python Version: 3.11 .2 Pip Version: 23.2 Clang Version: 13.0.0 Thank you for your help.

LucasZacarias avatar Jul 15 '23 13:07 LucasZacarias