CyberRT icon indicating copy to clipboard operation
CyberRT copied to clipboard

compile failed

Open 849631323 opened this issue 3 years ago • 2 comments

hi ,i clone your repo,and accorrding to your compile command ,but it came out errors my protobuf is 3.6.1 and ubuntu is 18.04 and use bazel build //... --cxxopt='-std=c++11" also get the same error ,like in attached file

can you give some advise .thanks

compile.txt

849631323 avatar Apr 06 '21 03:04 849631323

In file included from ./cyber/common/global_data.h:23:0,
                 from cyber/transport/common/endpoint.cc:19:
bazel-out/k8-fastbuild/bin/cyber/proto/cyber_conf.pb.h:592:73: error: invalid use of incomplete type 'class apollo::cyber::proto::CyberConfig'
 inline ::apollo::cyber::proto::PerfConf* CyberConfig::mutable_perf_conf() {
                                                                         ^
In file included from ./cyber/common/global_data.h:23:0,
                 from cyber/transport/common/endpoint.cc:19:
bazel-out/k8-fastbuild/bin/cyber/proto/cyber_conf.pb.h:63:7: note: forward declaration of 'class apollo::cyber::proto::CyberConfig'
 class CyberConfig;
       ^~~~~~~~~~~
In file included from ./cyber/common/global_data.h:23:0,
                 from cyber/transport/common/endpoint.cc:19:
bazel-out/k8-fastbuild/bin/cyber/proto/cyber_conf.pb.h:596:93: error: invalid use of incomplete type 'class apollo::cyber::proto::CyberConfig'
 inline void CyberConfig::set_allocated_perf_conf(::apollo::cyber::proto::PerfConf* perf_conf) {
                                                                                             ^
In file included from ./cyber/common/global_data.h:23:0,
                 from cyber/transport/common/endpoint.cc:19:
bazel-out/k8-fastbuild/bin/cyber/proto/cyber_conf.pb.h:63:7: note: forward declaration of 'class apollo::cyber::proto::CyberConfig'
 class CyberConfig;
       ^~~~~~~~~~~
In file included from cyber/transport/common/endpoint.cc:19:0:
./cyber/common/global_data.h:88:15: error: field 'config_' has incomplete type 'apollo::cyber::proto::CyberConfig'
   CyberConfig config_;
               ^~~~~~~
In file included from ./cyber/common/global_data.h:23:0,
                 from cyber/transport/common/endpoint.cc:19:
bazel-out/k8-fastbuild/bin/cyber/proto/cyber_conf.pb.h:63:7: note: forward declaration of 'class apollo::cyber::proto::CyberConfig'
 class CyberConfig;

lucasjinreal avatar May 19 '21 07:05 lucasjinreal

@849631323 same problems, from your compile file, the error is from protobuf version. Have you solved this problem?

Just1045523143 avatar Sep 01 '22 07:09 Just1045523143