kou commented on code in PR #39221:
URL: https://github.com/apache/arrow/pull/39221#discussion_r1458138410


##########
ci/scripts/java_jni_build.sh:
##########
@@ -56,8 +55,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_INSTALL_PREFIX=${prefix_dir} \
+\  -DCMAKE_INSTALL_PREFIX=${prefix_dir} \

Review Comment:
   ```suggestion
     -DCMAKE_INSTALL_PREFIX=${prefix_dir} \
   ```



##########
docs/source/developers/java/building.rst:
##########
@@ -271,7 +269,7 @@ CMake
           -DARROW_WITH_ZLIB=ON ^
           -DARROW_WITH_ZSTD=ON ^
           -DCMAKE_BUILD_TYPE=Release ^
-          -DCMAKE_INSTALL_LIBDIR=lib/x86_64 ^
+          -DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^

Review Comment:
   Can we remove this?



##########
ci/scripts/java_jni_manylinux_build.sh:
##########
@@ -91,7 +91,7 @@ cmake \
   -DARROW_S3=${ARROW_S3} \
   -DARROW_USE_CCACHE=${ARROW_USE_CCACHE} \
   -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-  -DCMAKE_INSTALL_LIBDIR=lib \
+  -DARROW_JAVA_JNI_ARCH_DIR=${normalized_arch} \

Review Comment:
   Can we remove this and `normalized_arch` from this script?



##########
docs/source/developers/java/building.rst:
##########
@@ -233,16 +231,16 @@ CMake
           -DARROW_JAVA_JNI_ENABLE_DEFAULT=ON \
           -DBUILD_TESTING=OFF \
           -DCMAKE_BUILD_TYPE=Release \
-          -DCMAKE_INSTALL_LIBDIR=lib/<your system's architecture> \
+          -DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \

Review Comment:
   Can we remove this?



##########
docs/source/developers/java/building.rst:
##########
@@ -186,11 +184,11 @@ CMake
           -DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF ^
           -DBUILD_TESTING=OFF ^
           -DCMAKE_BUILD_TYPE=Release ^
-          -DCMAKE_INSTALL_LIBDIR=lib/x86_64 ^
+          -DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^

Review Comment:
   Can we remove this?



##########
ci/scripts/java_jni_windows_build.sh:
##########
@@ -72,7 +72,7 @@ cmake \
   -DARROW_WITH_SNAPPY=ON \
   -DARROW_WITH_ZSTD=ON \
   -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-  -DCMAKE_INSTALL_LIBDIR=lib \
+  -DARROW_JAVA_JNI_ARCH_DIR=x86_64 \

Review Comment:
   Can we remove this and `normalized_arch` from this script?



##########
ci/scripts/java_jni_macos_build.sh:
##########
@@ -82,7 +82,7 @@ cmake \
   -DARROW_S3=${ARROW_S3} \
   -DARROW_USE_CCACHE=${ARROW_USE_CCACHE} \
   -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} \
-  -DCMAKE_INSTALL_LIBDIR=lib \
+  -DARROW_JAVA_JNI_ARCH_DIR=${normalized_arch} \

Review Comment:
   Can we remove this and `normalized_arch` from this script?



##########
java/CMakeLists.txt:
##########
@@ -74,6 +74,20 @@ if(BUILD_TESTING)
                                                   GTest::gtest_main)
 endif()
 
+# If the user hasn't set ARROW_JAVA_JNI_ARCH_DIR, derive the normalized

Review Comment:
   In general, should the user specify this?
   Can we use auto detection as the recommended approach? If the auto detection 
failed, the user can specify this explicitly as a workaround.



##########
docs/source/developers/java/building.rst:
##########
@@ -288,13 +286,13 @@ CMake
           -DARROW_JAVA_JNI_ENABLE_ORC=ON ^
           -DBUILD_TESTING=OFF ^
           -DCMAKE_BUILD_TYPE=Release ^
-          -DCMAKE_INSTALL_LIBDIR=lib/x86_64 ^
+          -DARROW_JAVA_JNI_ARCH_DIR=x86_64 ^

Review Comment:
   Can we remove this?



##########
java/CMakeLists.txt:
##########
@@ -74,6 +74,20 @@ if(BUILD_TESTING)
                                                   GTest::gtest_main)
 endif()
 
+# If the user hasn't set ARROW_JAVA_JNI_ARCH_DIR, derive the normalized
+# operating system from the host processor.
+if("${ARROW_JAVA_JNI_ARCH_DIR}" STREQUAL "")
+  if("${CMAKE_HOST_SYSTEM_PROCESSOR}" STREQUAL "aarch64")

Review Comment:
   Sorry.
   `CMAKE_SYSTEM_PROCESSOR` 
https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_PROCESSOR.html is 
suitable for this.
   It's the processor for build target.



##########
docs/source/developers/java/building.rst:
##########
@@ -222,7 +220,7 @@ CMake
           -DARROW_SUBSTRAIT=ON \
           -DARROW_USE_CCACHE=ON \
           -DCMAKE_BUILD_TYPE=Release \
-          -DCMAKE_INSTALL_LIBDIR=lib/<your system's architecture> \
+          -DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \

Review Comment:
   Can we remove this?



##########
docs/source/developers/java/building.rst:
##########
@@ -166,12 +165,11 @@ CMake
           -DARROW_JAVA_JNI_ENABLE_DEFAULT=OFF \
           -DBUILD_TESTING=OFF \
           -DCMAKE_BUILD_TYPE=Release \
-          -DCMAKE_INSTALL_LIBDIR=lib/<your system's architecture> \
+          -DARROW_JAVA_JNI_ARCH_DIR=<your system's architecture> \

Review Comment:
   Can we remove this?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to