From 8ac259900d1dadddb7132094e4cec22d8bfde208 Mon Sep 17 00:00:00 2001 From: luohaha <18810541851@163.com> Date: Fri, 30 Sep 2022 11:33:23 +0800 Subject: [PATCH] [Feature] support mac m1 --- build.sh | 5 +++++ install_env_gcc_aarch64.sh | 2 +- sr-thirdparty/Dockerfile | 7 ++++++- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 0cfc389..8feacf8 100755 --- a/build.sh +++ b/build.sh @@ -19,6 +19,11 @@ IMAGE_NAME_TOOLCHAIN='toolchain' IMAGE_NAME_THIRDPARTY='dev-env' MACHINE_TYPE=$(uname -m) +# handle mac m1 platform, change arm64 to aarch64 +if [[ "${MACHINE_TYPE}" == "arm64" ]]; then + MACHINE_TYPE="aarch64" +fi + echo "===== build image on $MACHINE_TYPE" PARAMS_TARGET=params_source_$MACHINE_TYPE.sh diff --git a/install_env_gcc_aarch64.sh b/install_env_gcc_aarch64.sh index 5dfdaf6..37f11e3 100755 --- a/install_env_gcc_aarch64.sh +++ b/install_env_gcc_aarch64.sh @@ -3,6 +3,6 @@ yum install centos-release-scl -y yum install devtoolset-10 -y ln -sf /opt/rh/devtoolset-10/root/bin/* /usr/bin/ -yum install -y epel-release +#yum install -y epel-release yum install -y ccache python3 yum install -y bzip2 wget git libstdc++-static byacc flex automake libtool binutils-devel bison ncurses-devel make mlocate unzip patch which vim-common redhat-lsb-core zip libcurl-devel updatedb diff --git a/sr-thirdparty/Dockerfile b/sr-thirdparty/Dockerfile index da56b69..d405c5c 100644 --- a/sr-thirdparty/Dockerfile +++ b/sr-thirdparty/Dockerfile @@ -44,4 +44,9 @@ COPY thirdparty ${DEFAULT_DIR}/thirdparty ENV STARROCKS_THIRDPARTY /var/local/thirdparty ENV STARROCKS_GCC_HOME /usr -CMD top \ No newline at end of file +# reinstall maven and ccache because this two libs counld be installed failed before. +RUN yum install -y epel-release +RUN yum install -y maven +RUN yum install -y ccache + +CMD top