You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by yi...@apache.org on 2022/05/13 02:24:23 UTC

[incubator-doris] branch master updated: [doc]Add ARM architecture compilation tutorial content (#9535)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 34e64fbea9 [doc]Add ARM architecture compilation tutorial content (#9535)
34e64fbea9 is described below

commit 34e64fbea9dd8d4c224e368406d6ede67150b85b
Author: FreeOnePlus <54...@users.noreply.github.com>
AuthorDate: Fri May 13 10:24:19 2022 +0800

    [doc]Add ARM architecture compilation tutorial content (#9535)
    
    Co-authored-by: manyi <fo...@freeoneplus.com>
---
 docs/en/install/source-install/compilation-arm.md  | 668 ++++++++++++++++-----
 .../install/source-install/compilation-arm.md      | 538 ++++++++++++++++-
 2 files changed, 1040 insertions(+), 166 deletions(-)

diff --git a/docs/en/install/source-install/compilation-arm.md b/docs/en/install/source-install/compilation-arm.md
index ac0d2f5fff..47a2fa8df8 100644
--- a/docs/en/install/source-install/compilation-arm.md
+++ b/docs/en/install/source-install/compilation-arm.md
@@ -1,245 +1,589 @@
----
-{
-    "title": "Compile on ARM platform",
-    "language": "en"
-}
----
+1. 1. <!-- 
+        Licensed to the Apache Software Foundation (ASF) under one
+        or more contributor license agreements.  See the NOTICE file
+        distributed with this work for additional information
+        regarding copyright ownership.  The ASF licenses this file
+        to you under the Apache License, Version 2.0 (the
+        "License"); you may not use this file except in compliance
+        with the License.  You may obtain a copy of the License at
 
-<!--
-Licensed to the Apache Software Foundation (ASF) under one
-or more contributor license agreements. See the NOTICE file
-distributed with this work for additional information
-regarding copyright ownership. The ASF licenses this file
-to you under the Apache License, Version 2.0 (the
-"License"); you may not use this file except in compliance
-with the License. You may obtain a copy of the License at
+          http://www.apache.org/licenses/LICENSE-2.0
 
-  http://www.apache.org/licenses/LICENSE-2.0
+        Unless required by applicable law or agreed to in writing,
+        software distributed under the License is distributed on an
+        "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+        KIND, either express or implied.  See the License for the
+        specific language governing permissions and limitations
+        under the License.
+        -->
 
-Unless required by applicable law or agreed to in writing,
-software distributed under the License is distributed on an
-"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-KIND, either express or implied. See the License for the
-specific language governing permissions and limitations
-under the License.
--->
+        # Apache Doris ARM architecture compiled
 
+        本文档介绍如何在 ARM64 平台上编译 Doris。
 
-# Compile and Run Doris on ARM64 + KylinOS.
+        注意,该文档仅作为指导性文档。在不同环境中编译可能出现其他错误。
 
-This document describes how to compile Doris on the ARM64 platform.
+        ## KylinOS
 
-Note that this document is only a guide document. Other errors may occur when compiling in different environments.
+        ### Software and hardware environment
 
-## Software and hardware environment
+        1. KylinOS Version:
 
-1. KylinOS version:
+           ```
+           $> cat /etc/.kyinfo
+           name=Kylin-Server
+           milestone=10-SP1-Release-Build04-20200711
+           arch=arm64
+           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
+           ```
 
-    ```
-    $> cat /etc/.kyinfo
-    name=Kylin-Server
-    milestone=10-SP1-Release-Build04-20200711
-    arch=arm64
-    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:
 
-2. CPU model
+           ```
+           $> cat /proc/cpuinfo
+           model name  : Phytium,FT-2000+/64
+           ```
 
-    ```
-    $> cat /proc/cpuinfo
-    model name: Phytium,FT-2000+/64
-    ```
+        ### Compile with ldb-toolchain
 
-## Compile using ldb-toolchain
+        This method works for Doris versions after [commit 7f3564](https://github.com/apache/incubator-doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1).
 
-This method works with Doris versions after [commit 7f3564](https://github.com/apache/incubator-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)
 
-Download [ldbi\_toolchain\_gen.aarch64.sh](https://github.com/amosbird/ldb_toolchain_gen/releases/download/v0.9.1/ldb_toolchain_gen.aarch64.sh)
+        For the subsequent compilation method, please refer to [Compile with LDB toolchain](./compilation-with-ldb-toolchain.md)
 
-For subsequent compilation, see [Compiling with LDB toolchain](./compilation-with-ldb-toolchain.md)
+        Note that both jdk and nodejs need to download the corresponding aarch64 version:
 
-Note that both jdk and nodejs need to be downloaded with the corresponding aarch64 versions:
+        1. [Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
+        2. [Node v12.13.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
+
+        ## CentOS & Ubuntu
+
+        ### Hardware Environment
+
+        1. System version: CentOS 8.4, Ubuntu 20.04
+        2. System Architecture: ARM X64
+        3. CPU: 4C
+        4. Memory: 16 GB
+        5. Hard disk: 40GB (SSD), 100GB (SSD)
+
+        ### Software Environment
+
+        #### Software environment comparison table
+
+        | component name                                               | component version                         |
+        | ------------------------------------------------------------ | ----------------------------------------- |
+        | Git                                                          | 2.0+                                      |
+        | JDK                                                          | 1.8.0                                     |
+        | Maven                                                        | 3.6.3                                     |
+        | NodeJS                                                       | 16.3.0                                    |
+        | LDB-Toolchain                                                | 0.9.1                                     |
+        | 常备环境:<br />byacc<br />patch<br />automake<br />libtool<br />make<br />which<br />file<br />ncurses-devel<br />gettext-devel<br />unzip<br />bzip2<br />zip<br />util-linux<br />wget<br />git<br />python2 | yum or apt can be installed automatically |
+        | autoconf                                                     | 2.69                                      |
+        | bison                                                        | 3.0.4                                     |
+
+        #### Software environment installation command
+
+        ##### CentOS 8.4
+
+        - Create software download and installation package root directory and software installation root directory
+
+          ```shell
+          # Create the root directory of the software download and installation package
+          mkdir /opt/tools
+          # Create software installation root directory
+          mkdir /opt/software
+          ````
+
+        - Git
+
+          ```shell
+          # Save the trouble of compiling and install directly with yum
+          yum install -y git
+          ````
+
+        - JDK8
+
+          ```shell
+          # Two ways, the first is to save additional download and configuration, directly use yum to install, install the devel package to get some tools, such as the jps command
+          yum install -y java-1.8.0-openjdk java-1.8.0-openjdk-devel
+          
+          # The second is to download the installation package of the arm64 architecture, decompress and configure the environment variables and use
+          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
+          ````
 
-1. [Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
-2. [Node v12.13.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
+        - Maven
 
-## ~~ Compile with GCC 10 (deprecated) ~~
+          ```shell
+          cd /opt/tools
+          # After the wget tool is downloaded, directly decompress the configuration environment variable to use
+          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 for 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 and exit and refresh environment variables
+          source /etc/profile.d/doris.sh
+          
+          # test for success
+          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 extra 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
+
+          Ubuntu's shell installs dash instead of bash by default. It needs to be switched to bash to execute. 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 or no and confirm
+
+          Doing so will reconfigure dash from being the default shell tool
+
+        - Create software download and installation package root directory and software installation root directory
+
+          ```shell
+          # Create the root directory of the software download and installation package
+          mkdir /opt/tools
+          # Create software installation root directory
+          mkdir /opt/software
+          ````
+
+        - Git
+
+          ```shell
+          # Save the trouble of compiling and install directly with apt-get
+          apt-get -y install git
+          ````
+
+        - JDK8
+
+          ```shell
+          # Download the installation package of arm64 architecture, decompress and configure environment variables and use
+          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
+          # After the wget tool is downloaded, directly decompress the configuration environment variable to use
+          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 for 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 and exit and refresh environment variables
+          source /etc/profile.d/doris.sh
+          
+          # test for success
+          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 extra 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 the source code
+
+        ```shell
+        cd /opt
+        git clone https://github.com/apache/incubator-doris.git
+        ```
 
-This method only works with Doris source code before [commit 68bab73](https://github.com/apache/incubator-doris/commit/68bab73c359e40bf485a663e9a6e6ee76d81d382).
+        #### Install and deploy
 
-### Compilation tool installation (no network)
+        ##### Check if AVX2 instruction set is supported
 
-In the example, all tools are installed in the `/home/doris/tools/installed/` directory.
+        If there is data returned, it means support, if no data is returned, it means not supported
 
-Please obtain the required installation package first under network conditions.
+        ```shell
+        cat /proc/cpuinfo | grep avx2
+        ````
 
-#### 1. Install gcc10
+        ##### Execute compilation
 
-Download gcc-10.1.0
+        ```shell
+        # For machines that support AVX2 instruction set, you can compile them 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
+        ````
 
-```
-wget https://mirrors.tuna.tsinghua.edu.cn/gnu/gcc/gcc-10.1.0/gcc-10.1.0.tar.gz
-```
+     ### common problem
 
-After unzipping, check the dependencies in `contrib/download_prerequisites` and download:
+     1. Compile the third-party library libhdfs3.a , the folder cannot be found
 
-```
-http://gcc.gnu.org/pub/gcc/infrastructure/gmp-6.1.0.tar.bz2
-http://gcc.gnu.org/pub/gcc/infrastructure/mpfr-3.1.4.tar.bz2
-http://gcc.gnu.org/pub/gcc/infrastructure/mpc-1.0.3.tar.gz
-http://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
-```
+         - Problem Description
 
-Unzip these four dependencies, then move to the gcc-10.1.0 source directory and rename them to gmp, isl, mpc, mpfr.
+           During the compilation and installation process, the following error occurred
 
-Download and install automake-1.15 (because gcc10 will find automake 1.15 version during compilation)
+           > not found lib/libhdfs3.a file or directory
 
-```
-https://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
-tar xzf automake-1.15.tar.gz
-./configure --prefix=/home/doris/tools/installed
-make && make install
-export PATH=/home/doris/tools/installed/bin:$PATH
-```
+         - problem causes
 
-Compile GCC10:
+           There is a problem with the dependency download of the third-party library
 
-```
-cd gcc-10.1.0
-./configure --prefix=/home/doris/tools/installed
-make -j && make install
-```
+         - solution
 
-Compile time is longer.
+           - Use a third-party download repository
 
-#### 2. Install other compilation components
+             ```shell
+             export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty
+             sh /opt/incubator-doris/thirdparty/build-thirdparty.sh
+             ````
 
-1. jdk-8u291-linux-aarch64.tar.gz
+             REPOSITORY_URL contains all third-party library source packages and their historical versions.
 
-    `https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html`
+     2. python command not found
 
-    No need to compile, just use it out of the box.
+        - Problem Description
 
-2. cmake-3.19.8-Linux-aarch64.tar.gz
+          - An exception is thrown when executing build.sh
 
-    `https://cmake.org/download/`
+            > /opt/incubator-doris/env.sh: line 46: python: command not found
+            >
+            > Python 2.7.18
 
-    No need to compile, just use it out of the box
+        - problem causes
 
-3. apache-maven-3.8.1-bin.tar.gz
+          After searching, it is found that the system uses `python2.7`, `python3.6`, `python2`, `python3` by default to execute python commands. Doris installation requires python 2.7+ version, so only need Just add a command named `python` to connect, both version 2 and version 3 can be used
 
-    `https://maven.apache.org/download.cgi`
+        - solution
 
-    No need to compile, just use it out of the box
+          Establish a soft link to the `python` command in `\usr\bin`
 
-4. nodejs 16.3.0
+          ```shell
+          # View python installation directory
+          whereis python
+          # Establish soft connection
+          sudo ln -s /usr/bin/python2.7 /usr/bin/python
+          ````
 
-    `https://nodejs.org/dist/v16.3.0/node-v16.3.0-linux-arm64.tar.xz`
+     3. There is no output directory after compilation
 
-    No need to compile, just use it out of the box
+        - Problem Description
 
-5. libtool-2.4.6.tar.gz
+          - After the execution of build.sh ends, the output folder is not found in the directory.
 
-    For compiling third-party components, although the system may come with libtool, libtool needs to be together with automake, so it is not easy to cause problems.
+        - problem causes
 
-    ```
-    https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz
-    cd libtool-2.4.6/
-    ./configure --prefix=/home/doris/tools/installed
-    make -j && make install
-    ```
+          Failed to compile, need to recompile
 
-6. binutils-2.36.tar.xz (obtain bdf.h)
+        - solution
 
-    ```
-    https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.bz2
-    ./configure --prefix=/home/doris/tools/installed
-    make -j && make install
-    ```
+          ```shell
+          sh build.sh --clean
+          ````
 
-7. Libiberty (for compiling BE)
+     4. spark-dpp compilation failed
 
-    The source code of this library is under the source code package of gcc-10.1.0
-    ```
-    cd gcc-10.1.0/libiberty/
-    ./configure --prefix=/home/doris/tools/installed
-    make
-    ```
+        - Problem Description
 
-    After compilation, libiberty.a will be generated, which can be moved to the lib64 directory of Doris' thirdparty.
+          - After compiling build.sh, compiling to Spark-DPP fails with an error
 
-#### 3. Compile third-party libraries
+            > Failed to execute goal on project spark-dpp
 
-Suppose Doris source code is under `/home/doris/doris-src/`.
+        - problem causes
 
-1. Manually download all third-party libraries and place them in the thirdparty/src directory.
-2. Add `custom_env.sh` in the Doris source directory and add the following content
+          The last error message is due to the download failure (and because it failed to connect to the repo.maven.apache.org central repository)
 
-    ```
-    export DORIS_THIRDPARTY=/home/doris/doris-src/thirdparty/
-    export JAVA_HOME=/home/doris/tools/jdk1.8.0_291/
-    export DORIS_GCC_HOME=/home/doris/tools/installed/
-    export PATCH_COMPILER_RT=true
-    ```
+          > Could not transfer artifact org.apache.spark:spark-sql_2.12:jar:2.4.6 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo .maven.apache.org/maven2/org/apache/spark/spark-sql_2.12/2.4.6/spark-sql_2.12-2.4.6.jar: Unknown host repo.maven.apache.org
 
-    Pay attention to replace the corresponding directory
+          rebuild
 
-3. Modify part of the content in build-thirdparty.sh
+        - solution
 
-    1. Close `build_mysql` and `build_libhdfs3`
+          - rebuild
 
-        mysql is no longer needed. However, libhdfs3 does not support arm architecture for the time being, so running Doris in arm does not support direct access to hdfs through libhdfs3, and requires a broker.
+     5. The remaining space is insufficient, and the compilation fails
 
-    2. Add the configure parameter in `build_curl`: `--without-libpsl`. If it is not added, an error may be reported during the linking phase of the final compilation of Doris BE: `undefined reference to ‘psl_is_cookie_domain_acceptable'`
+        - Problem Description
 
-4. Execute build-thirdparty.sh. Here are only possible errors
+          - Failed to build CXX object during compilation, indicating insufficient free space
 
-    * `error: narrowing conversion of'-1' from'int' to'char' [-Wnarrowing]`
+            > fatal error: error writing to /tmp/ccKn4nPK.s: No space left on device
+            > 1112 | } // namespace doris::vectorized
+            > compilation terminated.
 
-        There will be an error when compiling brpc 0.9.7. The solution is to add `-Wno-narrowing` in `CMAKE_CXX_FLAGS` of CMakeLists.txt of brpc. This problem has been fixed in the brpc master code:
+        - problem causes
 
-        `https://github.com/apache/incubator-brpc/issues/1091`
+          Insufficient free space on the device
 
-    * `libz.a(deflate.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `z_errmsg' which may bind externally can not be used when making a shared object; recompile with -fPIC`
+        - solution
 
-        There will be errors when compiling brpc 0.9.7, and libcrypto will also report similar errors. The reason is unknown. It seems that under aarch64, brpc needs to link the dynamic zlib and crypto libraries. But when we compile these two third-party libraries, we only compiled .a static files. Solution: Recompile zlib and openssl to generate .so dynamic library:
+          Expand the remaining space of the device, such as deleting unnecessary files, etc.
 
-        Open `build-thirdparty.sh`, find the `build_zlib` function, and change:
+     6. Failed to start FE, transaction -20 problem
 
-        ```
-        ./configure --prefix=$TP_INSTALL_DIR --static
-        Just change to
-        ./configure --prefix=$TP_INSTALL_DIR
-        ```
+        - Problem Description
 
-        Find `build_openssl` and comment out the following parts:
+          When starting FE, a transaction error 20 is reported, and the status is UNKNOWN
 
-        ```
-        #if [-f $TP_INSTALL_DIR/lib64/libcrypto.so ]; then
-        # rm -rf $TP_INSTALL_DIR/lib64/libcrypto.so*
-        #fi
-        #if [-f $TP_INSTALL_DIR/lib64/libssl.so ]; then
-        # rm -rf $TP_INSTALL_DIR/lib64/libssl.so*
-        #fi
-        ```
+          > [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
+
+        - problem causes
+
+          Insufficient hard disk space, need more space
+
+        - solution
+
+          Free up hard disk space or mount a new hard disk
+
+     7. BDB environment setting is abnormal, 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={}
+
+        - problem causes
+
+          The location of the FE is migrated, the hard disk information stored in the metadata cannot be matched, 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
+
+        - Problem Description
+
+          - A file not found error occurred during compilation, and the error is as follows
+
+            > Couldn't find pkg.m4 from pkg-config. Install the appropriate package for your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
+
+          - By looking up the above log, it is found that there is a problem with the compilation of the third-party library `libxml2`
+
+        - problem causes
+
+          `libxml2` tripartite library compilation error, pkg.m4 file not found
+
+          ***guess:***
+
+          1. An exception occurs when the Ubuntu system loads environment variables, resulting in the index under the ldb directory not being successfully loaded
+          2. The retrieval of environment variables during libxml2 compilation fails, resulting in the compilation process not retrieving the ldb/aclocal directory
+
+        - solution
+
+          Copy the `pkg.m4` file in the ldb/aclocal directory to the libxml2/m4 directory, and recompile the third-party library
+
+          ```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
+
+        - Problem Description
+
+          - An error is reported during the compilation process of the three-party package, the error is as follows
+
+            > -- Performing Test CURL_HAS_TLS_PROXY - Failed
+            > CMake Error at cmake/dependencies.cmake:15 (get_property):
+            > INTERFACE_LIBRARY targets may only have whitelisted properties. The
+            > property "LINK_LIBRARIES_ALL" is not allowed.
+
+          - After viewing the log, it is found that the internal is due to curl `No such file or directory`
 
-         Then go to `build-thirdparty.sh`, comment out other `build_xxx`, open only `build_zlib` and `build_openssl`, and `build_brpc` and later `build_xxx`. Then re-execute `build-thirdparty.sh`.
+            > fatal error: curl/curl.h: No such file or directory
+            > 2 | #include <curl/curl.h>
+            > compilation terminated.
+            > ninja: build stopped: subcommand failed.
 
-     * The compilation is stuck at a certain stage.
+        - problem causes
 
-         Not sure why. Solution: Rerun `build-thirdparty.sh`. `build-thirdparty.sh` can be executed repeatedly.
+          There is an error in the compilation environment. After checking the gcc version, it is found that it is the 9.3.0 version that comes with the system, so it is not compiled with ldb, and the ldb environment variable needs to be set
 
-#### 4. Compile Doris source code
+        - solution
 
-Execute `sh build.sh`.
+          Configure ldb environment variables
 
-#### 5. FAQ
+          ```shell
+          # Configure environment variables
+          vim /etc/profile.d/ldb.sh
+          export LDB_HOME=/opt/software/ldb_toolchain
+          export PATH=$LDB_HOME/bin:$PATH
+          # save and exit and refresh environment variables
+          source /etc/profile.d/ldb.sh
+          # test
+          gcc --version
+          > gcc-11
+          ````
 
-1. `undefined reference to psl_free` appears when compiling Doris
+     10. Other abnormal problems
 
-     libcurl will call libpsl functions, but libpsl is not linked for an unknown reason. Solutions (choose one of the two):
+        - Problem Description
+       
+          If there is an error message of the following components, it will be solved with this solution
+       
+          - bison related
+            1. When installing bison-3.0.4, I get fseterr.c error
+          - flex related
+            1. flex command not found
+          - cmake related
+            1. cmake command not found
+            2. cmake cannot find the dependent library
+            3. cmake cannot find CMAKE_ROOT
+            4. Compiler set not found in cmake environment variable CXX
+          - boost related
+            1. Boost.Build build engine failed
+          - mysql related
+            1. Could not find mysql client dependency a file
+          - gcc related
+            1. GCC version requires 11+
+       
+        - problem causes
+       
+          Not compiled with Ldb-Toolschain
+       
+        - solution
+       
+          - Check if the Ldb-Toolschain environment variable is configured
+          - Check if gcc version is `gcc-11`
+          - Delete the ldb directory after the `ldb-toolschain.sh` script is executed, re-execute and configure the environment variables, and verify the gcc version
 
-     1. Add `--without-libpsl` to the `build_curl` method in `thirdparty/build-thirdparty.sh`, recompile libcurl, and then recompile Doris.
-     2. About line 603 in `be/CMakeLists.txt`, add `-lpsl` after `-pthread`, and then recompile Doris.
+     
diff --git a/docs/zh-CN/install/source-install/compilation-arm.md b/docs/zh-CN/install/source-install/compilation-arm.md
index c334af1d70..c5565752f5 100644
--- a/docs/zh-CN/install/source-install/compilation-arm.md
+++ b/docs/zh-CN/install/source-install/compilation-arm.md
@@ -24,13 +24,15 @@ specific language governing permissions and limitations
 under the License.
 -->
 
-# ARM64 + KylinOS 编译运行 Doris
+# Apache Doris ARM 架构编译
 
 本文档介绍如何在 ARM64 平台上编译 Doris。
 
 注意,该文档仅作为指导性文档。在不同环境中编译可能出现其他错误。
 
-## 软硬件环境
+## KylinOS
+
+### 软硬件环境
 
 1. KylinOS 版本:
 
@@ -44,14 +46,14 @@ under the License.
     dist_id=Kylin-Server-10-SP1-Release-Build04-20200711-arm64-2020-07-11 17:16:54
     ```
 
-2. CPU型号
+2. CPU型号:
 
     ```
     $> cat /proc/cpuinfo
     model name  : Phytium,FT-2000+/64
     ```
 
-## 使用 ldb-toolchain 编译
+### 使用 ldb-toolchain 编译
 
 该方法适用于 [commit 7f3564](https://github.com/apache/incubator-doris/commit/7f3564cca62de49c9f2ea67fcf735921dbebb4d1) 之后的 Doris 版本。
 
@@ -63,3 +65,531 @@ under the License.
 
 1. [Java8-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/jdk-8u291-linux-aarch64.tar.gz)
 2. [Node v12.13.0-aarch64](https://doris-thirdparty-repo.bj.bcebos.com/thirdparty/node-v16.3.0-linux-arm64.tar.xz)
+
+## CentOS & Ubuntu
+
+### 硬件环境
+
+1. 系统版本:CentOS 8.4、Ubuntu 20.04
+2. 系统架构:ARM X64
+3. CPU:4 C
+4. 内存:16 GB
+5. 硬盘:40GB(SSD)、100GB(SSD)
+
+### 软件环境
+
+#### 软件环境对照表
+
+| 组件名称                                                     | 组件版本             |
+| ------------------------------------------------------------ | -------------------- |
+| Git                                                          | 2.0+                 |
+| JDK                                                          | 1.8.0                |
+| Maven                                                        | 3.6.3                |
+| NodeJS                                                       | 16.3.0               |
+| LDB-Toolchain                                                | 0.9.1                |
+| 常备环境:<br />byacc<br />patch<br />automake<br />libtool<br />make<br />which<br />file<br />ncurses-devel<br />gettext-devel<br />unzip<br />bzip2<br />zip<br />util-linux<br />wget<br />git<br />python2 | yum或apt自动安装即可 |
+| 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
+  ```
+
+#### 下载源码
+
+```shell
+cd /opt
+git clone https://github.com/apache/incubator-doris.git
+```
+
+#### 安装部署
+
+##### 查看是否支持 AVX2 指令集
+
+若有数据返回,则代表支持,若无数据返回,则代表不支持
+
+```shell
+cat /proc/cpuinfo | grep avx2
+```
+
+##### 执行编译
+
+```shell
+# 支持 AVX2 指令集的机器,直接编译即可
+sh build.sh
+# 不支持 AVX2 指令集的机器,使用如下命令编译
+USE_AVX2=OFF sh build.sh
+```
+
+### 常见问题
+
+1. 编译第三方库 libhdfs3.a ,找不到文件夹
+
+   - 问题描述
+
+     在执行编译安装过程中,出现了如下报错
+
+     > not found lib/libhdfs3.a file or directory
+
+   - 问题原因
+
+     第三方库的依赖下载有问题
+
+   - 解决方案
+
+     - 使用第三方下载仓库
+
+       ```shell
+       export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty
+       sh /opt/incubator-doris/thirdparty/build-thirdparty.sh
+       ```
+
+       REPOSITORY_URL 中包含所有第三方库源码包和他们的历史版本。
+
+2. python 命令未找到
+
+   - 问题描述
+
+     - 执行 build.sh 时抛出异常
+
+       > /opt/incubator-doris/env.sh: line 46: python: command not found
+       >
+       > Python 2.7.18
+
+   - 问题原因
+
+     经查找,发现该系统默认使用 `python2.7`、 `python3.6`、`python2`、`python3` 这几个命令来执行 python 命令,Doris安装依赖需要 python 2.7+ 版本即可,故只需要添加名为 `python` 的命令连接即可,使用版本2和版本3的都可以
+
+   - 解决方案
+
+     建立 `\usr\bin` 中 `python` 命令的软连接
+
+     ```shell
+     # 查看python安装目录
+     whereis python
+     # 建立软连接
+     sudo ln -s /usr/bin/python2.7 /usr/bin/python
+     ```
+
+3. 编译结束后没有 output 目录
+
+   - 问题描述
+
+     - build.sh 执行结束后,目录中未发现 output 文件夹.
+
+   - 问题原因
+
+     未成功编译,需重新编译
+
+   - 解决方案
+
+     ```shell
+     sh build.sh --clean
+     ```
+
+4. spark-dpp 编译失败
+
+   - 问题描述
+
+     - 执行 build.sh 编译以后,编译至 Spark-DPP 报错失败
+
+       > Failed to execute goal on project spark-dpp
+
+   - 问题原因
+
+     最后的错误提示,是由于下载失败(且由于是未能连接到 repo.maven.apache.org 中央仓库)的问题
+
+     > Could not transfer artifact org.apache.spark:spark-sql_2.12:jar:2.4.6 from/to central (https://repo.maven.apache.org/maven2): Transfer failed for https://repo.maven.apache.org/maven2/org/apache/spark/spark-sql_2.12/2.4.6/spark-sql_2.12-2.4.6.jar: Unknown host repo.maven.apache.org
+
+     重新 build
+
+   - 解决方案
+
+     - 重新 build
+
+5. 剩余空间不足,编译失败
+
+   - 问题描述
+
+     - 编译过程中报 构建 CXX 对象失败,提示剩余空间不足
+
+       >  fatal error: error writing to /tmp/ccKn4nPK.s: No space left on device
+       >  1112 | } // namespace doris::vectorized
+       >  compilation terminated.
+
+   - 问题原因
+
+     设备剩余空间不足
+
+   - 解决方案
+
+     扩大设备剩余空间,如删除不需要的文件等
+
+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 文件
+
+   - 问题描述
+
+     - 编译过程中出现了找不到文件错误,报错如下
+
+       > Couldn't find pkg.m4 from pkg-config. Install the appropriate package for your distribution or set ACLOCAL_PATH to the directory containing pkg.m4.
+
+     - 通过查找上面的日志,发现是 `libxml2` 这个三方库在编译的时候出现了问题
+
+   - 问题原因
+
+     `libxml2` 三方库编译错误,找不到 pkg.m4 文件
+
+     ***猜测:***
+
+     1. Ubuntu 系统加载环境变量时有异常,导致 ldb 目录下的索引未被成功加载
+     2. 在 libxml2 编译时检索环境变量失效,导致编译过程没有检索到 ldb/aclocal 目录
+
+   - 解决方案
+
+     将 ldb/aclocal 目录下的 `pkg.m4` 文件拷贝至 libxml2/m4 目录下,重新编译第三方库
+
+     ```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. 执行测试 CURL_HAS_TLS_PROXY 失败
+
+   - 问题描述
+
+     - 三方包编译过程报错,错误如下
+
+       > -- Performing Test CURL_HAS_TLS_PROXY - Failed
+       > CMake Error at cmake/dependencies.cmake:15 (get_property):
+       > INTERFACE_LIBRARY targets may only have whitelisted properties.  The
+       > property "LINK_LIBRARIES_ALL" is not allowed.
+
+     - 查看日志以后,发现内部是由于 curl `No such file or directory`
+
+       > fatal error: curl/curl.h: No such file or directory
+       >  2 |     #include <curl/curl.h>
+       > compilation terminated.
+       > ninja: build stopped: subcommand failed.
+
+   - 问题原因
+
+     编译环境有错误,查看 gcc 版本后发现是系统自带的 9.3.0 版本,故而没有走 ldb 编译,需设置 ldb 环境变量
+
+   - 解决方案
+
+     配置 ldb 环境变量
+
+     ```shell
+     # 配置环境变量
+     vim /etc/profile.d/ldb.sh
+     export LDB_HOME=/opt/software/ldb_toolchain
+     export PATH=$LDB_HOME/bin:$PATH
+     # 保存退出并刷新环境变量
+     source /etc/profile.d/ldb.sh
+     # 测试
+     gcc --version
+     > gcc-11
+     ```
+
+10. 其他异常问题
+
+   - 问题描述
+
+     如有以下组件的错误提示,则统一以该方案解决
+
+     - bison 相关
+       1. 安装 bison-3.0.4 时报 fseterr.c 错误
+     - flex 相关
+       1. flex 命令未找到
+     - cmake 相关
+       1. cmake 命令未找到
+       2. cmake 找不到依赖库
+       3. cmake 找不到 CMAKE_ROOT
+       4. cmake 环境变量 CXX 中找不到编译器集
+     - boost 相关
+       1. Boost.Build 构建引擎失败
+     - mysql 相关
+       1. 找不到 mysql 的客户端依赖 a 文件
+     - gcc 相关
+       1. GCC 版本需要11+
+
+   - 问题原因
+
+     未使用 Ldb-Toolschain 进行编译
+
+   - 解决方案
+
+     - 检查 Ldb-Toolschain 环境变量是否配置
+     - 查看 gcc 版本是否是 `gcc-11`
+     - 删除 `ldb-toolschain.sh` 脚本执行后的 ldb 目录,重新执行并配置环境变量,验证 gcc 版本
+


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org