ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.16k stars 9.71k forks source link

Build issue for Apollo v3.5.0 and v5.0.0 #15097

Open YuqiHuai opened 1 year ago

YuqiHuai commented 1 year ago

Describe the issue

I am currently trying to rebuild previous versions of Apollo and running into issues for v3.5.0 and v5.0.0 that I cannot resolve.

Build Process

bash docker/scripts/dev_start.sh
bash docker/scripts/dev_into.sh
bash apollo.sh build

Then I am getting the following error in v3.5.0 (737784f6c367a6e3ddfcbee550c89aefe3463f36)

ERROR: (08-16 03:38:45.783) /apollo/modules/planning/math/finite_element_qp/BUILD:5:1: undeclared inclusion(s) in rule '//modules/planning/math/finite_element_qp:fem_1d_qp_problem':
this rule is missing dependency declarations for the following files included by 'modules/planning/math/finite_element_qp/fem_1d_qp_problem.cc':
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags.h'
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags_declare.h'
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags_google.h'.

and the following error in v5.5.0 (2e8ad6fecb323915eeb74efa05cfd1647d6c6138)

ERROR: (08-16 04:09:35.162) /apollo/modules/third_party_perception/common/BUILD:15:1: undeclared inclusion(s) in rule '//modules/third_party_perception/common:third_party_perception_gflags':
this rule is missing dependency declarations for the following files included by 'modules/third_party_perception/common/third_party_perception_gflags.cc':
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags.h'
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags_declare.h'
  'bazel-out/local-dbg/genfiles/external/com_github_gflags_gflags/gflags/gflags_google.h'.
INFO: (08-16 04:09:35.302) Elapsed time: 6.086s, Critical Path: 0.32s

They all seem to be gflags related, what should I do to resolve this build issue?

Thank you in advance!

WTSRUVF commented 1 year ago

For v3.5 version: You can open the "/apollo/modules/planning/math/finite_element_qp/BUILD" file and comment the line "'//modules/planning/math/finite_element_qp:fem_1d_qp_problem'" of the file that the fifth line depends on. And open the path "modules/planning/math/finite_element_qp/BUILD", comment the content about fem_1d_qp_problem.cc in the BUILD file.

WTSRUVF commented 1 year ago

For v5.5.0 version: Please compare the v3.5 version and comment out the lines in the corresponding file.