This is an automated email from the ASF dual-hosted git repository.
zhouyuan pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gluten.git
The following commit(s) were added to refs/heads/main by this push:
new 247622e7a5 [MINOR][VL] Refine ccache installation in dev script
(#13118)
247622e7a5 is described below
commit 247622e7a583c846655bdee816124dea16eac65c
Author: Yuan <[email protected]>
AuthorDate: Fri Sep 25 09:35:42 2026 +0100
[MINOR][VL] Refine ccache installation in dev script (#13118)
---
.../Dockerfile.almalinux8-gcc13-static-build | 8 +++-
dev/vcpkg/setup-build-depends.sh | 49 ++++++++++++++++++++--
ep/build-velox/src/setup-centos8.sh | 23 +++++++++-
ep/build-velox/src/setup-openeuler24.sh | 23 +++++++++-
4 files changed, 93 insertions(+), 10 deletions(-)
diff --git a/dev/docker/Dockerfile.almalinux8-gcc13-static-build
b/dev/docker/Dockerfile.almalinux8-gcc13-static-build
index 3c229157f9..cee3d40e94 100644
--- a/dev/docker/Dockerfile.almalinux8-gcc13-static-build
+++ b/dev/docker/Dockerfile.almalinux8-gcc13-static-build
@@ -40,8 +40,6 @@ RUN set -ex; \
# AlmaLinux 8 repos are live — no mirror fixup needed. \
dnf update -y; \
dnf install -y epel-release sudo; \
- # ccache is in EPEL — install after epel-release is registered. \
- dnf install -y ccache; \
# gcc-toolset-13 ships GCC 13 on RHEL8-family via Red Hat Software
Collections. \
dnf install -y --setopt=install_weak_deps=False gcc-toolset-13; \
dnf install -y java-1.8.0-openjdk-devel patch git wget perl python3
automake libtool flex bison; \
@@ -51,6 +49,12 @@ RUN set -ex; \
chmod +x cmake-3.31.12-linux-$(uname -m).sh; \
./cmake-3.31.12-linux-$(uname -m).sh --skip-license --prefix=/usr/local; \
rm -f cmake-3.31.12-linux-$(uname -m).sh; \
+ # Install ccache 4 — EPEL 8 only ships ccache 3.7, which stores objects
uncompressed \
+ # and overflows CCACHE_MAXSIZE in CI. \
+ wget
https://github.com/ccache/ccache/releases/download/v4.14/ccache-4.14-linux-$(uname
-m)-musl-static.tar.gz; \
+ tar -xzf ccache-4.14-linux-$(uname -m)-musl-static.tar.gz; \
+ install -m 0755 ccache-4.14-linux-$(uname -m)-musl-static/ccache
/usr/local/bin/ccache; \
+ rm -rf ccache-4.14-linux-$(uname -m)-musl-static*; \
echo "check_certificate = off" >> ~/.wgetrc; \
dnf clean all; \
git clone --depth=1 --branch "${GLUTEN_BRANCH}" "${GLUTEN_REPO}"
/opt/gluten; \
diff --git a/dev/vcpkg/setup-build-depends.sh b/dev/vcpkg/setup-build-depends.sh
index 99816ee61f..8cfededda2 100755
--- a/dev/vcpkg/setup-build-depends.sh
+++ b/dev/vcpkg/setup-build-depends.sh
@@ -19,10 +19,35 @@ set -e
## Install functions begin
+CCACHE_VERSION="4.14"
+
function semver {
echo "$@" | awk -F. '{ printf("%d%03d%03d", $1,$2,$3); }'
}
+install_ccache() {
+ # Upstream static (musl) builds have no glibc requirement but only exist
for x86_64 and
+ # aarch64; fall back to the distro package on other architectures (e.g.
ppc64le).
+ case "$(uname -m)" in
+ x86_64|aarch64) ;;
+ *)
+ if command -v apt-get > /dev/null; then
+ apt-get -y install ccache
+ elif command -v dnf > /dev/null; then
+ dnf -y install ccache
+ else
+ yum -y install ccache
+ fi
+ return
+ ;;
+ esac
+ local name="ccache-${CCACHE_VERSION}-linux-$(uname -m)-musl-static"
+ wget -nv -O "/tmp/${name}.tar.gz"
"https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/${name}.tar.gz"
+ tar -xzf "/tmp/${name}.tar.gz" -C /tmp
+ install -m 0755 "/tmp/${name}/ccache" /usr/local/bin/ccache
+ rm -rf "/tmp/${name}" "/tmp/${name}.tar.gz"
+}
+
install_maven_from_source() {
if [ -z "$(which mvn)" ]; then
maven_version=3.9.16
@@ -91,6 +116,8 @@ install_centos_7() {
bison \
java-1.8.0-openjdk java-1.8.0-openjdk-devel
+ install_ccache
+
pip3 install --upgrade pip
# Requires cmake >= 3.28.3
@@ -159,6 +186,7 @@ install_centos_8() {
dnf -y --enablerepo=powertools install autoconf-archive ninja-build
+ install_ccache
install_maven_from_source
}
@@ -172,18 +200,19 @@ install_centos_9() {
pip3 install --upgrade pip
-
dnf -y --enablerepo=crb install autoconf-archive ninja-build
+ install_ccache
install_maven_from_source
}
install_ubuntu_20.04() {
apt-get update && apt-get -y install \
wget curl tar zip unzip git \
- build-essential ccache cmake ninja-build pkg-config autoconf
autoconf-archive libtool \
+ build-essential cmake ninja-build pkg-config autoconf autoconf-archive
libtool \
flex bison \
openjdk-8-jdk maven
+ install_ccache
# Overwrite gcc-9 installed by build-essential.
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
@@ -194,6 +223,15 @@ install_ubuntu_20.04() {
install_ubuntu_22.04() { install_ubuntu_20.04; }
+install_ubuntu_24.04() {
+ apt-get update && apt-get -y install \
+ wget curl tar zip unzip git \
+ build-essential cmake ninja-build pkg-config autoconf autoconf-archive
libtool \
+ flex bison \
+ openjdk-17-jdk maven
+ install_ccache
+}
+
install_openeuler_24.03() {
dnf -y update
dnf -y install dnf-plugins-core
@@ -204,6 +242,7 @@ install_openeuler_24.03() {
pip install cmake==3.31.4
+ install_ccache
install_maven_from_source
}
@@ -230,8 +269,9 @@ install_tencentos_3.2() {
install_debian_10() {
apt-get -y install \
wget curl tar zip unzip git apt-transport-https \
- build-essential ccache cmake ninja-build pkg-config autoconf
autoconf-archive libtool \
+ build-essential cmake ninja-build pkg-config autoconf autoconf-archive
libtool \
flex bison python3
+ install_ccache
# Download the Eclipse Adoptium GPG key
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public |
gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
@@ -249,8 +289,9 @@ install_debian_10() {
install_debian_11() {
apt-get -y install \
wget curl tar zip unzip git apt-transport-https \
- build-essential ccache cmake ninja-build pkg-config autoconf
autoconf-archive libtool \
+ build-essential cmake ninja-build pkg-config autoconf autoconf-archive
libtool \
flex bison
+ install_ccache
# Download the Eclipse Adoptium GPG key
wget -qO - https://packages.adoptium.net/artifactory/api/gpg/key/public |
gpg --dearmor | tee /etc/apt/trusted.gpg.d/adoptium.gpg > /dev/null
diff --git a/ep/build-velox/src/setup-centos8.sh
b/ep/build-velox/src/setup-centos8.sh
index 4aa8096a91..cb3c4e0709 100755
--- a/ep/build-velox/src/setup-centos8.sh
+++ b/ep/build-velox/src/setup-centos8.sh
@@ -48,22 +48,41 @@ FMT_VERSION="11.2.0"
FAST_FLOAT_VERSION="v8.0.2"
BOOST_VERSION="boost-1.84.0"
GEOS_VERSION="3.10.7"
+CCACHE_VERSION="4.14"
function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
}
+function install_ccache {
+ # Upstream static (musl) builds have no glibc requirement but only exist for
x86_64 and
+ # aarch64; fall back to the distro package on other architectures (e.g.
ppc64le).
+ case "$(uname -m)" in
+ x86_64|aarch64) ;;
+ *)
+ dnf_install ccache
+ return
+ ;;
+ esac
+ local name="ccache-${CCACHE_VERSION}-linux-$(uname -m)-musl-static"
+ wget -nv -O "/tmp/${name}.tar.gz"
"https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/${name}.tar.gz"
+ tar -xzf "/tmp/${name}.tar.gz" -C /tmp
+ ${SUDO:-} install -m 0755 "/tmp/${name}/ccache" /usr/local/bin/ccache
+ rm -rf "/tmp/${name}" "/tmp/${name}.tar.gz"
+}
+
# Install packages required for build.
function install_build_prerequisites {
dnf update -y
- dnf_install epel-release dnf-plugins-core # For ccache, ninja
+ dnf_install epel-release dnf-plugins-core # For ninja
dnf config-manager --set-enabled powertools || true # For centos8,
powertools is needed for some dependencies.
dnf config-manager --set-enabled Stream-PowerTools || true
dnf update -y
- dnf_install ninja-build curl ccache gcc-toolset-12 git wget which
expat-devel gettext-devel
+ dnf_install ninja-build curl gcc-toolset-12 git wget which expat-devel
gettext-devel
dnf_install yasm
dnf_install autoconf automake python39 python39-devel python39-pip libtool
pip3.9 install cmake==3.28.3
+ install_ccache
}
# Install dependencies from the package managers.
diff --git a/ep/build-velox/src/setup-openeuler24.sh
b/ep/build-velox/src/setup-openeuler24.sh
index b7a1024cc6..0c2a425f38 100755
--- a/ep/build-velox/src/setup-openeuler24.sh
+++ b/ep/build-velox/src/setup-openeuler24.sh
@@ -52,21 +52,40 @@ DUCKDB_VERSION="v0.8.1"
GEOS_VERSION="3.10.7"
ABSEIL_VERSION="20240116.2"
GRPC_VERSION="v1.48.1"
+CCACHE_VERSION="4.14"
function dnf_install {
dnf install -y -q --setopt=install_weak_deps=False "$@"
}
+function install_ccache {
+ # Upstream static (musl) builds have no glibc requirement but only exist for
x86_64 and
+ # aarch64; fall back to the distro package on other architectures (e.g.
ppc64le).
+ case "$(uname -m)" in
+ x86_64|aarch64) ;;
+ *)
+ dnf_install ccache
+ return
+ ;;
+ esac
+ local name="ccache-${CCACHE_VERSION}-linux-$(uname -m)-musl-static"
+ wget -nv -O "/tmp/${name}.tar.gz"
"https://github.com/ccache/ccache/releases/download/v${CCACHE_VERSION}/${name}.tar.gz"
+ tar -xzf "/tmp/${name}.tar.gz" -C /tmp
+ ${SUDO:-} install -m 0755 "/tmp/${name}/ccache" /usr/local/bin/ccache
+ rm -rf "/tmp/${name}" "/tmp/${name}.tar.gz"
+}
+
# Install packages required for build.
function install_build_prerequisites {
dnf update -y
- dnf_install dnf-plugins-core # For ccache, ninja
+ dnf_install dnf-plugins-core # For ninja
dnf update -y
- dnf_install ninja-build cmake ccache gcc g++ git wget which patch
+ dnf_install ninja-build cmake gcc g++ git wget which patch
dnf_install autoconf automake python3-devel python3-pip libtool
dnf_install libxml2-devel libgsasl-devel libuuid-devel
pip install cmake==3.31.4
+ install_ccache
}
# Install dependencies from the package managers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]