apollo icon indicating copy to clipboard operation
apollo copied to clipboard

bazel build //modules/localization/rtk:rtk_localization_test出错

Open wqklihbf opened this issue 2 years ago • 4 comments

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: image How can I solve it?

wqklihbf avatar Oct 31 '23 08:10 wqklihbf

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: image 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.

wqklihbf avatar Nov 01 '23 02:11 wqklihbf

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.

WTSRUVF avatar Nov 03 '23 07:11 WTSRUVF

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 ping command inside a docker container. The container is connected to the outside network, and I use bazel --version to check the bazel version is 5.3.1. But this error still occurs.

wqklihbf avatar Nov 07 '23 13:11 wqklihbf

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

WildBeast114514 avatar Nov 15 '23 05:11 WildBeast114514