Skip to content

Commit

Permalink
Fix cmake install for ARM platform (#59)
Browse files Browse the repository at this point in the history
* Fix cmake install for ARM platform

* Fix ossutil64

* Restore cmake PATH
  • Loading branch information
yixinglu authored Nov 2, 2021
1 parent f874bbe commit a5aa791
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
11 changes: 3 additions & 8 deletions Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ 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 CCACHE_CPP2=1
Expand All @@ -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
Expand Down Expand Up @@ -101,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
11 changes: 3 additions & 8 deletions Dockerfile.ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,6 @@ 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 CC=${TOOLSET_CLANG_DIR}/bin/gcc
Expand All @@ -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
Expand Down Expand Up @@ -84,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

0 comments on commit a5aa791

Please sign in to comment.