Closed DouglasYu closed 1 year ago
Hi, @DouglasYu,
Happy new year! The reason for this failure is the latest version of Bazel changed from 5.4 to 6.0. This is a known issue in bazel, please see this link for details, which recommends downgrading to 5.4 as a workaround.
If you already have Bazel 6.0.0 installed, running following commands (on Linux) will allow you to run Bazel 5.4.0:
sudo apt install bazel-5.4.0
This installs Bazel 5.4.0 as /usr/bin/bazel-1.0.0 on your system.
Then, you can set bazel to a specific version by creating a symlink:
sudo ln -sf /usr/bin/bazel-5.4.0 /usr/bin/bazel
bazel version
should show current version is set to 5.4.0 successfully:
Build label: 5.4.0 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Thu Dec 15 16:14:25 2022 (1671120865) Build timestamp: 1671120865 Build timestamp as int: 1671120865
You should be able to build and run the benchmark now :)
Yeah the benchmark is working now. Thank you so much and happy new year!
Some quick updates -- this issue is fixed in d765040. Fleetbench can now build and run with bazel 6.0.0.
Environment
os: ubuntu kernel: 5.15.0-56-generic cpu: x86_64
Output from
bazel version
Build label: 6.0.0 Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar Build time: Mon Dec 19 15:52:35 2022 (1671465155) Build timestamp: 1671465155 Build timestamp as int: 1671465155
Command I ran
bazel run -c opt fleetbench/swissmap:hot_swissmap_benchmark
Result
I believe this is a compatibility problem. I'm new to bazel and I didn't find any clues to solve it.