This is an automated email from the ASF dual-hosted git repository. kxiao 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 fe03c429387 [branch-2.0](chore) pick a ut fix and a doc fix (#31004) fe03c429387 is described below commit fe03c42938739c1aef5246c522d3db118be8d206 Author: zclllyybb <zhaochan...@selectdb.com> AuthorDate: Tue Feb 13 15:14:36 2024 +0800 [branch-2.0](chore) pick a ut fix and a doc fix (#31004) --- be/test/vec/function/function_like_test.cpp | 86 ++-- .../docs/install/source-install/compilation-arm.md | 504 +++++++++++---------- .../docs/install/source-install/compilation-arm.md | 492 ++++++++++---------- 3 files changed, 577 insertions(+), 505 deletions(-) diff --git a/be/test/vec/function/function_like_test.cpp b/be/test/vec/function/function_like_test.cpp index 488fda5eb1d..eacad9b0014 100644 --- a/be/test/vec/function/function_like_test.cpp +++ b/be/test/vec/function/function_like_test.cpp @@ -15,12 +15,9 @@ // specific language governing permissions and limitations // under the License. -#include <stdint.h> - +#include <cstdint> #include <string> -#include <vector> -#include "common/status.h" #include "function_test_util.h" #include "gtest/gtest_pred_impl.h" #include "testutil/any_type.h" @@ -34,44 +31,53 @@ namespace doris::vectorized { TEST(FunctionLikeTest, like) { std::string func_name = "like"; - DataSet data_set = {// sub_string - {{std::string("abc"), std::string("%b%")}, uint8_t(1)}, - {{std::string("abc"), std::string("%ad%")}, uint8_t(0)}, - // end with - {{std::string("abc"), std::string("%c")}, uint8_t(1)}, - {{std::string("ab"), std::string("%c")}, uint8_t(0)}, - // start with - {{std::string("abc"), std::string("a%")}, uint8_t(1)}, - {{std::string("bc"), std::string("a%")}, uint8_t(0)}, - // equals - {{std::string(""), std::string("")}, uint8_t(1)}, - {{std::string(""), std::string(" ")}, uint8_t(0)}, - {{std::string(" "), std::string(" ")}, uint8_t(1)}, - {{std::string(" "), std::string("")}, uint8_t(0)}, - {{std::string("abc"), std::string("")}, uint8_t(0)}, - {{std::string("abc"), std::string(" ")}, uint8_t(0)}, - {{std::string("abc"), std::string("abc")}, uint8_t(1)}, - {{std::string("abc"), std::string("ab")}, uint8_t(0)}, - // full regexp match - {{std::string("abcd"), std::string("a_c%")}, uint8_t(1)}, - {{std::string("abcd"), std::string("a_d%")}, uint8_t(0)}, - {{std::string("abc"), std::string("__c")}, uint8_t(1)}, - {{std::string("abc"), std::string("_c")}, uint8_t(0)}, - {{std::string("abc"), std::string("_b_")}, uint8_t(1)}, - {{std::string("abc"), std::string("_a_")}, uint8_t(0)}, - {{std::string("abc"), std::string("a__")}, uint8_t(1)}, - {{std::string("abc"), std::string("a_")}, uint8_t(0)}, - // null - {{std::string("abc"), Null()}, Null()}, - {{Null(), std::string("_x__ab%")}, Null()}}; + DataSet data_set = { + // sub_string + {{std::string("abc"), std::string("%b%")}, uint8_t(1)}, + {{std::string("abc"), std::string("%ad%")}, uint8_t(0)}, + // end with + {{std::string("abc"), std::string("%c")}, uint8_t(1)}, + {{std::string("ab"), std::string("%c")}, uint8_t(0)}, + // start with + {{std::string("abc"), std::string("a%")}, uint8_t(1)}, + {{std::string("bc"), std::string("a%")}, uint8_t(0)}, + // equals + {{std::string(""), std::string("")}, uint8_t(1)}, + {{std::string(""), std::string(" ")}, uint8_t(0)}, + {{std::string(" "), std::string(" ")}, uint8_t(1)}, + {{std::string(" "), std::string("")}, uint8_t(0)}, + {{std::string("abc"), std::string("")}, uint8_t(0)}, + {{std::string("abc"), std::string(" ")}, uint8_t(0)}, + {{std::string("abc"), std::string("abc")}, uint8_t(1)}, + {{std::string("abc"), std::string("ab")}, uint8_t(0)}, + // full regexp match + {{std::string("abcd"), std::string("a_c%")}, uint8_t(1)}, + {{std::string("abcd"), std::string("a_d%")}, uint8_t(0)}, + {{std::string("abc"), std::string("__c")}, uint8_t(1)}, + {{std::string("abc"), std::string("_c")}, uint8_t(0)}, + {{std::string("abc"), std::string("_b_")}, uint8_t(1)}, + {{std::string("abc"), std::string("_a_")}, uint8_t(0)}, + {{std::string("abc"), std::string("a__")}, uint8_t(1)}, + {{std::string("abc"), std::string("a_")}, uint8_t(0)}, + // null + {{std::string("abc"), Null()}, Null()}, + {{Null(), std::string("_x__ab%")}, Null()}, + // escape chars + {{std::string("facebook_10008_T1+T2-ALL_AAA-VO_LowestCost_20230830_HSJ"), + std::string("%facebook_10008_T1+T2%")}, + uint8_t(1)}, + {{std::string("!z23]"), std::string("_[z]%")}, uint8_t(0)}, + {{std::string("[123]"), std::string("%[1.*]%")}, uint8_t(0)}, + {{std::string("1\\b\\b"), std::string("%_\\b\\b%")}, uint8_t(1)}, + {{std::string("1\\d\\d"), std::string("%_\\d\\d%")}, uint8_t(1)}, + {{std::string("1dd"), std::string("%_dd%")}, + uint8_t(1)} // this case can't be same as regression-test because of FE's string escape operation + }; // pattern is constant value - InputTypeSet const_pattern_input_types = {TypeIndex::String, Consted {TypeIndex::String}}; - for (const auto& line : data_set) { - DataSet const_pattern_dataset = {line}; - check_function<DataTypeUInt8, true>(func_name, const_pattern_input_types, - const_pattern_dataset); - } + InputTypeSet const_pattern_input_types = {TypeIndex::String, TypeIndex::String}; + static_cast<void>( + check_function<DataTypeUInt8, true>(func_name, const_pattern_input_types, data_set)); } TEST(FunctionLikeTest, regexp) { diff --git a/docs/en/docs/install/source-install/compilation-arm.md b/docs/en/docs/install/source-install/compilation-arm.md index 6a828752192..6cb39070313 100644 --- a/docs/en/docs/install/source-install/compilation-arm.md +++ b/docs/en/docs/install/source-install/compilation-arm.md @@ -24,6 +24,9 @@ specific language governing permissions and limitations under the License. --> +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Compile with ARM This topic is about how to compile Doris on the ARM64 platform. @@ -32,35 +35,32 @@ Note that this document is intended as a guide only. Other errors may occur when ## Hardware/OS environment -### KylinOS - -1. KylinOS Version: +1. KylinOS: ```shell - $> 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 + +$> cat /proc/cpuinfo +model name : Phytium,FT-2000+/64 ``` -2. CPU Model: +2. CentOS 8.4 ```shell - $> cat /proc/cpuinfo - model name : Phytium,FT-2000+/64 +$> lsb_release -a +LSB Version: :core-4.1-aarch64:core-4.1-noarch +Distributor ID: CentOS +Description: CentOS Linux release 7.9.2009 (AltArch) +Release: 7.9.2009 +Codename: AltArch ``` -### CentOS & Ubuntu - -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 List @@ -81,250 +81,258 @@ Note that this document is intended as a guide only. Other errors may occur when <Tabs> <TabItem value="CentOS 8.4" label="CentOS 8.4" default> <p> - 1. Create root directories for pacakges + +1. Create root directories for pacakges ```shell - # Create root directory for software download and installation packages - mkdir /opt/tools - # Create root directory for software installation - mkdir /opt/software +# 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 - - Git +2. Installing dependencies + + - Git ```shell - # yum install (save the trouble of compilation) - yum install -y git + # 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 + # 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 + - 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 + 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 + - 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 + 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 + - 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/ + 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 + +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 +# 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 + +4. 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 +# 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 + +1. Update apt-get repository ```shell - apt-get update +apt-get update ``` - </p> + </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: +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 +ls -al /bin/sh ``` - The shell can be switched back to bash by: + The shell can be switched back to dash by: ```shell - sudo dpkg-reconfigure dash +sudo dpkg-reconfigure dash ``` - Then select no to confirm. - - After these steps, dash will no longer be the default shell tool. + 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 + +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 + # 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 + +4. Installing dependencies + - Git ```shell - # apt-get install, which can save the trouble of compilation - apt-get -y install git + # apt-get install, which can save the trouble of compilation + apt-get -y install git ``` - - JDK8 + - 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 + # 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 + - 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 + 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 + - 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 + 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 + - 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/ + 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 + +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 +# 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 + +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 +# 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> @@ -379,11 +387,11 @@ If you still encounter problems when compiling or starting, please consult the [ - Use a third-party download repository ```shell - export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty - sh /opt/doris/thirdparty/build-thirdparty.sh -```` + 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. + REPOSITORY_URL contains all third-party library source packages and their historical versions. 2. python command not found @@ -404,11 +412,11 @@ If you still encounter problems when compiling or starting, please consult the [ Establish a soft link to the `python` command in `\usr\bin` ```shell - # View python installation directory - whereis python - # Establish soft connection - sudo ln -s /usr/bin/python2.7 /usr/bin/python -```` + # 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 @@ -423,8 +431,8 @@ If you still encounter problems when compiling or starting, please consult the [ - Solution ```shell - sh build.sh --clean -```` + sh build.sh --clean +``` 4. spark-dpp compilation fails @@ -451,7 +459,9 @@ If you still encounter problems when compiling or starting, please consult the [ - Failed to build CXX object during compilation, error message showing no space left > fatal error: error writing to /tmp/ccKn4nPK.s: No space left on device + > > 1112 | } // namespace doris::vectorized + > > compilation terminated. - Cause @@ -481,12 +491,12 @@ If you still encounter problems when compiling or starting, please consult the [ - Solution - Copy the `pkg.m4` file in the ldb/aclocal directory into the libxml2/m4 directory, and recompile the third-party library. + Copy the `pkg.m4` file in the ldb/aclocal directory into 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 -```` + 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 +``` 7. Failed to execute test CURL_HAS_TLS_PROXY @@ -495,15 +505,19 @@ If you still encounter problems when compiling or starting, please consult the [ - An error is reported during the compilation process of the third-party package: > -- 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. + > + > INTERFACE_LIBRARY targets may only have whitelisted properties. The property "LINK_LIBRARIES_ALL" is not allowed. - The log shows: curl `No such file or directory` > fatal error: curl/curl.h: No such file or directory - > 2 | #include <curl/curl.h> + > + > 2 | #include <curl/curl.h> + > > compilation terminated. + > > ninja: build stopped: subcommand failed. - Cause @@ -515,16 +529,32 @@ If you still encounter problems when compiling or starting, please consult the [ Configure ldb environment variables ```shell - # Configure environment variables - vim /etc/profile.d/ldb.sh - export LDB_HOME=/opt/software/ldb_toolchain - export PATH=$LDB_HOME/bin:$PATH - # Save, exit, and refresh environment variables - source /etc/profile.d/ldb.sh - # Test - gcc --version - > gcc-11 -```` + # Configure environment variables + vim /etc/profile.d/ldb.sh + export LDB_HOME=/opt/software/ldb_toolchain + export PATH=$LDB_HOME/bin:$PATH + # Save, exit, and refresh environment variables + source /etc/profile.d/ldb.sh + # Test + gcc --version + > gcc-11 +``` + +8. The compilation process aborts with the words "ninja failed with: signal: killed". + + - Problem Description + + BE or thirdparty failed in the middle of compilation with a message containing + + > ninja failed with: signal: killed + + - Cause + + Insufficient memory on the machine + + - Solution + + Switch to a machine with more memory(at least 16GB) for compilation ### Problems about Starting @@ -535,6 +565,7 @@ If you still encounter problems when compiling or starting, please consult the [ 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 @@ -552,7 +583,8 @@ If you still encounter problems when compiling or starting, please consult the [ 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={} + > + > 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 @@ -577,34 +609,32 @@ If you still encounter problems when compiling or starting, please consult the [ ### Other Component Issues -1. - - Problem Description - - The follow error prompts are all due to one root cause. - - - bison related - 1. fseterr.c error when installing bison-3.0.4 - - 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+ - - - Cause - - Not compiled with ldb-toolchain - - - Solution - - - Check if the ldb-toolchain environment variable is configured - - Check if gcc version is `gcc-11` - - Delete the ldb directory after the `ldb_toolchain_gen.aarch64.sh` script is executed, re-execute and configure the environment variables, and verify the gcc version +- Problem Description + + The follow error prompts are all due to one root cause. + + - bison related + 1. fseterr.c error when installing bison-3.0.4 + - 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+ + +- Cause + + Not compiled with ldb-toolchain + +- Solution + - Check if the ldb-toolchain environment variable is configured + - Check that the gcc version matches the one recommended in the [compile-with-ldb-toolchain](./compilation-with-ldb-toolchain) documentation. + - Delete the ldb directory after the `ldb_toolchain_gen.aarch64.sh` script is executed, re-execute and configure the environment variables, and verify the gcc version \ No newline at end of file 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 1aab7134484..3eadab430f0 100644 --- a/docs/zh-CN/docs/install/source-install/compilation-arm.md +++ b/docs/zh-CN/docs/install/source-install/compilation-arm.md @@ -24,6 +24,9 @@ specific language governing permissions and limitations under the License. --> +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; + # Apache Doris Arm 架构编译 本文档介绍如何在 ARM64 平台上编译 Doris。 @@ -32,34 +35,35 @@ under the License. ## 硬件/操作系统环境 -### KylinOS +本章内容在以下环境中已经验证可行: -1. KylinOS 版本: +1. KylinOS: ```shell - $> 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 + +$> cat /proc/cpuinfo +model name : Phytium,FT-2000+/64 ``` -2. CPU型号: +2. CentOS 8.4 ```shell - $> cat /proc/cpuinfo - model name : Phytium,FT-2000+/64 +$> lsb_release -a +LSB Version: :core-4.1-aarch64:core-4.1-noarch +Distributor ID: CentOS +Description: CentOS Linux release 7.9.2009 (AltArch) +Release: 7.9.2009 +Codename: AltArch ``` -### CentOS & Ubuntu - -1. 系统版本:CentOS 8.4、Ubuntu 20.04 -2. 系统架构:ARM X64 -3. CPU:4 C -4. 内存:16 GB -5. 硬盘:40GB(SSD)、100GB(SSD) +3. Ubuntu 20.04 ## 软件环境配置 @@ -81,250 +85,259 @@ under the License. <Tabs> <TabItem value="CentOS 8.4" label="CentOS 8.4" default> <p> - 1. 创建软件下载安装包根目录和软件安装根目录 + +1. 创建软件下载安装包根目录和软件安装根目录 ```shell - # 创建软件下载安装包根目录 - mkdir /opt/tools - # 创建软件安装根目录 - mkdir /opt/software +# 创建软件下载安装包根目录 +mkdir /opt/tools +# 创建软件安装根目录 +mkdir /opt/software ``` </p> <p> - 2. 安装依赖项 - - Git +2. 安装依赖项 + + - Git ```shell - # 省去编译麻烦,直接使用 yum 安装 - yum install -y git + # 省去编译麻烦,直接使用 yum 安装 + yum install -y git ``` - - JDK8 + - 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 + # 两种方式,第一种是省去额外下载和配置,直接使用 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 + - 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 + 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 + - 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 + 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 + - 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/ + 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. 配置环境变量 + +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 +# 配置环境变量 +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. 安装其他额外环境和组件 + +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 +# 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 软件库 + +1. 更新 apt-get 软件库 ```shell - apt-get update +apt-get update ``` </p> <p> - 2. 检查 shell 命令集 - ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个: +2. 检查 shell 命令集 + + ubuntu 的 shell 默认安装的是 dash,而不是 bash,要切换成 bash 才能执行,运行以下命令查看 sh 的详细信息,确认 shell 对应的程序是哪个: ```shell - ls -al /bin/sh +ls -al /bin/sh ``` - 通过以下方式可以使 shell 切换回 bash: + 通过以下方式可以使 shell 切换回 dash: ```shell - sudo dpkg-reconfigure dash +sudo dpkg-reconfigure dash ``` - 然后选择 no 或者 否 ,并确认 - - 这样做将重新配置 dash,并使其不作为默认的 shell 工具 + 然后选择 no 或者 否 并确认。这样做将重新配置 dash,并使其不作为默认的 shell 工具 </p> <p> - 3. 创建软件下载安装包根目录和软件安装根目录 + +3. 创建软件下载安装包根目录和软件安装根目录 ```shell - # 创建软件下载安装包根目录 - mkdir /opt/tools - # 创建软件安装根目录 - mkdir /opt/software + # 创建软件下载安装包根目录 + mkdir /opt/tools + # 创建软件安装根目录 + mkdir /opt/software ``` </p> <p> - 4. 安装依赖项 - - Git + +4. 安装依赖项 + + - Git ```shell - # 省去编译麻烦,直接使用 apt-get 安装 - apt-get -y install git + # 省去编译麻烦,直接使用 apt-get 安装 + apt-get -y install git ``` - - JDK8 + - 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 + # 下载 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 + - 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 + 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 + - 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 + 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 + - 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/ + 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. 配置环境变量 + +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 +# 配置环境变量 +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. 安装其他额外环境和组件 + +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 +# 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> @@ -379,11 +392,11 @@ export USE_UNWIND=OFF - 使用第三方下载仓库 ```shell - export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty - sh /opt/doris/thirdparty/build-thirdparty.sh + export REPOSITORY_URL=https://doris-thirdparty-repo.bj.bcebos.com/thirdparty + sh /opt/doris/thirdparty/build-thirdparty.sh ``` - REPOSITORY_URL 中包含所有第三方库源码包和他们的历史版本。 + REPOSITORY_URL 中包含所有第三方库源码包和他们的历史版本。 2. python 命令未找到 @@ -404,10 +417,10 @@ export USE_UNWIND=OFF 建立 `\usr\bin` 中 `python` 命令的软连接 ```shell - # 查看python安装目录 - whereis python - # 建立软连接 - sudo ln -s /usr/bin/python2.7 /usr/bin/python + # 查看python安装目录 + whereis python + # 建立软连接 + sudo ln -s /usr/bin/python2.7 /usr/bin/python ``` 3. 编译结束后没有 output 目录 @@ -423,7 +436,7 @@ export USE_UNWIND=OFF - 解决方案 ```shell - sh build.sh --clean + sh build.sh --clean ``` 4. spark-dpp 编译失败 @@ -440,8 +453,6 @@ export USE_UNWIND=OFF > 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 @@ -453,7 +464,9 @@ export USE_UNWIND=OFF - 编译过程中报 构建 CXX 对象失败,提示剩余空间不足 > fatal error: error writing to /tmp/ccKn4nPK.s: No space left on device + > > 1112 | } // namespace doris::vectorized + > > compilation terminated. - 问题原因 @@ -478,7 +491,7 @@ export USE_UNWIND=OFF `libxml2` 三方库编译错误,找不到 pkg.m4 文件 - ***猜测:*** + ***可能的错误:*** 1. Ubuntu 系统加载环境变量时有异常,导致 ldb 目录下的索引未被成功加载 2. 在 libxml2 编译时检索环境变量失效,导致编译过程没有检索到 ldb/aclocal 目录 @@ -488,8 +501,8 @@ export USE_UNWIND=OFF 将 ldb/aclocal 目录下的 `pkg.m4` 文件拷贝至 libxml2/m4 目录下,重新编译第三方库 ```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 + 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 ``` 7. 执行测试 CURL_HAS_TLS_PROXY 失败 @@ -499,15 +512,19 @@ export USE_UNWIND=OFF - 三方包编译过程报错,错误如下 > -- 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. + > + > 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. - 问题原因 @@ -519,17 +536,33 @@ export USE_UNWIND=OFF 配置 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 + # 配置环境变量 + 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 ``` +8. 编译过程中止,提示 "ninja failed with: signal: killed" 相关字样 + + - 问题描述 + + BE 或三方库在编译中途失败,提示字样包含 + + > ninja failed with: signal: killed + + - 问题原因 + + 所在机器内存不足 + + - 解决方案 + + 换用更大内存(至少16GB)的机器进行编译 + ### 启动问题 1. 启动FE失败,事务-20 问题 @@ -539,6 +572,7 @@ export USE_UNWIND=OFF 在启动 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 - 问题原因 @@ -554,12 +588,15 @@ export USE_UNWIND=OFF - 问题描述 在迁移 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 元数据 - 若为测试机器,则可以删除元数据目录重新启动 @@ -577,33 +614,32 @@ export USE_UNWIND=OFF ### 其他组件问题 -1. - - 问题描述 - - 如有以下组件的错误提示,则统一以该方案解决: - - 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-toolchain 进行编译 - - - 解决方案 - - - 检查 ldb-toolchain 环境变量是否配置 - - 查看 gcc 版本是否与[使用ldb-toolchain编译](./compilation-with-ldb-toolchain)文档中推荐一致 - - 删除 `ldb_toolchain_gen.aarch64.sh` 脚本执行后的 ldb 目录,重新执行并配置环境变量,验证 gcc 版本 +- 问题描述 + + 如有以下组件的错误提示,则统一以该方案解决: + - 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-toolchain 进行编译 + +- 解决方案 + + - 检查 ldb-toolchain 环境变量是否配置 + - 查看 gcc 版本是否与[使用ldb-toolchain编译](./compilation-with-ldb-toolchain)文档中推荐一致 + - 删除 `ldb_toolchain_gen.aarch64.sh` 脚本执行后的 ldb 目录,重新执行并配置环境变量,验证 gcc 版本 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org