This is an automated email from the ASF dual-hosted git repository.
yuanzhou pushed a commit to branch branch-1.2
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/branch-1.2 by this push:
new f7fd53f94 [VL] Port to branch-1.2: Set Arrow_SOURCE to AUTO to allow
using system arrow libs (#6445)
f7fd53f94 is described below
commit f7fd53f9403c3187d5ea15feb5c47eb80fc51631
Author: PHILO-HE <[email protected]>
AuthorDate: Mon Jul 15 08:49:50 2024 +0800
[VL] Port to branch-1.2: Set Arrow_SOURCE to AUTO to allow using system
arrow libs (#6445)
---
cpp/CMake/ConfigArrow.cmake | 17 ++++-------------
dev/build_arrow.sh | 4 ++++
ep/build-velox/src/build_velox.sh | 3 +--
ep/build-velox/src/get_velox.sh | 3 ++-
4 files changed, 11 insertions(+), 16 deletions(-)
diff --git a/cpp/CMake/ConfigArrow.cmake b/cpp/CMake/ConfigArrow.cmake
index e27a3414d..961b4e7a2 100644
--- a/cpp/CMake/ConfigArrow.cmake
+++ b/cpp/CMake/ConfigArrow.cmake
@@ -24,15 +24,14 @@ set(ARROW_BUNDLED_DEPS "arrow_bundled_dependencies")
set(ARROW_INSTALL_DIR "${ARROW_HOME}/install")
set(ARROW_LIB_DIR "${ARROW_INSTALL_DIR}/lib")
set(ARROW_LIB64_DIR "${ARROW_INSTALL_DIR}/lib64")
-set(ARROW_INCLUDE_DIR "${ARROW_INSTALL_DIR}/include")
function(FIND_ARROW_LIB LIB_NAME)
if(NOT TARGET Arrow::${LIB_NAME})
set(ARROW_LIB_FULL_NAME
${CMAKE_SHARED_LIBRARY_PREFIX}${LIB_NAME}${ARROW_STATIC_LIBRARY_SUFFIX})
add_library(Arrow::${LIB_NAME} STATIC IMPORTED)
- # Firstly find the lib from velox's arrow build path. If not found, try to
- # find it from system.
+ # Firstly find the lib from bundled path in Velox. If not found, try to
find
+ # it from system.
find_library(
ARROW_LIB_${LIB_NAME}
NAMES ${ARROW_LIB_FULL_NAME}
@@ -41,15 +40,7 @@ function(FIND_ARROW_LIB LIB_NAME)
message(FATAL_ERROR "Arrow library Not Found: ${ARROW_LIB_FULL_NAME}")
endif()
message(STATUS "Found Arrow library: ${ARROW_LIB_${LIB_NAME}}")
- if(LIB_NAME STREQUAL ${ARROW_BUNDLED_DEPS})
- set_target_properties(
- Arrow::${LIB_NAME} PROPERTIES IMPORTED_LOCATION
- ${ARROW_LIB_${LIB_NAME}})
- else()
- set_target_properties(
- Arrow::${LIB_NAME}
- PROPERTIES IMPORTED_LOCATION ${ARROW_LIB_${LIB_NAME}}
- INTERFACE_INCLUDE_DIRECTORIES ${ARROW_HOME}/install/include)
- endif()
+ set_target_properties(Arrow::${LIB_NAME}
+ PROPERTIES IMPORTED_LOCATION
${ARROW_LIB_${LIB_NAME}})
endif()
endfunction()
diff --git a/dev/build_arrow.sh b/dev/build_arrow.sh
index 897dfcd26..7c5f9b658 100755
--- a/dev/build_arrow.sh
+++ b/dev/build_arrow.sh
@@ -58,6 +58,10 @@ function build_arrow_cpp() {
-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/
popd
}
diff --git a/ep/build-velox/src/build_velox.sh
b/ep/build-velox/src/build_velox.sh
index 747eec3f8..af3c19291 100755
--- a/ep/build-velox/src/build_velox.sh
+++ b/ep/build-velox/src/build_velox.sh
@@ -150,8 +150,7 @@ function compile {
echo "NUM_THREADS_OPTS: $NUM_THREADS_OPTS"
export simdjson_SOURCE=AUTO
- # Quick fix for CI error due to velox rebase
- export Arrow_SOURCE=BUNDLED
+ export Arrow_SOURCE=AUTO
if [ $ARCH == 'x86_64' ]; then
make $COMPILE_TYPE $NUM_THREADS_OPTS EXTRA_CMAKE_FLAGS="${COMPILE_OPTION}"
elif [[ "$ARCH" == 'arm64' || "$ARCH" == 'aarch64' ]]; then
diff --git a/ep/build-velox/src/get_velox.sh b/ep/build-velox/src/get_velox.sh
index ea4ef8dab..493202fca 100755
--- a/ep/build-velox/src/get_velox.sh
+++ b/ep/build-velox/src/get_velox.sh
@@ -111,7 +111,8 @@ function process_setup_ubuntu {
sed -i '/^ run_and_time install_folly/a \ \ export
AZURE_SDK_DISABLE_AUTO_VCPKG=ON \n '${VELOX_HOME}/scripts'/setup-adapters.sh
abfs' scripts/setup-ubuntu.sh
fi
sed -i '/run_and_time install_conda/d' scripts/setup-ubuntu.sh
-
+ # Just depends on Gluten to install arrow libs since Gluten will apply some
patches to Arrow source and uses different build options.
+ sed -i '/run_and_time install_arrow/d' scripts/setup-ubuntu.sh
}
function process_setup_centos8 {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]