This is an automated email from the ASF dual-hosted git repository.
mingliang pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 34822bc826 [GLUTEN-10155][INFRA] Fix build on macOS (#10158)
34822bc826 is described below
commit 34822bc8264ab841f20d99b90592baac926bf76f
Author: Mingliang Zhu <[email protected]>
AuthorDate: Thu Jul 17 22:43:37 2025 +0800
[GLUTEN-10155][INFRA] Fix build on macOS (#10158)
---
dev/build_arrow.sh | 16 ++++++++++++----
dev/build_helper_functions.sh | 1 +
dev/builddeps-veloxbe.sh | 20 ++++++++------------
3 files changed, 21 insertions(+), 16 deletions(-)
diff --git a/dev/build_arrow.sh b/dev/build_arrow.sh
index ebee940ccb..b68bcd4af7 100755
--- a/dev/build_arrow.sh
+++ b/dev/build_arrow.sh
@@ -35,9 +35,17 @@ function prepare_arrow_build() {
}
function build_arrow_cpp() {
- pushd $ARROW_PREFIX/cpp
-
- cmake_install \
+ pushd $ARROW_PREFIX/cpp
+ ARROW_WITH_ZLIB=ON
+ # The zlib version bundled with arrow is not compatible with clang 17.
+ # It can be removed after upgrading the arrow version.
+ if [[ "$(uname)" == "Darwin" ]]; then
+ clang_major_version=$(echo | clang -dM -E - | grep __clang_major__ | awk
'{print $3}')
+ if [ "${clang_major_version}" -ge 17 ]; then
+ ARROW_WITH_ZLIB=OFF
+ fi
+ fi
+ cmake_install \
-DARROW_PARQUET=OFF \
-DARROW_FILESYSTEM=ON \
-DARROW_PROTOBUF_USE_SHARED=OFF \
@@ -46,7 +54,7 @@ function build_arrow_cpp() {
-DARROW_WITH_THRIFT=ON \
-DARROW_WITH_LZ4=ON \
-DARROW_WITH_SNAPPY=ON \
- -DARROW_WITH_ZLIB=ON \
+ -DARROW_WITH_ZLIB=${ARROW_WITH_ZLIB} \
-DARROW_WITH_ZSTD=ON \
-DARROW_JEMALLOC=OFF \
-DARROW_SIMD_LEVEL=NONE \
diff --git a/dev/build_helper_functions.sh b/dev/build_helper_functions.sh
index 882c3734e8..189824bdb3 100644
--- a/dev/build_helper_functions.sh
+++ b/dev/build_helper_functions.sh
@@ -141,6 +141,7 @@ function cmake_install {
}
function setup_macos {
+ sed -i '' '/run_and_time install_arrow/d' scripts/setup-macos.sh
if [ $ARCH == 'x86_64' ]; then
./scripts/setup-macos.sh
elif [ $ARCH == 'arm64' ]; then
diff --git a/dev/builddeps-veloxbe.sh b/dev/builddeps-veloxbe.sh
index 876ab96897..a5fdca73c3 100755
--- a/dev/builddeps-veloxbe.sh
+++ b/dev/builddeps-veloxbe.sh
@@ -44,11 +44,10 @@ ENABLE_ENHANCED_FEATURES=OFF
RUN_SETUP_SCRIPT=ON
VELOX_REPO=""
VELOX_BRANCH=""
-VELOX_HOME=""
+VELOX_HOME="$GLUTEN_DIR/ep/build-velox/build/velox_ep"
VELOX_PARAMETER=""
BUILD_ARROW=ON
SPARK_VERSION=ALL
-INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"}
# set default number of threads as cpu cores minus 2
if [[ "$(uname)" == "Darwin" ]]; then
@@ -169,6 +168,12 @@ do
esac
done
+if [[ "$(uname)" == "Darwin" ]]; then
+ INSTALL_PREFIX=${INSTALL_PREFIX:-${VELOX_HOME}/deps-install}
+else
+ INSTALL_PREFIX=${INSTALL_PREFIX:-"/usr/local"}
+fi
+
function concat_velox_param {
# check velox repo
if [[ -n $VELOX_REPO ]]; then
@@ -251,12 +256,7 @@ function build_gluten_cpp {
-DENABLE_ENHANCED_FEATURES=$ENABLE_ENHANCED_FEATURES"
if [ $OS == 'Darwin' ]; then
- if [ -n "$INSTALL_PREFIX" ]; then
- DEPS_INSTALL_DIR=$INSTALL_PREFIX
- else
- DEPS_INSTALL_DIR=$VELOX_HOME/deps-install
- fi
- GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=$DEPS_INSTALL_DIR"
+ GLUTEN_CMAKE_OPTIONS+=" -DCMAKE_PREFIX_PATH=$INSTALL_PREFIX"
fi
cmake $GLUTEN_CMAKE_OPTIONS ..
@@ -276,10 +276,6 @@ function build_velox_backend {
./get_velox.sh $VELOX_PARAMETER
)
-if [ "$VELOX_HOME" == "" ]; then
- VELOX_HOME="$GLUTEN_DIR/ep/build-velox/build/velox_ep"
-fi
-
OS=`uname -s`
ARCH=`uname -m`
DEPENDENCY_DIR=${DEPENDENCY_DIR:-$CURRENT_DIR/../ep/_ep}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]