Doris V2.1.0 源码编译be与audit失败

Viewed 91

fe编译成功了,但是be和audit失败了。前期环境都配置好了,之前成功编译了v2.0.1.2,使用的是ldb_toolchain_gen.aarch64.sh,具体配置如下:

[root@hadoop992 apache-doris-2.1.0-src]# java -version
openjdk version "1.8.0_392"
OpenJDK Runtime Environment Bisheng (build 1.8.0_392-b08)
OpenJDK 64-Bit Server VM Bisheng (build 25.392-b08, mixed mode)

[root@hadoop992 apache-doris-2.1.0-src]# mvn -version
Apache Maven 3.9.6 (bc0240f3c744dd6b6ec2920b3cd08dcc295161ae)
Maven home: /opt/software/maven
Java version: 1.8.0_392, vendor: Bisheng, runtime: /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.392.b08-2.p01.ky10.aarch64/jre
Default locale: zh_CN, platform encoding: UTF-8
OS name: "linux", version: "4.19.90-23.8.v2101.ky10.aarch64", arch: "aarch64", family: "unix"

[root@hadoop992 apache-doris-2.1.0-src]# node --version
v16.3.0

[root@hadoop992 apache-doris-2.1.0-src]# gcc --version
gcc-11 (Ubuntu 11.1.0-1ubuntu1~18.04.1) 11.1.0
Copyright (C) 2021 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

硬件配置:
CPU型号:HUAWEI kunpeng920 5250
内存:32G x 8(=256G)
硬盘:SATA 8T8 + SSD 960G2
系统版本:银河麒麟v10

编译audit报错:

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] /opt/software/apache-doris-2.1.0-src/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java:[218,68] error: cannot find symbol
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  18.413 s
[INFO] Finished at: 2024-03-26T11:29:30+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project auditloader: Compilation failure
[ERROR] /opt/software/apache-doris-2.1.0-src/fe_plugins/auditloader/src/main/java/org/apache/doris/plugin/audit/AuditLoaderPlugin.java:[218,68] error: cannot find symbol
[ERROR] 
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException

编译be报错(已经编译过很多遍,剩这14个.o文件编译失败):

[10/14] Building CXX object src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o
FAILED: src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o 
/opt/software/ldb_toolchain/bin/g++ -DBOOST_STACKTRACE_USE_BACKTRACE -DHAVE_INTTYPES_H -DHAVE_NETINET_IN_H -DUSE_HADOOP_HDFS -I/opt/software/apache-doris-2.1.0-src/be/src/apache-orc/c++/include -I/opt/software/apache-doris-2.1.0-src/be/build_Release/src/apache-orc/c++/include -I/opt/software/apache-doris-2.1.0-src/be/build_Release/src/clucene/src/shared -I/opt/software/apache-doris-2.1.0-src/be/src/clucene/src/core -I/opt/software/apache-doris-2.1.0-src/be/src/clucene/src/shared -I/opt/software/apache-doris-2.1.0-src/be/src/clucene/src/contribs-lib -I/opt/software/apache-doris-2.1.0-src/be/src -I/opt/software/apache-doris-2.1.0-src/be/test -I/usr/lib/jvm/java-1.8.0-openjdk/include -I/usr/lib/jvm/java-1.8.0-openjdk/include/linux -isystem /opt/software/apache-doris-2.1.0-src/be/../gensrc/build -isystem /opt/software/apache-doris-2.1.0-src/thirdparty/installed/include -isystem /opt/software/apache-doris-2.1.0-src/thirdparty/installed/gperftools/include -O3 -DNDEBUG  -O3 -DNDEBUG   -D OS_LINUX -g -Wall -Wextra -Werror -pthread -fstrict-aliasing -fno-omit-frame-pointer -Wnon-virtual-dtor -Wno-unused-parameter -Wno-sign-compare -fdiagnostics-color=always -Wno-nonnull -Wno-stringop-overread -Wno-stringop-overflow -Wno-array-bounds -D__STDC_FORMAT_MACROS -DBOOST_DATE_TIME_POSIX_TIME_STD_CONFIG -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_UUID_RANDOM_PROVIDER_FORCE_POSIX=1 -DBRPC_ENABLE_CPU_PROFILER -DS2_USE_GFLAGS -DS2_USE_GLOG -march=armv8-a+crc -DUSE_MEM_TRACKER -DUSE_JEMALLOC -DENABLE_STACKTRACE -std=gnu++20 -MD -MT src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o -MF src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o.d -o src/olap/CMakeFiles/Olap.dir/tablet_reader.cpp.o -c /opt/software/apache-doris-2.1.0-src/be/src/olap/tablet_reader.cpp
In file included from /opt/software/apache-doris-2.1.0-src/be/src/olap/types.h:58,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/rowset/segment_v2/binary_plain_page.h:37,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/rowset/segment_v2/binary_dict_page.h:30,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/rowset/segment_v2/parsed_page.h:25,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/rowset/segment_v2/indexed_column_reader.h:34,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/rowset/segment_v2/bitmap_index_reader.h:29,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/column_predicate.h:23,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/block_column_predicate.h:33,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/iterators.h:24,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/tablet_reader.h:37,
                 from /opt/software/apache-doris-2.1.0-src/be/src/olap/tablet_reader.cpp:18:
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::EQ, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::GE, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::LE, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::GT, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::IN_LIST, std::vector<std::__cxx11::basic_string<char> > >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::NE, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::LT, std::__cxx11::basic_string<char> >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h: In static member function 'static _Res std::_Function_handler<_Res(_ArgTypes ...), _Functor>::_M_invoke(const std::_Any_data&, _ArgTypes&& ...) [with _Res = unsigned int; _Functor = doris::get_creator<doris::PredicateType::NOT_IN_LIST, std::vector<std::__cxx11::basic_string<char> > >(const doris::FieldType&)::<lambda(const string&)>; _ArgTypes = {const std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&}]':
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:64:15: error: 'parse_value' may be used uninitialized in this function [-Werror=maybe-uninitialized]
   64 |         value = static_cast<vectorized::IPv4>(parse_value);
      |         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/software/apache-doris-2.1.0-src/be/src/vec/runtime/ipv4_value.h:51:17: note: 'parse_value' was declared here
   51 |         int64_t parse_value;
      |                 ^~~~~~~~~~~
cc1plus: all warnings being treated as errors
ninja: build stopped: subcommand failed.
1 Answers

之前成功编译的环境和当前编译环境是否一致;
为更具体地了解问题(处理后会更新回帖),可以➕我一下W:yz-jayhua