apache / doris

Apache Doris is an easy-to-use, high performance and unified analytics database.
https://doris.apache.org
Apache License 2.0
12.77k stars 3.29k forks source link

[Bug] Build Failed on latest code. #19844

Open Tiaonmmn opened 1 year ago

Tiaonmmn commented 1 year ago

Search before asking

Version

Latest master code.

What's Wrong?

On Ubuntu 22.04,build doris be failed. Build toolchain:GCC 11.3.0. When calling build.sh,errors occured:

FAILED: src/tools/meta_tool
: && /usr/bin/g++ -O3 -DNDEBUG  -O3 -DNDEBUG -fuse-ld=gold   -Wl,--export-dynamic -rdynamic src/glibc-compatibility/CMakeFiles/glibc-compatibility-explicit.dir/musl/getrandom.c.o src/glibc-compatibility/CMakeFiles/glibc-compatibility-explicit.dir/memcpy/memcpy_x86_64.cpp.o src/tools/CMakeFiles/meta_tool.dir/meta_tool.cpp.o -o src/tools/meta_tool  -Wl,--start-group  src/agent/libAgent.a  src/common/libCommon.a  src/exec/libExec.a  src/exprs/libExprs.a  src/gutil/libGutil.a  src/io/libIO.a  src/olap/libOlap.a  src/olap/rowset/libRowset.a  src/runtime/libRuntime.a  src/service/libService.a  src/udf/libUdf.a  src/util/libUtil.a  src/gen_cpp/libDorisGen.a  src/http/libWebserver.a  src/geo/libGeo.a  src/vec/libVec.a  src/pipeline/libPipeline.a  -Wl,--end-group  -Wl,--start-group  /awesome_github/doris/thirdparty/installed/lib/libic.a  /awesome_github/doris/thirdparty/installed/lib/libclucene-core-static.a  /awesome_github/doris/thirdparty/installed/lib/libclucene-shared-static.a  /awesome_github/doris/thirdparty/installed/lib/libclucene-contribs-lib.a  /awesome_github/doris/thirdparty/installed/lib/libbacktrace.a  /awesome_github/doris/thirdparty/installed/lib/librocksdb.a  /awesome_github/doris/thirdparty/installed/lib/libsasl2.a  /awesome_github/doris/thirdparty/installed/lib/libs2.a  /awesome_github/doris/thirdparty/installed/lib/libsnappy.a  /awesome_github/doris/thirdparty/installed/lib/libboost_date_time.a  /awesome_github/doris/thirdparty/installed/lib/libthrift.a  /awesome_github/doris/thirdparty/installed/lib/libthriftnb.a  /awesome_github/doris/thirdparty/installed/lib/libglog.a  /awesome_github/doris/thirdparty/installed/lib/libre2.a  /awesome_github/doris/thirdparty/installed/lib64/libhs.a  /awesome_github/doris/thirdparty/installed/gperftools/lib/libprofiler.a  /awesome_github/doris/thirdparty/installed/lib/liblz4.a  /awesome_github/doris/thirdparty/installed/lib/libevent.a  /awesome_github/doris/thirdparty/installed/lib/libevent_pthreads.a  /awesome_github/doris/thirdparty/installed/lib64/libidn.a  /awesome_github/doris/thirdparty/installed/lib/libgsasl.a  /awesome_github/doris/thirdparty/installed/lib/libcurl.a  /awesome_github/doris/thirdparty/installed/lib/libz.a  /awesome_github/doris/thirdparty/installed/lib/libbz2.a  /awesome_github/doris/thirdparty/installed/lib/libgflags.a  /awesome_github/doris/thirdparty/installed/lib64/libbrpc.a  /awesome_github/doris/thirdparty/installed/lib/libprotobuf.a  /awesome_github/doris/thirdparty/installed/lib/libssl.a  /awesome_github/doris/thirdparty/installed/lib/libcrypto.a  /awesome_github/doris/thirdparty/installed/lib/libleveldb.a  /awesome_github/doris/thirdparty/installed/lib/libbitshuffle.a  /awesome_github/doris/thirdparty/installed/lib/libroaring.a  /awesome_github/doris/thirdparty/installed/lib/libfmt.a  /awesome_github/doris/thirdparty/installed/lib/libjemalloc_doris.a  /awesome_github/doris/thirdparty/installed/lib64/libjemalloc.a  /awesome_github/doris/thirdparty/installed/lib64/libbrotlicommon.a  /awesome_github/doris/thirdparty/installed/lib64/libbrotlidec.a  /awesome_github/doris/thirdparty/installed/lib64/libbrotlienc.a  /awesome_github/doris/thirdparty/installed/lib64/libzstd.a  /awesome_github/doris/thirdparty/installed/lib64/libarrow.a  /awesome_github/doris/thirdparty/installed/lib64/libparquet.a  /awesome_github/doris/thirdparty/installed/lib/libodbc.a  /awesome_github/doris/thirdparty/installed/lib/libcctz.a  /awesome_github/doris/thirdparty/installed/lib64/libminizip.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_common.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_exporter_zipkin_trace.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_resources.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_version.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_exporter_ostream_span.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_trace.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_http_client_curl.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_exporter_otlp_http.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_exporter_otlp_http_client.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_otlp_recordable.a  /awesome_github/doris/thirdparty/installed/lib64/libopentelemetry_proto.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-cpp-sdk-s3.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-cpp-sdk-core.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-cpp-sdk-transfer.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-checksums.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-io.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-event-stream.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-common.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-cal.a  /awesome_github/doris/thirdparty/installed/lib64/libs2n.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-s3.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-auth.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-crt-cpp.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-compression.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-http.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-c-mqtt.a  /awesome_github/doris/thirdparty/installed/lib64/libaws-cpp-sdk-s3-crt.a  /awesome_github/doris/thirdparty/installed/lib/librdkafka++.a  /awesome_github/doris/thirdparty/installed/lib/librdkafka.a  /awesome_github/doris/thirdparty/installed/lib64/libxml2.a  /awesome_github/doris/thirdparty/installed/lib64/liblzma.a  /awesome_github/doris/thirdparty/installed/lib64/libsimdjson.a  /awesome_github/doris/thirdparty/installed/lib/hadoop_hdfs/native/libhdfs.a  /awesome_github/doris/thirdparty/installed/lib/libkrb5support.a  /awesome_github/doris/thirdparty/installed/lib/libkrb5.a  /awesome_github/doris/thirdparty/installed/lib/libcom_err.a  /awesome_github/doris/thirdparty/installed/lib/libgssapi_krb5.a  /awesome_github/doris/thirdparty/installed/lib/libk5crypto.a  src/apache-orc/c++/src/liborc.a  -Wl,--end-group  -static-libstdc++  -static-libgcc  -lstdc++fs  -lresolv  /awesome_github/doris/thirdparty/installed/lib/libjemalloc_doris.a  src/glibc-compatibility/libglibc-compatibility.a  -lrt  -l:libbfd.a  -liberty  -lc  -lm  -ldl  -pthread  src/util/libcityhash.a  src/geo/libgeo_type.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_cord.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_cordz_info.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_cord_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_cordz_functions.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_cordz_handle.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_hash.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_city.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_bad_variant_access.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_low_level_hash.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_raw_hash_set.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_bad_optional_access.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_hashtablez_sampler.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_exponential_biased.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_synchronization.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_stacktrace.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_graphcycles_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_symbolize.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_malloc_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_debugging_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_demangle_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_time.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_civil_time.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_time_zone.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_str_format_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_strings.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_strings_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_base.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_spinlock_wait.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_int128.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_throw_delegate.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_raw_logging_internal.a  /awesome_github/doris/thirdparty/installed/lib/libabsl_log_severity.a  /awesome_github/doris/thirdparty/installed/lib/libprotobuf.a  /awesome_github/doris/thirdparty/installed/lib/libz.a  /awesome_github/doris/thirdparty/installed/lib/libsnappy.a  /awesome_github/doris/thirdparty/installed/lib/liblz4.a  /awesome_github/doris/thirdparty/installed/lib/libzstd.a  -lrt && cd /awesome_github/doris/be/build_Release/src/tools && /usr/bin/objcopy --only-keep-debug /awesome_github/doris/be/build_Release/src/tools/meta_tool /awesome_github/doris/be/build_Release/src/tools/meta_tool.dbg && /usr/bin/strip --strip-debug --strip-unneeded /awesome_github/doris/be/build_Release/src/tools/meta_tool && /usr/bin/objcopy --add-gnu-debuglink=/awesome_github/doris/be/build_Release/src/tools/meta_tool.dbg /awesome_github/doris/be/build_Release/src/tools/meta_tool
/awesome_github/doris/be/src/geo/geo_types.cpp:537: error: undefined reference to 'S2Cap::Encode(Encoder*) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:539: error: undefined reference to 'Encoder::~Encoder()'
/awesome_github/doris/thirdparty/installed/include/s2/s2cap.h:62: error: undefined reference to 'vtable for S2Cap'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/awesome_github/doris/be/src/geo/geo_types.cpp:544: error: undefined reference to 'S2Cap::Decode(Decoder*)'
/awesome_github/doris/thirdparty/installed/include/s2/s2cap.h:278: error: undefined reference to 'S2::IsUnitLength(Vector3<double> const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:408: error: undefined reference to 'S2Polyline::Encode(Encoder*) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:410: error: undefined reference to 'Encoder::~Encoder()'
/awesome_github/doris/be/src/geo/geo_types.cpp:432: error: undefined reference to 'S2Polygon::Encode(Encoder*) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:434: error: undefined reference to 'Encoder::~Encoder()'
/awesome_github/doris/be/src/geo/geo_types.cpp:59: error: undefined reference to 'S2LatLng::S2LatLng(Vector3<double> const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:196: error: undefined reference to 'doris::WktParse::parse_wkt(char const*, unsigned long, doris::GeoShape**)'
/awesome_github/doris/be/src/geo/geo_types.cpp:74: error: undefined reference to 'S2LatLng::ToPoint() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:74: error: undefined reference to 'S2LatLng::ToPoint() const'
/awesome_github/doris/thirdparty/installed/include/s2/s2earth.h:249: error: undefined reference to 'S2LatLng::GetDistance(S2LatLng const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:360: error: undefined reference to 'S2LatLng::GetDistance(S2LatLng const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:360: error: undefined reference to 'S2LatLng::GetDistance(S2LatLng const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:360: error: undefined reference to 'S2LatLng::GetDistance(S2LatLng const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:385: error: undefined reference to 'S2Earth::GetInitialBearing(S2LatLng const&, S2LatLng const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:387: error: undefined reference to 'S2Earth::GetInitialBearing(S2LatLng const&, S2LatLng const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:74: error: undefined reference to 'S2LatLng::ToPoint() const'
/awesome_github/doris/thirdparty/installed/include/s2/s2cap.h:241: error: undefined reference to 'vtable for S2Cap'
/usr/bin/ld.gold: the vtable symbol may be undefined because the class is missing its key function
/awesome_github/doris/thirdparty/installed/include/s2/s2cap.h:241: error: undefined reference to 'S1ChordAngle::S1ChordAngle(S1Angle)'
/awesome_github/doris/thirdparty/installed/include/s2/s2cap.h:278: error: undefined reference to 'S2::IsUnitLength(Vector3<double> const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:556: error: undefined reference to 'S2Cap::GetArea() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:499: error: undefined reference to 'S2Polygon::GetArea() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:597: error: undefined reference to 'doris::toBinary::geo_tobinary(doris::GeoShape*, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*)'
/awesome_github/doris/be/src/geo/geo_types.cpp:74: error: undefined reference to 'S2LatLng::ToPoint() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:211: error: undefined reference to 'doris::WkbParse::parse_wkb(std::istream&, doris::GeoShape**)'
/awesome_github/doris/be/src/geo/geo_types.cpp:59: error: undefined reference to 'S2LatLng::S2LatLng(Vector3<double> const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:59: error: undefined reference to 'S2LatLng::S2LatLng(Vector3<double> const&)'
/awesome_github/doris/be/src/geo/geo_types.cpp:59: error: undefined reference to 'S2LatLng::S2LatLng(Vector3<double> const&)'
/awesome_github/doris/thirdparty/installed/include/s2/s2earth.h:165: error: undefined reference to 'S1ChordAngle::ToAngle() const'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polyline::~S2Polyline()'
/awesome_github/doris/be/src/geo/geo_types.cpp:152: error: undefined reference to 'S2Polyline::S2Polyline(absl::lts_20220623::Span<Vector3<double> const>)'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polyline::~S2Polyline()'
/awesome_github/doris/be/src/geo/geo_types.cpp:153: error: undefined reference to 'S2Polyline::IsValid() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:414: error: undefined reference to 'S2Polyline::S2Polyline()'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polyline::~S2Polyline()'
/awesome_github/doris/be/src/geo/geo_types.cpp:415: error: undefined reference to 'S2Polyline::Decode(Decoder*)'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polygon::~S2Polygon()'
/awesome_github/doris/be/src/geo/geo_types.cpp:438: error: undefined reference to 'S2Polygon::S2Polygon()'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polygon::~S2Polygon()'
/awesome_github/doris/be/src/geo/geo_types.cpp:439: error: undefined reference to 'S2Polygon::Decode(Decoder*)'
/awesome_github/doris/be/src/geo/geo_types.cpp:439: error: undefined reference to 'S2Polygon::IsValid() const'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Loop::~S2Loop()'
/awesome_github/doris/be/src/geo/geo_types.cpp:128: error: undefined reference to 'S2Loop::S2Loop(absl::lts_20220623::Span<Vector3<double> const>)'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Loop::~S2Loop()'
/awesome_github/doris/be/src/geo/geo_types.cpp:129: error: undefined reference to 'S2Loop::IsValid() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:132: error: undefined reference to 'S2Loop::Normalize()'
/awesome_github/doris/be/src/geo/geo_types.cpp:171: error: undefined reference to 'S2Polygon::S2Polygon(std::vector<std::unique_ptr<S2Loop, std::default_delete<S2Loop> >, std::allocator<std::unique_ptr<S2Loop, std::default_delete<S2Loop> > > >, S2Debug)'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polygon::~S2Polygon()'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Loop::~S2Loop()'
/awesome_github/doris/be/src/geo/geo_types.cpp:167: error: undefined reference to 'S2Loop::Contains(S2Loop const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:528: error: undefined reference to 'S2Cap::Contains(Vector3<double> const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:499: error: undefined reference to 'S2Polygon::GetArea() const'
/awesome_github/doris/be/src/geo/geo_types.cpp:556: error: undefined reference to 'S2Cap::GetArea() const'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polyline::~S2Polyline()'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Polygon::~S2Polygon()'
/awesome_github/doris/be/src/geo/geo_types.cpp:487: error: undefined reference to 'S2Polygon::Contains(S2Polyline const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:483: error: undefined reference to 'S2Polygon::Contains(Vector3<double> const&) const'
/awesome_github/doris/be/src/geo/geo_types.cpp:491: error: undefined reference to 'S2Polygon::Contains(S2Polygon const&) const'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:function doris::GeoCircle::encode(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >*) [clone .cold]: error: undefined reference to 'Encoder::~Encoder()'
/usr/include/c++/11/bits/unique_ptr.h:85: error: undefined reference to 'S2Loop::~S2Loop()'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:vtable for MutableS2ShapeIndex::Iterator: error: undefined reference to 'MutableS2ShapeIndex::Iterator::Locate(Vector3<double> const&)'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:vtable for MutableS2ShapeIndex::Iterator: error: undefined reference to 'MutableS2ShapeIndex::Iterator::Locate(S2CellId)'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:vtable for MutableS2ShapeIndex::Iterator: error: undefined reference to 'MutableS2ShapeIndex::Iterator::GetCell() const'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:vtable for MutableS2ShapeIndex::Iterator: error: undefined reference to 'MutableS2ShapeIndex::Iterator::Clone() const'
src/geo/libgeo_type.a(geo_types.cpp.o):geo_types.cpp:vtable for MutableS2ShapeIndex::Iterator: error: undefined reference to 'MutableS2ShapeIndex::Iterator::Copy(S2ShapeIndex::IteratorBase const&)'
collect2: error: ld returned 1 exit status

What You Expected?

Build successfully.

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

gohalo commented 1 year ago

same problem, have you fixed that.

zwuis commented 1 year ago

Follow Compiling with LDB toolchain, not BE development and debugging environment under Linux to compile.

Remember to set the PATH environment variable.

fengyeGit commented 1 year ago

same problem, has anyone fixed it?

linuxmanju commented 9 months ago

Yes, Just did below and it worked. Ensure to download the latest one from the Doris third party link

521 rm -f doris-thirdparty-prebuilt-linux-x86_64.tar.xz 522 wget https://github.com/apache/doris-thirdparty/releases/download/automation/doris-thirdparty-prebuilt-linux-x86_64.tar.xz 524 tar Jxvf doris-thirdparty-prebuilt-linux-x86_64.tar.xz 525 rm -rf thirdparty/installed 526 mv installed/ thirdparty/ 527 ./build.sh -j 6