From aef2d260763446e3a7f2ae760d7c17f16cf921ca Mon Sep 17 00:00:00 2001 From: gaobinlong Date: Sat, 18 Nov 2023 02:55:43 +0800 Subject: [PATCH] Add more description about running OpenSearch on MAC M1 to developer guide (#1302) * Add more description about running OpenSearch on MAC M1 to developer guide Signed-off-by: gaobinlong * Change some wording Signed-off-by: gaobinlong --------- Signed-off-by: gaobinlong --- DEVELOPER_GUIDE.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/DEVELOPER_GUIDE.md b/DEVELOPER_GUIDE.md index 582041e1d..cbfaf0f4c 100644 --- a/DEVELOPER_GUIDE.md +++ b/DEVELOPER_GUIDE.md @@ -127,6 +127,13 @@ Next, obtain a minimum distribution tarball of the k-NN version you want to buil 4. You should see a opensearch-min--SNAPSHOT-darwin-x64.tar.gz file present in distribution/archives/darwin-tar/build/distributions/ 5. Build k-NN by passing the OpenSearch distribution path in `./gradlew -PcustomDistributionUrl=""` +If you want to start OpenSearch directly on Mac M1, make sure to use JDK for ARM. Otherwise, you will see the following error: `mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')`. It is better to start OpenSearch by running `bash opensearch-tar-install.sh` instead of `./bin/opensearch`. To run `./bin/opensearch`, the environment variable `JAVA_LIBRARY_PATH` needs to be set correctly so that OpenSearch can find the JNI library: + +``` +export OPENSEARCH_HOME=the directory of opensearch... +export JAVA_LIBRARY_PATH=$JAVA_LIBRARY_PATH:$OPENSEARCH_HOME/plugins/opensearch-knn/lib +``` + #### Environment Currently, the plugin only supports Linux on x64 and arm platforms.