fix(opensearch) (#6150)

* fix(opensearch)

closes #6148

* catch all instances
This commit is contained in:
Jacob Heider 2024-05-14 21:32:25 -04:00 committed by GitHub
parent 5bbc9e3cc7
commit 277426d258
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -13,19 +13,19 @@ dependencies:
build: build:
dependencies: dependencies:
cmake.org: "*" cmake.org: '*'
git-scm.org: "*" git-scm.org: '*'
gnu.org/wget: "*" gnu.org/wget: '*'
gradle.org: '*' gradle.org: '*'
openjdk.org: ^17 openjdk.org: ^17
gnu.org/gcc: ^12 # for gfortran gnu.org/gcc: ^12 # for gfortran
linux: linux:
# on mac we use the Accelerate framework instead, on linux this is linked statically # on mac we use the Accelerate framework instead, on linux this is linked statically
openblas.net: "*" openblas.net: '*'
script: script:
# there seems to be a loader bug with trying to dlopen libc on macos 12 and earlier. # there seems to be a loader bug with trying to dlopen libc on macos 12 and earlier.
# remove this step when macos 12 and under are no longer supported. # remove this step when macos 12 and under are no longer supported.
- run: | - run: |
sed -i 's|JNAKernel32Library.getInstance();|//JNAKernel32Library.getInstance();|' server/src/main/java/org/opensearch/bootstrap/Bootstrap.java sed -i 's|JNAKernel32Library.getInstance();|//JNAKernel32Library.getInstance();|' server/src/main/java/org/opensearch/bootstrap/Bootstrap.java
if: darwin/x86-64 if: darwin/x86-64
@ -52,6 +52,8 @@ build:
git reset --hard git reset --hard
git submodule foreach --recursive git reset --hard git submodule foreach --recursive git reset --hard
git submodule update --init --recursive git submodule update --init --recursive
git config --global user.email "hello@pkgx.dev"
git config --global user.name "pkgx"
working-directory: k-NN working-directory: k-NN
# workarounds for m1 build. see: https://github.com/opensearch-project/k-NN/blob/main/DEVELOPER_GUIDE.md#extra-setup-for-mac-m1-machines # workarounds for m1 build. see: https://github.com/opensearch-project/k-NN/blob/main/DEVELOPER_GUIDE.md#extra-setup-for-mac-m1-machines
@ -63,17 +65,7 @@ build:
working-directory: k-NN/jni/external working-directory: k-NN/jni/external
- run: | - run: |
IFS=: sed -i -e "s|/usr/local/opt/libomp/|{{deps.openmp.llvm.org.prefix}}/|g" jni/CMakeLists.txt jni/cmake/*.cmake
for p in ${LD_LIBRARY_PATH}; do
if [ -e "${p}/libomp.dylib" ]; then
libomp_path="${p}/.."
break
fi
done
unset IFS
[ -z "${libomp_path}" ] && echo "libomp.dylib not found" && exit 1
sed -i -e "s|/usr/local/opt/libomp/|${libomp_path}/|g" jni/CMakeLists.txt
sed -i -e 's/pragma message WARN/pragma message /g' jni/external/nmslib/similarity_search/src/distcomp_scalar.cc sed -i -e 's/pragma message WARN/pragma message /g' jni/external/nmslib/similarity_search/src/distcomp_scalar.cc
export CC=clang export CC=clang
export CXX=clang++ export CXX=clang++
@ -121,9 +113,9 @@ provides:
test: test:
dependencies: dependencies:
gnu.org/coreutils: ^9 gnu.org/coreutils: ^9
stedolan.github.io/jq: "*" stedolan.github.io/jq: '*'
curl.se: "*" curl.se: '*'
script: script:
- opensearch-plugin list - opensearch-plugin list