PHILO-HE commented on PR #10650: URL: https://github.com/apache/incubator-gluten/pull/10650#issuecomment-3274053624
Hi @Zouxxyy, thanks for your work. With the patch below, my local tests show that the build passes successfully in the same Docker environment used by CI. This patch might be similar to the changes you initially proposed. I'm not entirely sure why the CI build failed earlier. I prefer directly setting the environment variable instead of parsing script options. I noticed that Velox automatically uses CMAKE_PREFIX_PATH based on the environment variable, see code [here](https://github.com/facebookincubator/velox/blob/5db2697f1a4e15b4e35a72924f7044ff1926edc0/CMakeLists.txt#L53). Therefore, it doesn't seem necessary to explicitly set it in build_velox.sh. ```diff diff --git a/dev/build_arrow.sh b/dev/build_arrow.sh index 271c1d90c..a54f0a94d 100755 --- a/dev/build_arrow.sh +++ b/dev/build_arrow.sh @@ -23,6 +23,7 @@ source ${CURRENT_DIR}/build_helper_functions.sh VELOX_ARROW_BUILD_VERSION=15.0.0 ARROW_PREFIX=$CURRENT_DIR/../ep/_ep/arrow_ep BUILD_TYPE=Release +INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"} function prepare_arrow_build() { mkdir -p ${ARROW_PREFIX}/../ && pushd ${ARROW_PREFIX}/../ && ${SUDO} rm -rf arrow_ep/ @@ -62,14 +63,14 @@ function build_arrow_cpp() { -DARROW_RUNTIME_SIMD_LEVEL=NONE \ -DARROW_WITH_UTF8PROC=OFF \ -DARROW_TESTING=ON \ - -DCMAKE_INSTALL_PREFIX=/usr/local \ + -DCMAKE_INSTALL_PREFIX=${INSTALL_PREFIX} \ -DCMAKE_BUILD_TYPE=${BUILD_TYPE} \ -DARROW_BUILD_SHARED=OFF \ -DARROW_BUILD_STATIC=ON # Install thrift. cd _build/thrift_ep-prefix/src/thrift_ep-build - ${SUDO} cmake --install ./ --prefix /usr/local/ + ${SUDO} cmake --install ./ --prefix ${INSTALL_PREFIX} popd } @@ -103,7 +104,7 @@ function build_arrow_java() { -Dmaven.test.skip -Drat.skip -Dmaven.gitcommitid.skip -Dcheckstyle.skip -N # Arrow JNI Date Interface CPP libraries - export PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} + export PKG_CONFIG_PATH=${INSTALL_PREFIX}/lib64/pkgconfig${PKG_CONFIG_PATH:+:${PKG_CONFIG_PATH}} mvn generate-resources -Pgenerate-libs-jni-macos-linux -N -Darrow.dataset.jni.dist.dir=$ARROW_INSTALL_DIR \ -DARROW_GANDIVA=OFF -DARROW_JAVA_JNI_ENABLE_GANDIVA=OFF -DARROW_ORC=OFF -DARROW_JAVA_JNI_ENABLE_ORC=OFF \ -Dmaven.test.skip -Drat.skip -Dmaven.gitcommitid.skip -Dcheckstyle.skip -N diff --git a/dev/builddeps-veloxbe.sh b/dev/builddeps-veloxbe.sh index 0eb1a0b2e..34d961e17 100755 --- a/dev/builddeps-veloxbe.sh +++ b/dev/builddeps-veloxbe.sh @@ -159,9 +159,9 @@ do done if [[ "$(uname)" == "Darwin" ]]; then - INSTALL_PREFIX=${INSTALL_PREFIX:-${VELOX_HOME}/deps-install} + export INSTALL_PREFIX=${INSTALL_PREFIX:-${VELOX_HOME}/deps-install} else - INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"} + export INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"} fi function concat_velox_param { ``` -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
