From 28a4068e865dad5deef37028c39b32758723f6f5 Mon Sep 17 00:00:00 2001 From: James Duong Date: Fri, 12 Jan 2024 14:36:33 -0800 Subject: [PATCH] Attempt to fix the JNI library output directories in CI --- ci/scripts/java_jni_build.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/ci/scripts/java_jni_build.sh b/ci/scripts/java_jni_build.sh index 320c98c04df1e..6534ea74b0cde 100755 --- a/ci/scripts/java_jni_build.sh +++ b/ci/scripts/java_jni_build.sh @@ -24,6 +24,18 @@ arrow_install_dir=${2} build_dir=${3}/java_jni # The directory where the final binaries will be stored when scripts finish dist_dir=${4} +normalized_arch=$(arch) +case ${normalized_arch} in + aarch64) + normalized_arch=aarch_64 + ;; + i386) + normalized_arch=x86_64 + ;; + arm64) + normalized_arch=aarch_64 + ;; + esac prefix_dir="${build_dir}/java-jni" @@ -56,7 +68,7 @@ cmake \ -DBUILD_TESTING=${ARROW_JAVA_BUILD_TESTS} \ -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \ -DCMAKE_PREFIX_PATH=${arrow_install_dir} \ - -DCMAKE_INSTALL_LIBDIR=lib \ + -DCMAKE_ARCH_DIR=${normalized_arch} \ -DCMAKE_INSTALL_PREFIX=${prefix_dir} \ -DCMAKE_UNITY_BUILD=${CMAKE_UNITY_BUILD:-OFF} \ -DProtobuf_USE_STATIC_LIBS=ON \