bazel build //modules/localization/rtk:rtk_localization_test出错
System information
- **OS Platform and Distribution: Linux Ubuntu 23.04
- **Apollo installed from: 软件包
- **Apollo version: 8.0
Steps to reproduce the issue:
When I run the command:
bazel build //modules/localization/rtk:rtk_localization_test
and I encounter such an error:
How can I solve it?
System information
- **OS Platform and Distribution: Linux Ubuntu 23.04
- **Apollo installed from: 软件包
- **Apollo version: 8.0
Steps to reproduce the issue:
When I run the command:
bazel build //modules/localization/rtk:rtk_localization_testand I encounter such an error:How can I solve it?
I think there is an error with the command, but when I use this command:
bazel test //modules/localization/rtk:rtk_localization_test
the same error occurred.
Because the bazel tool required for compilation has not been downloaded, please check whether the network in your container can stably connect to the external network. If so, it will be automatically downloaded after you enter the compilation command.
Because the bazel tool required for compilation has not been downloaded, please check whether the network in your container can stably connect to the external network. If so, it will be automatically downloaded after you enter the compilation command. I'm testing the network using the
pingcommand inside a docker container. The container is connected to the outside network, and I usebazel --versionto check the bazel version is 5.3.1. But this error still occurs.
This may be caused by a mismatch between the current version of bazel and the specified toolchain, the easiest way is to remove the specified bazel jdk in two files:
vim /apollo_workspace/WORKSPACE
vim /opt/apollo/neo/packages/buildtool-dev/latest/data/templates/workspace.in // if you are using apollo 8.0
vim /opt/apollo/neo/packages/buildtool/latest/data/templates/workspace.in // if you are using apollo 9.0
remove the following content:
http_archive(
name = "remotejdk11_linux",
sha256 = "360626cc19063bc411bfed2914301b908a8f77a7919aaea007a977fa8fb3cde1",
urls = [
"https://apollo-pkg-beta.bj.bcebos.com/bazel/zulu11.37.17-ca-jdk11.0.6-linux_x64.tar.gz",
],
)
and try bazel test or buildtool test -p modules/localization, the problem should be fixed
How can I solve it?