Describe the bug
When I run bash apollo.sh build on my PC, it show me this:
tiffer@in_dev_docker:/apollo$ bash apollo.sh build
System check passed. Build continue ...
[WARNING] ESD CAN library supplied by ESD Electronics does not exist. If you need ESD CAN, please refer to third_party/can_card_library/esd_can/README.md.
Running build under GPU mode. GPU is required to run the build.
[INFO] Start building, please wait ...
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling
[INFO] Building on x86_64...
[INFO] Building with --jobs=8 for x86_64
INFO: Reading 'startup' options from /apollo/tools/bazel.rc: --batch_cpu_scheduling
INFO: Found 1802 targets...
ERROR: /apollo/modules/canbus/common/BUILD:5:1: undeclared inclusion(s) in rule '//modules/canbus/common:canbus_common':
this rule is missing dependency declarations for the following files included by 'modules/canbus/common/canbus_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: Elapsed time: 4.682s, Critical Path: 0.91s
============================
[ERROR] Build failed!
[INFO] Took 6 seconds
============================
I just follow the step in README file, and I compile this passed before.
After I re-download it and compile again, it show me this.
Can someone tell me how to debug this problem??
Maybe you should read this.
Please delete folder {HOME}/.cache/bazel/_bazel_{USER}, run bazel clean, and try build again.
I had the same issue, with same errors
It turn out I had a directory called apollo , with a directory called apollo.
I went into apollo/apollo/ then went into docker
我也遇到这个问题了, 执行delete folder {HOME}/.cache/bazel/bazel{USER}, run bazel clean后。
bash apollo.sh build --local_resources 2048,1.0,1.0sed: 1: "WORKSPACE": invalid command code W
Must run apollo.sh in dev docker or release docker
Thx.
After tried lianglia's suggest, I solved this problem.
Just delete the bazel folder & rebuild.
Same issue, see attached file for complete log of command _bash apollo.sh build_.
Removing bazel cache and running _bazel clean_ did not work for me (_bazel clean --expunge_ did not work either).
Please reopen this issue.
Most helpful comment
Please delete folder {HOME}/.cache/bazel/_bazel_{USER}, run
bazel clean, and try build again.