google / fleetbench

Benchmarking suite for Google workloads
Apache License 2.0
116 stars 10 forks source link

Failed to build in ARM64 Ubuntu due to incorrect Go toolchain arch #24

Closed reecho-tsai closed 1 month ago

reecho-tsai commented 2 months ago

Firstly I tried to run the benchmark by bazel run --config=opt fleetbench/proto:proto_benchmark -- --benchmark_min_time=30s. However the Bazel reported an error as following:

ERROR: /root/fleetbench/fleetbench/proto/BUILD:51:8: While resolving toolchains for target //fleetbench/proto:proto_benchmark (56c6edc): invalid registered toolchain '@go_sdk//:go_aix_ppc64': no such package '@@go_sdk//': error globbing [bin/go*, src/**, pkg/**] op=FILES: /root/.cache/bazel/_bazel_root/9906b1d63bb73ec34cafd40427c4e498/external/go_sdk/src/go/build (No such file or directory)
ERROR: Analysis of target '//fleetbench/proto:proto_benchmark' failed; build aborted
INFO: Elapsed time: 0.440s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

It was trying to download an aix_ppc64 Go toolchain and that caused the error. But when I cleaned the cache and tried it again:

ERROR: /root/fleetbench/fleetbench/proto/BUILD:51:8: While resolving toolchains for target //fleetbench/proto:proto_benchmark (56c6edc): invalid registered toolchain '@go_sdk//:go_android_386': no such package '@@go_sdk//': error globbing [bin/go*, src/**, pkg/**] op=FILES: /root/.cache/bazel/_bazel_root/9906b1d63bb73ec34cafd40427c4e498/external/go_sdk/src/go/build (No such file or directory)
ERROR: Analysis of target '//fleetbench/proto:proto_benchmark' failed; build aborted
INFO: Elapsed time: 0.207s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

Third time:

ERROR: /root/fleetbench/fleetbench/proto/BUILD:51:8: While resolving toolchains for target //fleetbench/proto:proto_benchmark (56c6edc): invalid registered toolchain '@go_sdk//:go_ios_amd64': no such package '@@go_sdk//': error globbing [bin/go*, src/**, pkg/**] op=FILES: /root/.cache/bazel/_bazel_root/9906b1d63bb73ec34cafd40427c4e498/external/go_sdk/src/go/build (No such file or directory)
ERROR: Analysis of target '//fleetbench/proto:proto_benchmark' failed; build aborted
INFO: Elapsed time: 0.175s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

The script looked like deciding arch for my machine randomly! But it works well on my x86-64 machine.

reecho-tsai commented 1 month ago

Hmm...It seems to be a problem of Docker containers. It works well when I run it in a real Aarch64 machine.