Skip to content

Commit

Permalink
Fix more
Browse files Browse the repository at this point in the history
  • Loading branch information
PHILO-HE committed Oct 23, 2024
1 parent 196a1c5 commit ecd7358
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 66 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build_bundle_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
yum install sudo patch java-1.8.0-openjdk-devel -y && \
cd $GITHUB_WORKSPACE/ep/build-velox/src && \
./get_velox.sh && \
source /opt/rh/devtoolset-9/enable && \
source /opt/rh/devtoolset-11/enable && \
cd $GITHUB_WORKSPACE/ && \
export NUM_THREADS=4
./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_tests=OFF --build_benchmarks=OFF --enable_s3=OFF \
Expand Down
2 changes: 1 addition & 1 deletion dev/docker/Dockerfile.centos7-static-build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN sed -i \
-e 's/mirror\.centos\.org/vault.centos.org/' \
/etc/yum.repos.d/CentOS-SCLo-scl-rh.repo

RUN yum install -y git patch wget sudo java-1.8.0-openjdk-devel ccache devtoolset-11
RUN yum install -y git patch wget sudo java-1.8.0-openjdk-devel ccache

RUN git clone --depth=1 https://github.com/apache/incubator-gluten /opt/gluten

Expand Down
68 changes: 13 additions & 55 deletions dev/vcpkg/setup-build-depends.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,17 @@ install_maven_from_source() {
fi
}

install_gcc9_from_source() {
install_gcc11_from_source() {
cur_gcc_version=$(gcc -dumpversion)
if [ "$(semver "$cur_gcc_version")" -lt "$(semver 9.0.0)" ]; then
gcc_version=gcc-9.4.0
if [ "$(semver "$cur_gcc_version")" -lt "$(semver 11.0.0)" ]; then
gcc_version=gcc-11.5.0
gcc_install_dir=/usr/local/${gcc_version}
cd /tmp
if [ ! -d $gcc_version ]; then
wget https://ftp.gnu.org/gnu/gcc/${gcc_version}/${gcc_version}.tar.gz
tar -xvf ${gcc_version}.tar.gz
fi
cd ${gcc_version}
sed -i 's/ftp/https/g' contrib/download_prerequisites
./contrib/download_prerequisites

mkdir gcc-build && cd gcc-build
Expand Down Expand Up @@ -68,7 +67,7 @@ install_centos_7() {
yum -y install \
wget curl tar zip unzip which patch sudo \
ninja-build perl-IPC-Cmd autoconf autoconf-archive automake libtool \
devtoolset-9 python3 pip dnf \
devtoolset-11 python3 pip dnf \
bison \
java-1.8.0-openjdk java-1.8.0-openjdk-devel

Expand Down Expand Up @@ -126,7 +125,7 @@ install_centos_8() {
yum -y install \
wget curl tar zip unzip git which sudo patch \
cmake perl-IPC-Cmd autoconf automake libtool \
gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ \
gcc-toolset-11 \
flex bison python3 \
java-1.8.0-openjdk java-1.8.0-openjdk-devel

Expand All @@ -135,60 +134,18 @@ install_centos_8() {
install_maven_from_source
}

install_ubuntu_18.04() {
# Support for gcc-9 and g++-9
apt-get update && apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test

apt-get -y install \
wget curl tar zip unzip git \
build-essential ccache ninja-build pkg-config autoconf autoconf-archive libtool \
flex bison \
openjdk-8-jdk \
gcc-9 g++-9
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 900 --slave /usr/bin/g++ g++ /usr/bin/g++-9

# Install cmake 3.28.1 from source
apt remove -y --purge --auto-remove cmake
apt-get install -y libssl-dev

version=3.28
build=1
mkdir cmake_install
cd cmake_install
wget https://cmake.org/files/v$version/cmake-$version.$build.tar.gz
tar -xzvf cmake-$version.$build.tar.gz
cd cmake-$version.$build/

./bootstrap
make -j$(nproc)
make install

cd ../../
rm -rf cmake_install
ln -fs /usr/local/bin/cmake /usr/bin/cmake

# Install automake 1.16
mkdir -p /tmp/automake
wget -O - http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz | tar -x --xz -C /tmp/automake --strip-components=1
cd /tmp/automake
./configure
make install -j
cd
rm -rf /tmp/automake

# Fix aclocal search path
echo /usr/share/aclocal > /usr/local/share/aclocal/dirlist

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 \
flex bison \
openjdk-8-jdk maven
# Overwrite gcc-9 installed by build-essential.
sudo apt install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt update && sudo apt install -y gcc-11 g++-11
sudo ln -sf /usr/bin/gcc-11 /usr/bin/gcc
sudo ln -sf /usr/bin/g++-11 /usr/bin/g++
}

install_ubuntu_22.04() { install_ubuntu_20.04; }
Expand All @@ -203,6 +160,7 @@ install_alinux_3() {
}

install_tencentos_3.2() {
# FIXME: upgrade to gcc-11.
yum -y install \
wget curl tar zip unzip git which \
cmake ninja-build perl-IPC-Cmd autoconf autoconf-archive automake libtool \
Expand All @@ -229,7 +187,7 @@ install_debian_10() {
apt update && apt-get -y install temurin-8-jdk

install_maven_from_source
install_gcc9_from_source
install_gcc11_from_source
}

install_debian_11() {
Expand Down
8 changes: 4 additions & 4 deletions ep/build-velox/src/get_velox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,10 @@ function process_setup_alinux3 {
sed -i "s/.*dnf_install epel-release/#&/" ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/.*run_and_time install_conda/#&/" ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/.*dnf config-manager --set-enabled powertools/#&/" ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/gcc-toolset-9 //" ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/.*source \/opt\/rh\/gcc-toolset-9\/enable/#&/" ${CURRENT_DIR}/setup-centos8.sh
sed -i 's|^export CC=/opt/rh/gcc-toolset-9/root/bin/gcc|# &|' ${CURRENT_DIR}/setup-centos8.sh
sed -i 's|^export CXX=/opt/rh/gcc-toolset-9/root/bin/g++|# &|' ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/gcc-toolset-11 //" ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/.*source \/opt\/rh\/gcc-toolset-11\/enable/#&/" ${CURRENT_DIR}/setup-centos8.sh
sed -i 's|^export CC=/opt/rh/gcc-toolset-11/root/bin/gcc|# &|' ${CURRENT_DIR}/setup-centos8.sh
sed -i 's|^export CXX=/opt/rh/gcc-toolset-11/root/bin/g++|# &|' ${CURRENT_DIR}/setup-centos8.sh
sed -i 's/python39 python39-devel python39-pip //g' ${CURRENT_DIR}/setup-centos8.sh
sed -i "s/.*pip.* install/#&/" ${CURRENT_DIR}/setup-centos8.sh
}
Expand Down
4 changes: 2 additions & 2 deletions tools/gluten-te/centos/centos-7-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,12 @@ yum -y install epel-release
yum -y install \
wget curl tar zip unzip which patch sudo \
ninja-build perl-IPC-Cmd autoconf autoconf-archive automake libtool \
devtoolset-9 python3 pip dnf \
devtoolset-11 python3 pip dnf \
bison \
java-1.8.0-openjdk java-1.8.0-openjdk-devel

# Link c++ to the one in devtoolset.
ln -s /opt/rh/devtoolset-9/root/usr/bin/c++ /usr/bin/c++
ln -s /opt/rh/devtoolset-11/root/usr/bin/c++ /usr/bin/c++

semver() {
echo "$@" | awk -F. '{ printf("%d%05d%05d", $1,$2,$3); }'
Expand Down
4 changes: 2 additions & 2 deletions tools/gluten-te/centos/centos-8-deps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ yum -y update && yum clean all && yum install -y dnf-plugins-core
yum config-manager --set-enabled powertools
dnf --enablerepo=powertools install -y ninja-build
dnf --enablerepo=powertools install -y libdwarf-devel
dnf install -y --setopt=install_weak_deps=False ccache gcc-toolset-9 git wget which libevent-devel \
dnf install -y --setopt=install_weak_deps=False ccache gcc-toolset-11 git wget which libevent-devel \
openssl-devel re2-devel libzstd-devel lz4-devel double-conversion-devel \
curl-devel cmake libicu-devel

yum -y update && yum clean all && yum install -y java-1.8.0-openjdk-devel patch
dnf -y install gcc-toolset-9-gcc gcc-toolset-9-gcc-c++
dnf -y install gcc-toolset-11-gcc gcc-toolset-11-gcc-c++
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ function retry {
}

# FIXME: Works only in CentOS 7
source /opt/rh/devtoolset-9/enable
source /opt/rh/devtoolset-11/enable

cd /opt/gluten

Expand Down

0 comments on commit ecd7358

Please sign in to comment.