-
Notifications
You must be signed in to change notification settings - Fork 125
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
Build failed on MacBook Pro M1 #580
Comments
I don't have a M1 or even a Mac to try this out so I'm largely probing here. You may have already tried this, but did you try the |
I think @heemin32 was facing issues with build on m1 |
I haven't tried to build k-NN. I was having issue with running bwc integTest of OpenSearch. |
@harisalam I dont have M1 mac, but Ill see if I can get access to one. Have you tried:
you might be able to get passed omp failure this way, because gcc toolchain will ship an implementation of omp. This works for me on mac x86 - not sure if itll work on M1. |
After changing -march=native to -mcpu=apple-m1, I see following error.
|
@jmazanec15 I have tried that but still its wasn't able to find omp.h library, then I figured that out by manually passing the location of omp.h library in libomp directory. After that I landed on another error which was related to clang "ld: symbol(s) not found for architecture arm64". |
@heemin32 the solution for that scenario was to comment out pragma errors in CMakeList file. But still it could build the project successfully |
@nknize I have also tried that by following the developer guide, but it wasn't successfully building for the following reasons:
|
|
I also got stuck with the clang error
|
@heemin32 With above changes to the files I have been able to override clang errors, however, build is continuously failing because the mentioned snapshots aren't accessible for some reason. |
@heemin32 @jmazanec15 When I try to access (https://artifacts.opensearch.org/snapshots/core/opensearch/3.0.0-SNAPSHOT/opensearch-min-3.0.0-SNAPSHOT-darwin-arm64-latest.tar.gz) using https it throws me an error "Access Denied". Are there any bugs in the new release which is causing this issue? |
OpenSearch 3.0.0 distribution for mac does not exist in the public url. You can lower the version of k-NN to 2.3.0 which will use OpenSearch 2.3.0 release. Or, you can build your own OpenSearch distribution and use it as follow.
@harisalam Please kindly share if you are able to build k-NN in M1 processor after following the steps. |
@heemin32 can you check if darwin arm64 snapshot is present or not? |
The workaround mentioned above works for me on the 2023 M2 Pro and I also had the issue with the missing darwin-arm64 on 'integTest' which was resolved using the customDistributionUrl trick. Thanks! |
I can build k-nn, but I can't install in in my local repo. I get this error:
|
Hi everyone, how can you guys fix this issue? I followed the instructions by @heemin32 but found the issue of cannot find omp.h:
|
@ryanbogan can you help here.. you recently work on k-nn with M1 chip |
@TrungBui59 Install clang using brew
|
You can download the Darwin snapshot |
Closing it in favor of #1302 |
Updated:
Please follow this to build k-NN in M1 for now to unblock yourself. Better process should be implemented still.
OpenSearch 3.0.0 distribution for mac does not exist in the public url. You can lower the version of k-NN to 2.3.0 which will use OpenSearch 2.3.0 release. Or, you can build your own OpenSearch distribution and use it as follow.
$> cd OpenSearch && ./gradlew assemble && ./gradlew localDistro
$> ./gradlew <integTest/run> -PcustomDistributionUrl="<Full path to .tar.gz file you noted above>"
With default setting of Make file I was getting the following error:
clang: error: the clang compiler does not support '-march=native'
Then someone from the community also experience an issue with this and solution was provided by changing -march=native to -mcpu=apple-a14, but that landed me on another issue which is omp.h not found. After researching for quite a long time I found out this error is caused of clang incompatibility on apple-m1.
FAILURE: Build failed with an exception.
Execution failed for task ':buildJniLib'.
The text was updated successfully, but these errors were encountered: