This is an automated email from the ASF dual-hosted git repository.

yiguolei pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new 3628dd927a1 [Chore](arm) Support auto-SIMD on arm and refactor 
compilation docs (#29956) (#30010)
3628dd927a1 is described below

commit 3628dd927a138d965558598ebd43fab1d16fd71f
Author: zclllyybb <[email protected]>
AuthorDate: Tue Jan 16 20:01:55 2024 +0800

    [Chore](arm) Support auto-SIMD on arm and refactor compilation docs 
(#29956) (#30010)
---
 be/CMakeLists.txt                                  |  10 +
 docs/en/docs/advanced/time-zone.md                 |   7 +-
 .../docs/install/source-install/compilation-arm.md | 659 ++++++++++----------
 docs/zh-CN/docs/advanced/time-zone.md              |   7 +-
 .../docs/install/source-install/compilation-arm.md | 670 +++++++++++----------
 5 files changed, 697 insertions(+), 656 deletions(-)

diff --git a/be/CMakeLists.txt b/be/CMakeLists.txt
index b3d885faf19..92c747ddf67 100644
--- a/be/CMakeLists.txt
+++ b/be/CMakeLists.txt
@@ -107,6 +107,10 @@ execute_process(COMMAND bash "-c" "uname -m"
                 OUTPUT_STRIP_TRAILING_WHITESPACE)
 message(STATUS "Build target arch is ${CMAKE_BUILD_TARGET_ARCH}")
 
+if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "aarch64" OR 
"${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "arm64")
+    set (ARCH_ARM 1)
+endif()
+
 # Set dirs
 set(BASE_DIR "${CMAKE_CURRENT_SOURCE_DIR}")
 set(ENV{DORIS_HOME} "${BASE_DIR}/..")
@@ -302,6 +306,7 @@ if (RECORD_COMPILER_SWITCHES)
     add_compile_options(-frecord-gcc-switches)
 endif()
 
+# simd for architectures
 if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR 
"${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86_64")
     add_compile_options(-msse4.2)
     if (USE_AVX2)
@@ -309,6 +314,11 @@ if ("${CMAKE_BUILD_TARGET_ARCH}" STREQUAL "x86" OR 
"${CMAKE_BUILD_TARGET_ARCH}"
     endif()
 endif()
 
+if (ARCH_ARM)
+    add_compile_options(-march=armv8-a+crc)
+endif()
+#
+
 if (WITH_MYSQL)
     add_compile_options(-DDORIS_WITH_MYSQL)
 endif()
diff --git a/docs/en/docs/advanced/time-zone.md 
b/docs/en/docs/advanced/time-zone.md
index e18d06c632a..7fa30c855db 100644
--- a/docs/en/docs/advanced/time-zone.md
+++ b/docs/en/docs/advanced/time-zone.md
@@ -49,11 +49,10 @@ The following two time zone related parameters exist within 
Doris:
 
 The time zone data contains the name of the time zone, the corresponding time 
offset, and the change of daylight saving time. On the machine where the BE is 
located, the sources of the data are as follows:
 
-1. the directory returned by the `TZDIR` command
-2. the `/usr/share/zoneinfo` directory
-3. the `zoneinfo` directory generated under the doris BE deployment directory. 
The `resource/zoneinfo.tar.gz` directory from the doris repository.
+1. the directory returned by command `TZDIR`. If was not supported, the 
directory `/usr/share/zoneinfo`.
+2. the `zoneinfo` directory generated under the doris BE deployment directory. 
The `resource/zoneinfo.tar.gz` directory from the doris repository.
 
-Look up the above data sources in order and use the current item if found. If 
none of the three are found, the doris BE will fail to start, please rebuild 
the BE correctly or get the distribution.
+Look up the above data sources in order and use the current item if found. If 
neither is found, the doris BE will fail to start, please rebuild the BE 
correctly or get the distribution.
 
 ## Impact of time zone
 
diff --git a/docs/en/docs/install/source-install/compilation-arm.md 
b/docs/en/docs/install/source-install/compilation-arm.md
index adc9027822f..6a828752192 100644
--- a/docs/en/docs/install/source-install/compilation-arm.md
+++ b/docs/en/docs/install/source-install/compilation-arm.md
@@ -28,15 +28,15 @@ under the License.
 
 This topic is about how to compile Doris on the ARM64 platform.
 
-Note that this is for reference only. Other errors may occur when compiling in 
different environments.
+Note that this document is intended as a guide only. Other errors may occur 
when compiling in different environments. Feel free to 
[issue](https://github.com/apache/doris/issues) Doris with problems or 
solutions.
 
-## KylinOS
+## Hardware/OS environment
 
-### Software and Hardware Environment
+### KylinOS
 
 1. KylinOS Version:
 
-   ```
+```shell
    $> cat /etc/.kyinfo
    name=Kylin-Server
    milestone=10-SP1-Release-Build04-20200711
@@ -44,31 +44,16 @@ Note that this is for reference only. Other errors may 
occur when compiling in d
    beta=False
    time=2020-07-11 17:16:54
    dist_id=Kylin-Server-10-SP1-Release-Build04-20200711-arm64-2020-07-11 
17:16:54
-   ```
+```
 
 2. CPU Model:
 
-   ```
+```shell
    $> cat /proc/cpuinfo
    model name  : Phytium,FT-2000+/64
-   ```
-
-### Compile with ldb-Toolchain
-
-This method works for Doris versions after [commit 
7f3564](https://github.com/apache/doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1).
-
-Download 
[ldb\_toolchain\_gen.aarch64.sh](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh)
-
-For detailed instructions, please refer to [Compile with 
ldb-toolchain](./compilation-with-ldb-toolchain.md)
-
-Note that you need to download the corresponding aarch64 versions of jdk and 
nodejs:
-
-1. 
[Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
-2. [Node 
v16.3.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
-
-## CentOS & Ubuntu
+```
 
-### Hardware Environment
+### CentOS & Ubuntu
 
 1. System Version: CentOS 8.4, Ubuntu 20.04
 2. System Architecture: ARM X64
@@ -76,9 +61,9 @@ Note that you need to download the corresponding aarch64 
versions of jdk and nod
 4. Memory: 16 GB
 5. Hard Disk: 40GB (SSD), 100GB (SSD)
 
-### Software Environment
+## Software Environment
 
-#### Software Environment List
+### Software Environment List
 
 | Component Name                                               | Component 
Version              |
 | ------------------------------------------------------------ | 
------------------------------ |
@@ -91,271 +76,291 @@ Note that you need to download the corresponding aarch64 
versions of jdk and nod
 | autoconf                                                     | 2.69          
                 |
 | bison                                                        | 3.0.4         
                 |
 
-#### Software Environment Installation Command
+### Software Environment Installation Command
 
-##### CentOS 8.4
+<Tabs>
+  <TabItem value="CentOS 8.4" label="CentOS 8.4" default>
+    <p>
+      1. Create root directories for pacakges
 
-- Create root directories
+```shell
+        # Create root directory for software download and installation packages
+        mkdir /opt/tools
+        # Create root directory for software installation
+        mkdir /opt/software
+```
+  </p>
+    <p>
+      2. Installing dependencies
 
-  ```shell
-  # Create root directory for software download and installation packages
-  mkdir /opt/tools
-  # Create root directory for software installation
-  mkdir /opt/software
-  ````
+        - Git
 
-- Git
+```shell
+          # yum install (save the trouble of compilation)
+          yum install -y git
+```
 
-  ```shell
-  # yum install (save the trouble of compilation)
-  yum install -y git
-  ````
+        - JDK8 (2 methods)
 
-- JDK8 (2 methods)
+```shell
+          # 1. yum install, which can avoid additional download and 
configuration. Installing the devel package is to get tools such as the jps 
command.
+          yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
+          
+          # 2. Download the installation package of the arm64 architecture, 
decompress it, and configure the environment variables.
+          cd /opt/tools
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
+          tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
+          mv jdk1.8.0_291 /opt/software/jdk8
+```
 
-  ```shell
-  # 1. yum install, which can avoid additional download and configuration. 
Installing the devel package is to get tools such as the jps command.
-  yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
-  
-  # 2. Download the installation package of the arm64 architecture, decompress 
it, and configure the environment variables.
-  cd /opt/tools
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
-  tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
-  mv jdk1.8.0_291 /opt/software/jdk8
-  ````
-
-- Maven
-
-  ```shell
-  cd /opt/tools
-  # Download the wget tool, decompress it, and configure the environment 
variables.
-  wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
-  tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
-  mv apache-maven-3.6.3 /opt/software/maven
-  ````
-
-- NodeJS
-
-  ```shell
-  cd /opt/tools
-  # Download the installation package of the arm64 architecture
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
-  tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
-  mv node-v16.3.0-linux-arm64 /opt/software/nodejs
-  ````
-
-- ldb-toolchain
-
-  ```shell
-  cd /opt/tools
-  # Download ldb-toolchain ARM version
-  wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
-  sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
-  ````
-
-- Configure environment variables
-
-  ```shell
-  # Configure environment variables
-  vim /etc/profile.d/doris.sh
-  export JAVA_HOME=/opt/software/jdk8
-  export MAVEN_HOME=/opt/software/maven
-  export NODE_JS_HOME=/opt/software/nodejs
-  export LDB_HOME=/opt/software/ldb_toolchain
-  export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
-  
-  # Save, exit, and refresh environment variables
-  source /etc/profile.d/doris.sh
-  
-  # Test
-  java -version
-  > java version "1.8.0_291"
-  mvn -version
-  > Apache Maven 3.6.3
-  node --version
-  > v16.3.0
-  gcc --version
-  > gcc-11
-  ````
-
-- Install other environments and components
-
-  ```shell
-  # Install required system packages
-  sudo yum install -y byacc patch automake libtool make which file 
ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
-  
-  # Install autoconf-2.69
-  cd /opt/tools
-  wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
-      tar zxf autoconf-2.69.tar.gz && \
-      mv autoconf-2.69 /opt/software/autoconf && \
-      cd /opt/software/autoconf && \
-      ./configure && \
-      make && \
-      make install
-  ````
-
-##### Ubuntu 20.04
-
-- Update apt-get repository
-
-  ```shell
-  apt-get update
-  ````
-
-- Check the shell command set
-
-  The Ubuntu shell installs dash instead of bash by default. It needs to be 
switched to bash for proper execution. Run the following command to view the 
details of sh and confirm which program corresponds to the shell:
-
-  ```shell
-  ls -al /bin/sh
-  ````
-
-  The shell can be switched back to bash by:
-
-  ```shell
-  sudo dpkg-reconfigure dash
-  ````
-
-  Then select no to confirm.
-
-  After these steps, dash will no longer be the default shell tool.
-
-- Create root directories
-
-  ```shell
-  # Create root directory for software download and installation packages
-  mkdir /opt/tools
-  # Create root directory for software installation
-  mkdir /opt/software
-  ````
-
-- Git
-
-  ```shell
-  # apt-get install, which can save the trouble of compilation
-  apt-get -y install git
-  ````
-
-- JDK8
-
-  ```shell
-  # Download the installation package of the ARM64 architecture, decompress 
it, and configure environment variables.
-  cd /opt/tools
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
-  tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
-  mv jdk1.8.0_291 /opt/software/jdk8
-  ````
-
-- Maven
-
-  ```shell
-  cd /opt/tools
-  # Download the wget tool, decompress it, and configure the environment 
variables.
-  wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
-  tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
-  mv apache-maven-3.6.3 /opt/software/maven
-  ````
-
-- NodeJS
-
-  ```shell
-  cd /opt/tools
-  # Download the installation package of ARM64 architecture.
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
-  tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
-  mv node-v16.3.0-linux-arm64 /opt/software/nodejs
-  ````
-
-- ldb-toolchain
-
-  ```shell
-  cd /opt/tools
-  # Download ldb-toolchain ARM version
-  wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
-  sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
-  ````
-
-- Configure environment variables
-
-  ```shell
-  # Configure environment variables
-  vim /etc/profile.d/doris.sh
-  export JAVA_HOME=/opt/software/jdk8
-  export MAVEN_HOME=/opt/software/maven
-  export NODE_JS_HOME=/opt/software/nodejs
-  export LDB_HOME=/opt/software/ldb_toolchain
-  export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
-  
-  # Save, exit, and refresh environment variables
-  source /etc/profile.d/doris.sh
-  
-  # Test
-  java -version
-  > java version "1.8.0_291"
-  mvn -version
-  > Apache Maven 3.6.3
-  node --version
-  > v16.3.0
-  gcc --version
-     > gcc-11
-     ````
-
-- Install other environments and components
-
-  ```shell
-  # Install required system packages
-  sudo apt install -y build-essential cmake flex automake bison binutils-dev 
libiberty-dev zip libncurses5-dev curl ninja-build
-  sudo apt-get install -y make
-  sudo apt-get install -y unzip
-  sudo apt-get install -y python2
-  sudo apt-get install -y byacc
-  sudo apt-get install -y automake
-  sudo apt-get install -y libtool
-  sudo apt-get install -y bzip2
-  sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
-  sudo apt update
-  sudo apt install gcc-11 g++-11
-  sudo apt-get -y install autoconf autopoint
-  
-  # Install autoconf-2.69
-  cd /opt/tools
-  wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
-      tar zxf autoconf-2.69.tar.gz && \
-      mv autoconf-2.69 /opt/software/autoconf && \
-      cd /opt/software/autoconf && \
-      ./configure && \
-      make && \
-      make install
-  ````
-
-#### Download Source Code
+        - Maven
 
 ```shell
-cd /opt
-git clone https://github.com/apache/doris.git
+          cd /opt/tools
+          # Download the wget tool, decompress it, and configure the 
environment variables.
+          wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
+          tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
+          mv apache-maven-3.6.3 /opt/software/maven
 ```
 
-#### Install and Deploy
+        - NodeJS
 
-##### Check if the AVX2 instruction set is supported
+```shell
+          cd /opt/tools
+          # Download the installation package of the arm64 architecture
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
+          tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
+          mv node-v16.3.0-linux-arm64 /opt/software/nodejs
+```
 
-If there is data returned, that means AVX2 is supported; otherwise, AVX2 is 
not supported.
+        - ldb-toolchain
 
 ```shell
-cat /proc/cpuinfo | grep avx2
-````
+          cd /opt/tools
+          # Download ldb-toolchain ARM version
+          wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
+          sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
+```
+  </p>
+    <p>
+      3. Configure environment variables
+
+```shell
+        # Configure environment variables
+        vim /etc/profile.d/doris.sh
+        export JAVA_HOME=/opt/software/jdk8
+        export MAVEN_HOME=/opt/software/maven
+        export NODE_JS_HOME=/opt/software/nodejs
+        export LDB_HOME=/opt/software/ldb_toolchain
+        export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
+        
+        # Save, exit, and refresh environment variables
+        source /etc/profile.d/doris.sh
+        
+        # Test
+        java -version
+        > java version "1.8.0_291"
+        mvn -version
+        > Apache Maven 3.6.3
+        node --version
+        > v16.3.0
+        gcc --version
+        > gcc-11
+```
+  </p>
+    <p>
+      4. Install other environments and components
 
-##### Execute compilation
+```shell
+        # Install required system packages
+        sudo yum install -y byacc patch automake libtool make which file 
ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
+        
+        # Install autoconf-2.69
+        cd /opt/tools
+        wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
+            tar zxf autoconf-2.69.tar.gz && \
+            mv autoconf-2.69 /opt/software/autoconf && \
+            cd /opt/software/autoconf && \
+            ./configure && \
+            make && \
+            make install
+```
+  </p>
+  </TabItem>
+  <TabItem value="Ubuntu 20.04" label="Ubuntu 20.04">
+    <p>
+      1. Update apt-get repository
 
 ```shell
-# For machines that support the AVX2 instruction set, compile directly
-sh build.sh
-# For machines that do not support the AVX2 instruction set, use the following 
command to compile
-USE_AVX2=OFF sh build.sh
-````
+        apt-get update
+```
+    </p>
+    <p>
+      2. Check the shell command set
+
+        The Ubuntu shell installs dash instead of bash by default. It needs to 
be switched to bash for proper execution. Run the following command to view the 
details of sh and confirm which program corresponds to the shell:
+
+```shell
+        ls -al /bin/sh
+```
+
+        The shell can be switched back to bash by:
+
+```shell
+        sudo dpkg-reconfigure dash
+```
+
+        Then select no to confirm.
+
+        After these steps, dash will no longer be the default shell tool.
+  </p>
+    <p>
+      3. Create root directories for packages
+
+```shell
+        # Create root directory for software download and installation packages
+        mkdir /opt/tools
+        # Create root directory for software installation
+        mkdir /opt/software
+```
+  </p>
+    <p>
+      4. Installing dependencies
+        - Git
+
+```shell
+          # apt-get install, which can save the trouble of compilation
+          apt-get -y install git
+```
 
-### FAQ
+        - JDK8
+
+```shell
+          # Download the installation package of the ARM64 architecture, 
decompress it, and configure environment variables.
+          cd /opt/tools
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
+          tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
+          mv jdk1.8.0_291 /opt/software/jdk8
+```
+
+        - Maven
+
+```shell
+          cd /opt/tools
+          # Download the wget tool, decompress it, and configure the 
environment variables.
+          wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
+          tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
+          mv apache-maven-3.6.3 /opt/software/maven
+```
+
+        - NodeJS
+
+```shell
+          cd /opt/tools
+          # Download the installation package of ARM64 architecture.
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
+          tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
+          mv node-v16.3.0-linux-arm64 /opt/software/nodejs
+```
+
+        - ldb-toolchain
+
+```shell
+          cd /opt/tools
+          # Download ldb-toolchain ARM version
+          wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
+          sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
+```
+  </p>
+    <p>
+      5. Configure environment variables
+
+```shell
+        # Configure environment variables
+        vim /etc/profile.d/doris.sh
+        export JAVA_HOME=/opt/software/jdk8
+        export MAVEN_HOME=/opt/software/maven
+        export NODE_JS_HOME=/opt/software/nodejs
+        export LDB_HOME=/opt/software/ldb_toolchain
+        export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
+        
+        # Save, exit, and refresh environment variables
+        source /etc/profile.d/doris.sh
+        
+        # Test
+        java -version
+        > java version "1.8.0_291"
+        mvn -version
+        > Apache Maven 3.6.3
+        node --version
+        > v16.3.0
+        gcc --version
+        > gcc-11
+```
+  </p>
+    <p>
+      6. Install other environments and components
+
+```shell
+        # Install required system packages
+        sudo apt install -y build-essential cmake flex automake bison 
binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build
+        sudo apt-get install -y make
+        sudo apt-get install -y unzip
+        sudo apt-get install -y python2
+        sudo apt-get install -y byacc
+        sudo apt-get install -y automake
+        sudo apt-get install -y libtool
+        sudo apt-get install -y bzip2
+        sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
+        sudo apt update
+        sudo apt install gcc-11 g++-11
+        sudo apt-get -y install autoconf autopoint
+        
+        # Install autoconf-2.69
+        cd /opt/tools
+        wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
+            tar zxf autoconf-2.69.tar.gz && \
+            mv autoconf-2.69 /opt/software/autoconf && \
+            cd /opt/software/autoconf && \
+            ./configure && \
+            make && \
+            make install
+```
+  </p>
+  </TabItem>
+</Tabs>
+
+## Compile
+
+:::tip
+Currently the only recommended method for ARM environments is to compile with 
ldb-toolchain, which works for [commit 
7f3564](https://github.com/apache/doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1)
 for Doris releases after that.
+:::
+
+Download 
[ldb\_toolchain\_gen.aarch64.sh](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh)
+
+See [Compilation with LDB toolchain](./compilation-with-ldb-toolchain) for the 
steps then.
+
+The jdk and nodejs should be replaced with the corresponding aarch64 versions:
+
+1. 
[Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
+2. [Node 
v16.3.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
+
+If you have problems compiling with the downloaded precompiled third-party 
libraries, please use `tools/build_thirdparty.sh` to compile them by yourself. 
When compiling the thirdparty library, use gcc:
+```shell
+export DORIS_TOOLCHAIN=gcc
+```
+
+When compiling Doris on ARM platforms, **please disable AVX2 and LIBUNWIND 
tripartite libraries**:
+```shell
+export USE_AVX2=OFF
+export USE_UNWIND=OFF
+```
+
+If you still encounter problems when compiling or starting, please consult the 
[FAQ](#FAQ). If there is no relevant solution, feel free to [raise an 
issue](https://github.com/apache/doris/issues).
+
+## FAQ
+
+### Problems about Compiling
 
 1. File not found when compiling the third-party library libhdfs3.a.
 
@@ -373,10 +378,10 @@ USE_AVX2=OFF sh build.sh
 
       - Use a third-party download repository
 
-        ```shell
+```shell
         export 
REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty
         sh /opt/doris/thirdparty/build-thirdparty.sh
-        ````
+````
 
         REPOSITORY_URL contains all third-party library source packages and 
their historical versions.
 
@@ -398,12 +403,12 @@ USE_AVX2=OFF sh build.sh
 
      Establish a soft link to the `python` command in `\usr\bin`
 
-     ```shell
+```shell
      # View python installation directory
      whereis python
      # Establish soft connection
      sudo ln -s /usr/bin/python2.7 /usr/bin/python
-     ````
+````
 
 3. There is no output directory after compilation
 
@@ -417,9 +422,9 @@ USE_AVX2=OFF sh build.sh
 
    - Solution
 
-     ```shell
+```shell
      sh build.sh --clean
-     ````
+````
 
 4. spark-dpp compilation fails
 
@@ -457,43 +462,7 @@ USE_AVX2=OFF sh build.sh
 
      Expand the free space on the device by deleting files you don't need, etc.
 
-6. Failed to start FE, transaction error -20
-
-   - Problem Description
-
-     When starting FE, a transaction error 20 is reported with UNKNOWN status.
-
-     > [BDBEnvironment.setup():198] error to open replicated environment. will 
exit.
-     > com.sleepycat.je.rep.ReplicaWriteException: (JE 18.3.12) Problem 
closing transaction 20. The current state is:UNKNOWN. The node transitioned to 
this state at:Fri Apr 22 12:48:08 CST 2022
-
-   - Cause
-
-     Insufficient hard disk space
-
-   - Solution
-
-     Free up hard disk space or mount a new hard disk
-
-7. Abnormal BDB environment setting, disk search error
-
-   - Problem Description
-
-     An exception is reported when starting FE after migrating the drive 
letter where FE is located
-
-     > 2022-04-22 16:21:44,092 ERROR (MASTER 
172.28.7.231_9010_1650606822109(-1)|1) [BDBJEJournal.open():306] catch an 
exception when setup bdb environment. will exit.
-     > com.sleepycat.je.DiskLimitException: (JE 18.3.12) Disk usage is not 
within je.maxDisk or je.freeDisk limits and write operations are prohibited: 
maxDiskLimit=0 freeDiskLimit=5,368,709,120 adjustedMaxDiskLimit=0 
maxDiskOverage=0 freeDiskShortage=1,536,552,960 diskFreeSpace =3,832,156,160 
availableLogSize=-1,536,552,960 totalLogSize=4,665 activeLogSize=4,665 
reservedLogSize=0 protectedLogSize=0 protectedLogSizeMap={}
-
-   - Cause
-
-     FE has been migrated to another location, which doesn't match the hard 
disk information stored in the metadata; or the hard disk is damaged or not 
mounted
-
-   - Solution
-
-     - Check if the hard disk is normal, initialized and mounted correctly
-     - Fix FE metadata
-     - If it is a test machine, you can delete the metadata directory and 
restart
-
-8. Could not find pkg.m4 file in pkg.config
+6. Could not find pkg.m4 file in pkg.config
 
    - Problem Description
 
@@ -514,12 +483,12 @@ USE_AVX2=OFF sh build.sh
 
      Copy the `pkg.m4` file in the ldb/aclocal directory into the libxml2/m4 
directory, and recompile the third-party library.
 
-     ```shell
+```shell
      cp /opt/software/ldb_toolchain/share/aclocal/pkg.m4 
/opt/incubator-doris/thirdparty/src/libxml2-v2.9.10/m4
      sh /opt/incubator-doris/thirdparty/build-thirdparty.sh
-     ````
+````
    
-9. Failed to execute test CURL_HAS_TLS_PROXY
+7. Failed to execute test CURL_HAS_TLS_PROXY
 
    - Problem Description
 
@@ -545,7 +514,7 @@ USE_AVX2=OFF sh build.sh
 
      Configure ldb environment variables
 
-     ```shell
+```shell
      # Configure environment variables
      vim /etc/profile.d/ldb.sh
      export LDB_HOME=/opt/software/ldb_toolchain
@@ -555,10 +524,60 @@ USE_AVX2=OFF sh build.sh
      # Test
      gcc --version
      > gcc-11
-     ````
+````
+
+### Problems about Starting
+
+1. Failed to start FE, transaction error -20
+
+   - Problem Description
+
+     When starting FE, a transaction error 20 is reported with UNKNOWN status.
+
+     > [BDBEnvironment.setup():198] error to open replicated environment. will 
exit.
+     > com.sleepycat.je.rep.ReplicaWriteException: (JE 18.3.12) Problem 
closing transaction 20. The current state is:UNKNOWN. The node transitioned to 
this state at:Fri Apr 22 12:48:08 CST 2022
+
+   - Cause
+
+     Insufficient hard disk space
+
+   - Solution
+
+     Free up hard disk space or mount a new hard disk
+
+2. Abnormal BDB environment setting, disk search error
+
+   - Problem Description
+
+     An exception is reported when starting FE after migrating the drive 
letter where FE is located
+
+     > 2022-04-22 16:21:44,092 ERROR (MASTER 
172.28.7.231_9010_1650606822109(-1)|1) [BDBJEJournal.open():306] catch an 
exception when setup bdb environment. will exit.
+     > com.sleepycat.je.DiskLimitException: (JE 18.3.12) Disk usage is not 
within je.maxDisk or je.freeDisk limits and write operations are prohibited: 
maxDiskLimit=0 freeDiskLimit=5,368,709,120 adjustedMaxDiskLimit=0 
maxDiskOverage=0 freeDiskShortage=1,536,552,960 diskFreeSpace =3,832,156,160 
availableLogSize=-1,536,552,960 totalLogSize=4,665 activeLogSize=4,665 
reservedLogSize=0 protectedLogSize=0 protectedLogSizeMap={}
+
+   - Cause
+
+     FE has been migrated to another location, which doesn't match the hard 
disk information stored in the metadata; or the hard disk is damaged or not 
mounted
+
+   - Solution
+
+     - Check if the hard disk is normal, initialized and mounted correctly
+     - Fix FE metadata
+     - If it is a test machine, you can delete the metadata directory and 
restart
+
+3. BE coredumps at startup and the word `libc.so` or `glibc-compatibility/` is 
visible in the core stack.
+
+    - Problem cause
+      The current machine glibc version is too low. You can be confirmed with 
`ldd --version`. This may occur if the version is less than 2.27.
+
+    - Solution
+      Recompile the BE, with environment variables added:
+```shell
+      export GLIBC_COMPATIBILITY=OFF
+```
 
-10. Other problems
+### Other Component Issues 
 
+1. 
    - Problem Description
   
      The follow error prompts are all due to one root cause.
diff --git a/docs/zh-CN/docs/advanced/time-zone.md 
b/docs/zh-CN/docs/advanced/time-zone.md
index 847572fe610..d0e65fd4c3d 100644
--- a/docs/zh-CN/docs/advanced/time-zone.md
+++ b/docs/zh-CN/docs/advanced/time-zone.md
@@ -49,11 +49,10 @@ Doris 内部存在以下两个时区相关参数:
 
 时区数据包含时区名、对应时间偏移量、夏令时变化情况等。在 BE 所在机器上,其数据来源依次为:
 
-1. `TZDIR` 命令返回的目录
-2. `/usr/share/zoneinfo` 目录
-3. doris BE 部署目录下生成的 `zoneinfo` 目录。来自 doris repository 下的 
`resource/zoneinfo.tar.gz`
+1. `TZDIR` 命令返回的目录,如不支持该命令,则为 `/usr/share/zoneinfo` 目录
+2. doris BE 部署目录下生成的 `zoneinfo` 目录。来自 doris repository 下的 
`resource/zoneinfo.tar.gz`
 
-按顺序查找以上数据源,如果找到则使用当前项。三项均未找到,则 doris BE 将启动失败,请重新正确构建 BE 或获取发行版。
+按顺序查找以上数据源,如果找到则使用当前项。两项均未找到,则 doris BE 将启动失败,请重新正确构建 BE 或获取发行版。
 
 ## 时区的影响
 
diff --git a/docs/zh-CN/docs/install/source-install/compilation-arm.md 
b/docs/zh-CN/docs/install/source-install/compilation-arm.md
index c08821deb6e..1aab7134484 100644
--- a/docs/zh-CN/docs/install/source-install/compilation-arm.md
+++ b/docs/zh-CN/docs/install/source-install/compilation-arm.md
@@ -28,15 +28,15 @@ under the License.
 
 本文档介绍如何在 ARM64 平台上编译 Doris。
 
-注意,该文档仅作为指导性文档。在不同环境中编译可能出现其他错误。
+注意,该文档仅作为指导性文档。在不同环境中编译可能出现其他错误。如遇问题,欢迎向 Doris 
[提出issue](https://github.com/apache/doris/issues) 或解决方案。
 
-## KylinOS
+## 硬件/操作系统环境
 
-### 软硬件环境
+### KylinOS
 
 1. KylinOS 版本:
 
-    ```
+```shell
     $> cat /etc/.kyinfo
     name=Kylin-Server
     milestone=10-SP1-Release-Build04-20200711
@@ -44,31 +44,16 @@ under the License.
     beta=False
     time=2020-07-11 17:16:54
     dist_id=Kylin-Server-10-SP1-Release-Build04-20200711-arm64-2020-07-11 
17:16:54
-    ```
+```
 
 2. CPU型号:
 
-    ```
+```shell
     $> cat /proc/cpuinfo
     model name  : Phytium,FT-2000+/64
-    ```
-
-### 使用 ldb-toolchain 编译
-
-该方法适用于 [commit 
7f3564](https://github.com/apache/doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1)
 之后的 Doris 版本。
-
-下载 
[ldb\_toolchain\_gen.aarch64.sh](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh)
-
-之后的编译方式参阅 [使用 LDB toolchain 编译](./compilation-with-ldb-toolchain.md)
-
-注意其中 jdk 和 nodejs 都需要下载对应的 aarch64 版本:
-
-1. 
[Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
-2. [Node 
v16.3.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
-
-## CentOS & Ubuntu
+```
 
-### 硬件环境
+### CentOS & Ubuntu
 
 1. 系统版本:CentOS 8.4、Ubuntu 20.04
 2. 系统架构:ARM X64
@@ -76,9 +61,9 @@ under the License.
 4. 内存:16 GB
 5. 硬盘:40GB(SSD)、100GB(SSD)
 
-### 软件环境
+## 软件环境配置
 
-#### 软件环境对照表
+### 软件环境对照表
 
 | 组件名称                                                     | 组件版本             |
 | ------------------------------------------------------------ | 
-------------------- |
@@ -91,271 +76,291 @@ under the License.
 | autoconf                                                     | 2.69          
       |
 | bison                                                        | 3.0.4         
       |
 
-#### 软件环境安装命令
-
-##### CentOS 8.4
-
-- 创建软件下载安装包根目录和软件安装根目录
-
-  ```shell
-  # 创建软件下载安装包根目录
-  mkdir /opt/tools
-  # 创建软件安装根目录
-  mkdir /opt/software
-  ```
-
-- Git
-
-  ```shell
-  # 省去编译麻烦,直接使用 yum 安装
-  yum install -y git
-  ```
-
-- JDK8
-
-  ```shell
-  # 两种方式,第一种是省去额外下载和配置,直接使用 yum 安装,安装 devel 包是为了获取一些工具,如 jps 命令
-  yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
-  
-  # 第二种是下载 arm64 架构的安装包,解压配置环境变量后使用
-  cd /opt/tools
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
-       tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
-       mv jdk1.8.0_291 /opt/software/jdk8
-  ```
-
-- Maven
-
-  ```shell
-  cd /opt/tools
-  # wget 工具下载后,直接解压缩配置环境变量使用
-  wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
-       tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
-       mv apache-maven-3.6.3 /opt/software/maven
-  ```
-
-- NodeJS
-
-  ```shell
-  cd /opt/tools
-  # 下载 arm64 架构的安装包
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
-       tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
-       mv node-v16.3.0-linux-arm64 /opt/software/nodejs
-  ```
-
-- LDB-Toolchain
-
-  ```shell
-  cd /opt/tools
-  # 下载 LDB-Toolchain ARM 版本
-  wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
-       sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
-  ```
-
-- 配置环境变量
-
-  ```shell
-  # 配置环境变量
-  vim /etc/profile.d/doris.sh
-  export JAVA_HOME=/opt/software/jdk8
-  export MAVEN_HOME=/opt/software/maven
-  export NODE_JS_HOME=/opt/software/nodejs
-  export LDB_HOME=/opt/software/ldb_toolchain
-  export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
-  
-  # 保存退出并刷新环境变量
-  source /etc/profile.d/doris.sh
-  
-  # 测试是否成功
-  java -version
-  > java version "1.8.0_291"
-  mvn -version
-  > Apache Maven 3.6.3
-  node --version
-  > v16.3.0
-  gcc --version
-  > gcc-11
-  ```
-
-- 安装其他额外环境和组件
-
-  ```shell
-  # install required system packages
-  sudo yum install -y byacc patch automake libtool make which file 
ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
-  
-  # install autoconf-2.69
-  cd /opt/tools
-  wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
-      tar zxf autoconf-2.69.tar.gz && \
-      mv autoconf-2.69 /opt/software/autoconf && \
-      cd /opt/software/autoconf && \
-      ./configure && \
-      make && \
-      make install
-  ```
-
-##### Ubuntu 20.04
-
-- 更新 apt-get 软件库
-
-  ```shell
-  apt-get update
-  ```
-
-- 检查 shell 命令集
-
-  ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 的详细信息,确认 
shell 对应的程序是哪个:
-
-  ```shell
-  ls -al /bin/sh
-  ```
-
-  通过以下方式可以使 shell 切换回 bash:
-
-  ```shell
-  sudo dpkg-reconfigure dash
-  ```
-
-  然后选择 no 或者 否 ,并确认
-
-  这样做将重新配置 dash,并使其不作为默认的 shell 工具
-
-- 创建软件下载安装包根目录和软件安装根目录
-
-  ```shell
-  # 创建软件下载安装包根目录
-  mkdir /opt/tools
-  # 创建软件安装根目录
-  mkdir /opt/software
-  ```
-
-- Git
-
-  ```shell
-  # 省去编译麻烦,直接使用 apt-get 安装
-  apt-get -y install git
-  ```
-
-- JDK8
-
-  ```shell
-  # 下载 arm64 架构的安装包,解压配置环境变量后使用
-  cd /opt/tools
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
-       tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
-       mv jdk1.8.0_291 /opt/software/jdk8
-  ```
-
-- Maven
-
-  ```shell
-  cd /opt/tools
-  # wget 工具下载后,直接解压缩配置环境变量使用
-  wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
-       tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
-       mv apache-maven-3.6.3 /opt/software/maven
-  ```
-
-- NodeJS
-
-  ```shell
-  cd /opt/tools
-  # 下载 arm64 架构的安装包
-  wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
-       tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
-       mv node-v16.3.0-linux-arm64 /opt/software/nodejs
-  ```
-
-- LDB-Toolchain
-
-  ```shell
-  cd /opt/tools
-  # 下载 LDB-Toolchain ARM 版本
-  wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
-  sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
-  ```
-
-- 配置环境变量
-
-  ```shell
-  # 配置环境变量
-  vim /etc/profile.d/doris.sh
-  export JAVA_HOME=/opt/software/jdk8
-  export MAVEN_HOME=/opt/software/maven
-  export NODE_JS_HOME=/opt/software/nodejs
-  export LDB_HOME=/opt/software/ldb_toolchain
-  export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
-  
-  # 保存退出并刷新环境变量
-  source /etc/profile.d/doris.sh
-  
-  # 测试是否成功
-  java -version
-  > java version "1.8.0_291"
-  mvn -version
-  > Apache Maven 3.6.3
-  node --version
-  > v16.3.0
-  gcc --version
-  > gcc-11
-  ```
-
-- 安装其他额外环境和组件
-
-  ```shell
-  # install required system packages
-  sudo apt install -y build-essential cmake flex automake bison binutils-dev 
libiberty-dev zip libncurses5-dev curl ninja-build
-  sudo apt-get install -y make
-  sudo apt-get install -y unzip
-  sudo apt-get install -y python2
-  sudo apt-get install -y byacc
-  sudo apt-get install -y automake
-  sudo apt-get install -y libtool
-  sudo apt-get install -y bzip2
-  sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa 
-  sudo apt update
-  sudo apt install gcc-11 g++-11 
-  sudo apt-get -y install autoconf autopoint
-  
-  # install autoconf-2.69
-  cd /opt/tools
-  wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
-      tar zxf autoconf-2.69.tar.gz && \
-      mv autoconf-2.69 /opt/software/autoconf && \
-      cd /opt/software/autoconf && \
-      ./configure && \
-      make && \
-      make install
-  ```
-
-#### 下载源码
+### 软件环境安装命令
+
+<Tabs>
+  <TabItem value="CentOS 8.4" label="CentOS 8.4" default>
+    <p>
+      1. 创建软件下载安装包根目录和软件安装根目录
+
+```shell
+        # 创建软件下载安装包根目录
+        mkdir /opt/tools
+        # 创建软件安装根目录
+        mkdir /opt/software
+```
+  </p>
+    <p>
+      2. 安装依赖项
+
+        - Git
+
+```shell
+          # 省去编译麻烦,直接使用 yum 安装
+          yum install -y git
+```
+
+        - JDK8
+
+```shell
+          # 两种方式,第一种是省去额外下载和配置,直接使用 yum 安装,安装 devel 包是为了获取一些工具,如 jps 命令
+          yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
+          
+          # 第二种是下载 arm64 架构的安装包,解压配置环境变量后使用
+          cd /opt/tools
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
+            tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
+            mv jdk1.8.0_291 /opt/software/jdk8
+```
+
+        - Maven
+
+```shell
+          cd /opt/tools
+          # wget 工具下载后,直接解压缩配置环境变量使用
+          wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
+            tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
+            mv apache-maven-3.6.3 /opt/software/maven
+```
+
+        - NodeJS
+
+```shell
+          cd /opt/tools
+          # 下载 arm64 架构的安装包
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
+            tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
+            mv node-v16.3.0-linux-arm64 /opt/software/nodejs
+```
+
+        - LDB-Toolchain
+
+```shell
+          cd /opt/tools
+          # 下载 LDB-Toolchain ARM 版本
+          wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
+            sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
+```
+  </p>
+    <p>
+      3. 配置环境变量
+
+```shell
+        # 配置环境变量
+        vim /etc/profile.d/doris.sh
+        export JAVA_HOME=/opt/software/jdk8
+        export MAVEN_HOME=/opt/software/maven
+        export NODE_JS_HOME=/opt/software/nodejs
+        export LDB_HOME=/opt/software/ldb_toolchain
+        export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
+        
+        # 保存退出并刷新环境变量
+        source /etc/profile.d/doris.sh
+        
+        # 测试是否成功
+        java -version
+        > java version "1.8.0_291"
+        mvn -version
+        > Apache Maven 3.6.3
+        node --version
+        > v16.3.0
+        gcc --version
+        > gcc-11
+```
+  </p>
+    <p>
+      4. 安装其他额外环境和组件
+
+```shell
+        # install required system packages
+        sudo yum install -y byacc patch automake libtool make which file 
ncurses-devel gettext-devel unzip bzip2 bison zip util-linux wget git python2
+        
+        # install autoconf-2.69
+        cd /opt/tools
+        wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
+            tar zxf autoconf-2.69.tar.gz && \
+            mv autoconf-2.69 /opt/software/autoconf && \
+            cd /opt/software/autoconf && \
+            ./configure && \
+            make && \
+            make install
+```
+  </p>
+  </TabItem>
+  <TabItem value="Ubuntu 20.04" label="Ubuntu 20.04">
+    <p>
+      1. 更新 apt-get 软件库
+
+```shell
+        apt-get update
+```
+  </p>
+    <p>
+      2. 检查 shell 命令集
+
+        ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 
的详细信息,确认 shell 对应的程序是哪个:
+
+```shell
+        ls -al /bin/sh
+```
+
+        通过以下方式可以使 shell 切换回 bash:
+
+```shell
+        sudo dpkg-reconfigure dash
+```
+
+        然后选择 no 或者 否 ,并确认
+
+        这样做将重新配置 dash,并使其不作为默认的 shell 工具
+  </p>
+    <p>
+      3. 创建软件下载安装包根目录和软件安装根目录
+
+```shell
+        # 创建软件下载安装包根目录
+        mkdir /opt/tools
+        # 创建软件安装根目录
+        mkdir /opt/software
+```
+  </p>
+    <p>
+      4. 安装依赖项
+        - Git
+
+```shell
+          # 省去编译麻烦,直接使用 apt-get 安装
+          apt-get -y install git
+```
+
+        - JDK8
 
 ```shell
-cd /opt
-git clone https://github.com/apache/doris.git
+          # 下载 arm64 架构的安装包,解压配置环境变量后使用
+          cd /opt/tools
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz
 && \
+            tar -zxvf jdk-8u291-linux-aarch64.tar.gz && \
+            mv jdk1.8.0_291 /opt/software/jdk8
 ```
 
-#### 安装部署
+        - Maven
 
-##### 查看是否支持 AVX2 指令集
+```shell
+          cd /opt/tools
+          # wget 工具下载后,直接解压缩配置环境变量使用
+          wget 
https://dlcdn.apache.org/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
 && \
+            tar -zxvf apache-maven-3.6.3-bin.tar.gz && \
+            mv apache-maven-3.6.3 /opt/software/maven
+```
 
-若有数据返回,则代表支持,若无数据返回,则代表不支持
+        - NodeJS
 
 ```shell
-cat /proc/cpuinfo | grep avx2
+          cd /opt/tools
+          # 下载 arm64 架构的安装包
+          wget 
https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz
 && \
+            tar -xvf node-v16.3.0-linux-arm64.tar.xz && \
+            mv node-v16.3.0-linux-arm64 /opt/software/nodejs
 ```
 
-##### 执行编译
+        - LDB-Toolchain
+
+```shell
+          cd /opt/tools
+          # 下载 LDB-Toolchain ARM 版本
+          wget 
https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh
 && \
+          sh ldb_toolchain_gen.aarch64.sh /opt/software/ldb_toolchain/
+```
+  </p>
+    <p>
+      5. 配置环境变量
+
+```shell
+        # 配置环境变量
+        vim /etc/profile.d/doris.sh
+        export JAVA_HOME=/opt/software/jdk8
+        export MAVEN_HOME=/opt/software/maven
+        export NODE_JS_HOME=/opt/software/nodejs
+        export LDB_HOME=/opt/software/ldb_toolchain
+        export 
PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$NODE_JS_HOME/bin:$LDB_HOME/bin:$PATH
+        
+        # 保存退出并刷新环境变量
+        source /etc/profile.d/doris.sh
+        
+        # 测试是否成功
+        java -version
+        > java version "1.8.0_291"
+        mvn -version
+        > Apache Maven 3.6.3
+        node --version
+        > v16.3.0
+        gcc --version
+        > gcc-11
+```
+  </p>
+    <p>
+      6. 安装其他额外环境和组件
+
+```shell
+        # install required system packages
+        sudo apt install -y build-essential cmake flex automake bison 
binutils-dev libiberty-dev zip libncurses5-dev curl ninja-build
+        sudo apt-get install -y make
+        sudo apt-get install -y unzip
+        sudo apt-get install -y python2
+        sudo apt-get install -y byacc
+        sudo apt-get install -y automake
+        sudo apt-get install -y libtool
+        sudo apt-get install -y bzip2
+        sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa 
+        sudo apt update
+        sudo apt install gcc-11 g++-11 
+        sudo apt-get -y install autoconf autopoint
+        
+        # install autoconf-2.69
+        cd /opt/tools
+        wget http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz && \
+            tar zxf autoconf-2.69.tar.gz && \
+            mv autoconf-2.69 /opt/software/autoconf && \
+            cd /opt/software/autoconf && \
+            ./configure && \
+            make && \
+            make install
+```
+  </p>
+  </TabItem>
+</Tabs>
+
+## 编译
+
+:::tip
+目前 ARM 环境仅推荐使用 ldb-toolchain 进行编译,该方法适用于 [commit 
7f3564](https://github.com/apache/doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1)
 之后的 Doris 版本。
+:::
+
+下载 
[ldb\_toolchain\_gen.aarch64.sh](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh)
+
+之后的编译方式参阅 [使用 LDB toolchain 编译](./compilation-with-ldb-toolchain)
+
+其中,jdk 和 nodejs 替换为对应的 aarch64 版本:
+
+1. 
[Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
+2. [Node 
v16.3.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
+
+如下载预编译的三方库遇到问题,请使用`tools/build_thirdparty.sh`自行编译。在编译三方库时,请使用 gcc:
+```shell
+export DORIS_TOOLCHAIN=gcc
+```
 
+在 ARM 平台编译 Doris 时,**请关闭 AVX2 和 LIBUNWIND 三方库**:
 ```shell
-# 支持 AVX2 指令集的机器,直接编译即可
-sh build.sh
-# 不支持 AVX2 指令集的机器,使用如下命令编译
-USE_AVX2=OFF sh build.sh
+export USE_AVX2=OFF
+export USE_UNWIND=OFF
 ```
 
-### 常见问题
+如在编译、启动时仍遇到问题,请查阅[常见问题](#常见问题)。如果没有相关解决方案,欢迎[提出issue](https://github.com/apache/doris/issues)。
+
+## 常见问题
+
+### 编译问题
 
 1. 编译第三方库 libhdfs3.a ,找不到文件夹
 
@@ -373,10 +378,10 @@ USE_AVX2=OFF sh build.sh
 
      - 使用第三方下载仓库
 
-       ```shell
+```shell
        export 
REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty
        sh /opt/doris/thirdparty/build-thirdparty.sh
-       ```
+```
 
        REPOSITORY_URL 中包含所有第三方库源码包和他们的历史版本。
 
@@ -398,12 +403,12 @@ USE_AVX2=OFF sh build.sh
 
      建立 `\usr\bin` 中 `python` 命令的软连接
 
-     ```shell
+```shell
      # 查看python安装目录
      whereis python
      # 建立软连接
      sudo ln -s /usr/bin/python2.7 /usr/bin/python
-     ```
+```
 
 3. 编译结束后没有 output 目录
 
@@ -417,9 +422,9 @@ USE_AVX2=OFF sh build.sh
 
    - 解决方案
 
-     ```shell
+```shell
      sh build.sh --clean
-     ```
+```
 
 4. spark-dpp 编译失败
 
@@ -459,43 +464,7 @@ USE_AVX2=OFF sh build.sh
 
      扩大设备剩余空间,如删除不需要的文件等
 
-6. 启动FE失败,事务-20 问题
-
-   - 问题描述
-
-     在启动 FE 时,报事务错误 20 问题,状态为 UNKNOWN
-
-     > [BDBEnvironment.setup():198] error to open replicated environment. will 
exit.
-     > com.sleepycat.je.rep.ReplicaWriteException: (JE 18.3.12) Problem 
closing transaction 20. The current state is:UNKNOWN. The node transitioned to 
this state at:Fri Apr 22 12:48:08 CST 2022
-
-   - 问题原因
-
-     硬盘空间不足,需更多空间
-
-   - 解决方案
-
-     释放硬盘空间或者挂载新硬盘
-
-7. BDB 环境设置异常,磁盘寻找错误
-
-   - 问题描述
-
-     在迁移 FE 所在的盘符后启动 FE 报异常
-
-     > 2022-04-22 16:21:44,092 ERROR (MASTER 
172.28.7.231_9010_1650606822109(-1)|1) [BDBJEJournal.open():306] catch an 
exception when setup bdb environment. will exit.
-     > com.sleepycat.je.DiskLimitException: (JE 18.3.12) Disk usage is not 
within je.maxDisk or je.freeDisk limits and write operations are prohibited: 
maxDiskLimit=0 freeDiskLimit=5,368,709,120 adjustedMaxDiskLimit=0 
maxDiskOverage=0 freeDiskShortage=1,536,552,960 diskFreeSpace=3,832,156,160 
availableLogSize=-1,536,552,960 totalLogSize=4,665 activeLogSize=4,665 
reservedLogSize=0 protectedLogSize=0 protectedLogSizeMap={}
-
-   - 问题原因
-
-     迁移了 FE 所在的位置,元数据存储的硬盘信息无法匹配到,或者该硬盘损坏或未挂载
-
-   - 解决方案
-
-     - 检查硬盘是否正常,是否初始化并正确挂载
-     - 修复 FE 元数据
-     - 若为测试机器,则可以删除元数据目录重新启动
-
-8. 在 pkg.config 中找不到 pkg.m4 文件
+6. 在 pkg.config 中找不到 pkg.m4 文件
 
    - 问题描述
 
@@ -518,12 +487,12 @@ USE_AVX2=OFF sh build.sh
 
      将 ldb/aclocal 目录下的 `pkg.m4` 文件拷贝至 libxml2/m4 目录下,重新编译第三方库
 
-     ```shell
+```shell
      cp /opt/software/ldb_toolchain/share/aclocal/pkg.m4 
/opt/doris/thirdparty/src/libxml2-v2.9.10/m4
      sh /opt/doris/thirdparty/build-thirdparty.sh
-     ```
+```
 
-9. 执行测试 CURL_HAS_TLS_PROXY 失败
+7. 执行测试 CURL_HAS_TLS_PROXY 失败
 
    - 问题描述
 
@@ -549,7 +518,7 @@ USE_AVX2=OFF sh build.sh
 
      配置 ldb 环境变量
 
-     ```shell
+```shell
      # 配置环境变量
      vim /etc/profile.d/ldb.sh
      export LDB_HOME=/opt/software/ldb_toolchain
@@ -559,14 +528,59 @@ USE_AVX2=OFF sh build.sh
      # 测试
      gcc --version
      > gcc-11
-     ```
+```
+
+### 启动问题
+
+1. 启动FE失败,事务-20 问题
+
+   - 问题描述
+
+     在启动 FE 时,报事务错误 20 问题,状态为 UNKNOWN
+
+     > [BDBEnvironment.setup():198] error to open replicated environment. will 
exit.
+     > com.sleepycat.je.rep.ReplicaWriteException: (JE 18.3.12) Problem 
closing transaction 20. The current state is:UNKNOWN. The node transitioned to 
this state at:Fri Apr 22 12:48:08 CST 2022
+
+   - 问题原因
+
+     硬盘空间不足,需更多空间
+
+   - 解决方案
+
+     释放硬盘空间或者挂载新硬盘
 
-10. 其他异常问题
+2. BDB 环境设置异常,磁盘寻找错误
 
    - 问题描述
+     在迁移 FE 所在的盘符后启动 FE 报异常
+     > 2022-04-22 16:21:44,092 ERROR (MASTER 
172.28.7.231_9010_1650606822109(-1)|1) [BDBJEJournal.open():306] catch an 
exception when setup bdb environment. will exit.
+     > com.sleepycat.je.DiskLimitException: (JE 18.3.12) Disk usage is not 
within je.maxDisk or je.freeDisk limits and write operations are prohibited: 
maxDiskLimit=0 freeDiskLimit=5,368,709,120 adjustedMaxDiskLimit=0 
maxDiskOverage=0 freeDiskShortage=1,536,552,960 diskFreeSpace=3,832,156,160 
availableLogSize=-1,536,552,960 totalLogSize=4,665 activeLogSize=4,665 
reservedLogSize=0 protectedLogSize=0 protectedLogSizeMap={}
 
-     如有以下组件的错误提示,则统一以该方案解决
+   - 问题原因
+     迁移了 FE 所在的位置,元数据存储的硬盘信息无法匹配到,或者该硬盘损坏或未挂载
+
+   - 解决方案
+     - 检查硬盘是否正常,是否初始化并正确挂载
+     - 修复 FE 元数据
+     - 若为测试机器,则可以删除元数据目录重新启动
+
+3. BE启动时 coredump,core 栈中可见 `libc.so` 或 `glibc-compatibility/` 字样
+
+    - 问题原因
+      当前机器 glibc 版本过低。可以通过 `ldd --version` 确认,如果版本小于 2.27 则可能发生这一问题。
+
+    - 解决方案
+      重新编译 BE,编译时增加环境变量:
+```shell
+      export GLIBC_COMPATIBILITY=OFF
+```
+
+### 其他组件问题
+
+1. 
+   - 问题描述
 
+     如有以下组件的错误提示,则统一以该方案解决:
      - bison 相关
        1. 安装 bison-3.0.4 时报 fseterr.c 错误
      - flex 相关
@@ -585,11 +599,11 @@ USE_AVX2=OFF sh build.sh
 
    - 问题原因
 
-     未使用 ldb-toolchain 进行编译
+     未使用正确的 ldb-toolchain 进行编译
 
    - 解决方案
 
      - 检查 ldb-toolchain 环境变量是否配置
-     - 查看 gcc 版本是否是 `gcc-11`
+     - 查看 gcc 版本是否与[使用ldb-toolchain编译](./compilation-with-ldb-toolchain)文档中推荐一致
      - 删除 `ldb_toolchain_gen.aarch64.sh` 脚本执行后的 ldb 目录,重新执行并配置环境变量,验证 gcc 版本
 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to