Planeshifter / node-word2vec

Node.js interface to the Google word2vec tool.
Apache License 2.0
348 stars 55 forks source link

clang: error: the clang compiler does not support '-march=native' (Apple M1) #26

Closed ArturLoss closed 1 year ago

ArturLoss commented 2 years ago

Thanks for your effort, but when I try to do a "npm install word2vec", I get an error, as mentioned in the title of the issue: "clang: error: the clang compiler does not support '-march=native'". I also have a computer with an Apple M1 chip, a MacBook Air (M1, 2020). I was trying to figure it out, but it ended up not being so straightforward for me. Could you please give me a hint to help me solve this? Thanks!

ArturLoss commented 1 year ago

The solution was to use Rosetta 2. I had to install Rosetta 2 using a tutorial from "https://machow2.com/rosetta-mac/", or another similar one, I don't remember. Then I had to enable Rosetta 2. Tutorial from "https://www.youtube.com/watch?v=9W8rTTE1WEA&ab_channel=SunilYadav" really helped. After I did that everything worked perfectly.

ArturLoss commented 1 year ago

I am closing this issue because the problem was solved.