Skip to content
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

Compilation issue with -march=native on macOS #482

Open
LucasZacarias opened this issue Jul 15, 2023 · 2 comments
Open

Compilation issue with -march=native on macOS #482

LucasZacarias opened this issue Jul 15, 2023 · 2 comments

Comments

@LucasZacarias
Copy link

LucasZacarias commented Jul 15, 2023

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.

@yurymalkov
Copy link
Member

Can you try pip install git+https://github.com/nmslib/hnswlib.git@develop?

@bjornslib
Copy link

Just want to say thank you for providing this response. I experienced the exact same issue as the original poster and it resolved it. Hours of troubleshooting saved!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants