From 4f1125705d2ccdc6d5305f391bef0662727b04af Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Tue, 2 Nov 2021 11:01:07 +0800 Subject: [PATCH 1/3] Fix cmake install for ARM platform --- Dockerfile.centos | 9 ++------- Dockerfile.ubuntu | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Dockerfile.centos b/Dockerfile.centos index dd80f67..3a41ce1 100644 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -48,14 +48,8 @@ RUN if [ "x${VERSION}" != "x8" ]; then yum install -y centos-release-scl; fi WORKDIR /root -# Install cmake 3.15 -RUN mkdir -p /opt/vesoft/toolset/cmake \ - && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.tar.gz -O \ - && tar zxf cmake*.tar.gz -C /opt/vesoft/toolset/cmake --strip-components=1 \ - && rm -rf cmake*.tar.gz - ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} +ENV PATH=${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CCACHE_CPP2=1 ENV CC=${TOOLSET_CLANG_DIR}/bin/gcc ENV CXX=${TOOLSET_CLANG_DIR}/bin/g++ @@ -66,6 +60,7 @@ SHELL ["/bin/bash", "-c"] # Install gcc and llvm by nebula-gears RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \ && /opt/vesoft/bin/install-llvm --version=10.0.0 \ + && /opt/vesoft/bin/install-cmake \ && ln -snf ${TOOLSET_CLANG_DIR}/bin/llvm-symbolizer /usr/bin/llvm-symbolizer # Install git 2.25 diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index dc42e5a..284267e 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -41,14 +41,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /root -# Install cmake -RUN mkdir -p /opt/vesoft/toolset/cmake \ - && curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.15.5/cmake-3.15.5-Linux-x86_64.tar.gz -O \ - && tar zxf cmake*.tar.gz -C /opt/vesoft/toolset/cmake --strip-components=1 \ - && rm -rf cmake*.tar.gz - ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} +ENV PATH=${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CC=${TOOLSET_CLANG_DIR}/bin/gcc ENV CXX=${TOOLSET_CLANG_DIR}/bin/g++ @@ -57,6 +51,7 @@ SHELL ["/bin/bash", "-c"] # Install gcc and llvm by nebula-gears RUN bash <(curl -s https://raw.githubusercontent.com/vesoft-inc/nebula-gears/master/install) --prefix=/opt/vesoft/ \ && /opt/vesoft/bin/install-llvm --version=10.0.0 \ + && /opt/vesoft/bin/install-cmake \ && ln -snf ${TOOLSET_CLANG_DIR}/bin/llvm-symbolizer /usr/bin/llvm-symbolizer # Install git 2.25 From 2d923386f15a750b4049f7fc63037bde68b0d3f2 Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Tue, 2 Nov 2021 11:39:52 +0800 Subject: [PATCH 2/3] Fix ossutil64 --- Dockerfile.centos | 4 ++-- Dockerfile.ubuntu | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Dockerfile.centos b/Dockerfile.centos index 3a41ce1..26dff02 100644 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -96,6 +96,6 @@ RUN git clone --branch master --single-branch https://github.com/linux-test-proj RUN if [ "x${VERSION}" == "x7" ]; then pip3 install --no-cache-dir fastcov; fi # Install ossutil64 -RUN wget -q http://gosspublic.alicdn.com/ossutil/1.6.10/ossutil64 \ - && mv ossutil64 /usr/bin/ \ +RUN [[ $(uname -m) = "aarch64" ]] && ARCH="arm"; \ + wget -q -O /usr/bin/ossutil64 "http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil${ARCH}64" \ && chmod +x /usr/bin/ossutil64 diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 284267e..9f0da42 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -79,6 +79,6 @@ RUN wget -qO- https://github.com/ccache/ccache/releases/download/v3.7.7/ccache-3 && cd ../ && rm -rf ccache-* # Install ossutil64 -RUN wget -q http://gosspublic.alicdn.com/ossutil/1.6.10/ossutil64 \ - && mv ossutil64 /usr/bin/ \ +RUN [[ $(uname -m) = "aarch64" ]] && ARCH="arm"; \ + wget -q -O /usr/bin/ossutil64 "http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil${ARCH}64" \ && chmod +x /usr/bin/ossutil64 From e76e68e422b8e7dfd76f39aefceea31a80a2d1b9 Mon Sep 17 00:00:00 2001 From: yixinglu <2520865+yixinglu@users.noreply.github.com> Date: Tue, 2 Nov 2021 12:39:44 +0800 Subject: [PATCH 3/3] Restore cmake PATH --- Dockerfile.centos | 2 +- Dockerfile.ubuntu | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.centos b/Dockerfile.centos index 26dff02..f0b9252 100644 --- a/Dockerfile.centos +++ b/Dockerfile.centos @@ -49,7 +49,7 @@ RUN if [ "x${VERSION}" != "x8" ]; then yum install -y centos-release-scl; fi WORKDIR /root ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV PATH=${TOOLSET_CLANG_DIR}/bin:${PATH} +ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CCACHE_CPP2=1 ENV CC=${TOOLSET_CLANG_DIR}/bin/gcc ENV CXX=${TOOLSET_CLANG_DIR}/bin/g++ diff --git a/Dockerfile.ubuntu b/Dockerfile.ubuntu index 9f0da42..771b925 100644 --- a/Dockerfile.ubuntu +++ b/Dockerfile.ubuntu @@ -42,7 +42,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ WORKDIR /root ENV TOOLSET_CLANG_DIR=/opt/vesoft/toolset/clang/10.0.0 -ENV PATH=${TOOLSET_CLANG_DIR}/bin:${PATH} +ENV PATH=/opt/vesoft/toolset/cmake/bin:${TOOLSET_CLANG_DIR}/bin:${PATH} ENV CC=${TOOLSET_CLANG_DIR}/bin/gcc ENV CXX=${TOOLSET_CLANG_DIR}/bin/g++