apache / doris

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

[Bug] 编译错误 #6897

Open Qyt-Coding opened 3 years ago

Qyt-Coding commented 3 years ago

Search before asking

Version

0.14.0

What's Wrong?

在编译的时候,发生了这个错误,看了issus,我想问是内存不足吗,但是我电脑内存又8G /var/local/thirdparty/installed/include/bvar/detail/percentile.h:240:7: note: 'class bvar::detail::PercentileSamples<254>' declared here 240 | class PercentileSamples { | ^~~~~ In file included from /var/local/thirdparty/installed/include/bvar/window.h:28, from /var/local/thirdparty/installed/include/bvar/recorder.h:28, from /var/local/thirdparty/installed/include/bvar/utils/lock_timer.h:27, from /var/local/thirdparty/installed/include/bthread/mutex.h:27, from /var/local/thirdparty/installed/include/bthread/bthread.h:32, from /var/local/thirdparty/installed/include/brpc/server.h:26, from ../src/service/brpc.h:53, from ../src/http/ev_http_server.cpp:36: /var/local/thirdparty/installed/include/bvar/detail/series.h: In instantiation of 'bvar::detail::SeriesBase<T, Op>::Data::Data() [with T = bvar::Stat; Op = bvar::detail::WindowBase<bvar::IntRecorder, bvar::SERIES_IN_SECOND>::SeriesSampler::Op]': /var/local/thirdparty/installed/include/bvar/detail/series.h:107:18: required from 'bvar::detail::SeriesBase<T, Op>::SeriesBase(const Op&) [with T = bvar::Stat; Op = bvar::detail::WindowBase<bvar::IntRecorder, bvar::SERIES_IN_SECOND>::SeriesSampler::Op]' /var/local/thirdparty/installed/include/bvar/detail/series.h:218:44: required from 'bvar::detail::Series<T, Op>::Series(const Op&) [with T = bvar::Stat; Op = bvar::detail::WindowBase<bvar::IntRecorder, bvar::SERIES_IN_SECOND>::SeriesSampler::Op]' /var/local/thirdparty/installed/include/bvar/window.h:59:45: required from 'bvar::detail::WindowBase<R, series_freq>::SeriesSampler::SeriesSampler(bvar::detail::WindowBase<R, series_freq>, R) [with R = bvar::IntRecorder; bvar::SeriesFrequency series_freq = bvar::SERIES_IN_SECOND]' /var/local/thirdparty/installed/include/bvar/window.h:151:31: required from 'int bvar::detail::WindowBase<R, series_freq>::expose_impl(const StringPiece&, const StringPiece&, bvar::DisplayFilter) [with R = bvar::IntRecorder; bvar::SeriesFrequency series_freq = bvar::SERIES_IN_SECOND; butil::StringPiece = butil::BasicStringPiece<std::basic_string >]' /var/local/thirdparty/installed/include/bvar/window.h:144:9: required from here /var/local/thirdparty/installed/include/bvar/detail/series.h:131:23: warning: 'void memset(void, int, size_t)' clearing an object of non-trivial type 'struct bvar::Stat'; use assignment or value-initialization instead [-Wclass-memaccess] 131 | memset(_array, 0, sizeof(_array)); | ~~^~~~~~~ In file included from /var/local/thirdparty/installed/include/bvar/utils/lock_timer.h:27, from /var/local/thirdparty/installed/include/bthread/mutex.h:27, from /var/local/thirdparty/installed/include/bthread/bthread.h:32, from /var/local/thirdparty/installed/include/brpc/server.h:26, from ../src/service/brpc.h:53, from ../src/http/ev_http_server.cpp:36: /var/local/thirdparty/installed/include/bvar/recorder.h:33:8: note: 'struct bvar::Stat' declared here 33 | struct Stat { | ^~~~ [202/678] Building CXX object src/http/CMakeFiles/Webserver.dir/http_client.cpp.o ninja: build stopped: subcommand failed.

image

What You Expected?

能编译成功

How to Reproduce?

No response

Anything Else?

No response

Are you willing to submit PR?

Code of Conduct

zbtzbtzbt commented 3 years ago

您好,不是内存不够的原因,应该是镜像选择错版本了。官网根据版本选择镜像

YangShaw commented 3 years ago

我之前也遇到这个问题,编译0.14.0版本的代码要使用1.2版本的镜像。我修改了镜像版本以后就ok了。

coderjiang commented 2 years ago

直接使用docker 镜像编译

bin41215 commented 1 year ago

我也遇到过类似的问题,修改一下docker镜像版本吧。试试这个

apache/incubator-doris:build-env-1.3.1