Open xujihui1985 opened 1 year ago
I can't reproduce this, could you provide a bit more on which command you were running?
bazel build src:all
bazel build src/quipper:all
both succeeds for me. I also have bazel version 5.3.2. Could you try to update your bazel and see if that works?
I also get compile errors, FWIW:
/usr/bin/ccache: invalid option -- 'U'
This is with bazelisk
/bazel
version 6.0:
EDIT: Nevermind, I think this is something broken with ccache
and not an issue with the build, as I'm seeing the below now too:
ccache: error: Failed to create temporary file for /home/user/.cache/ccache/tmp/inode-cache-64.v1.tmp.eVaABr.tmp: Read-only file system
[user@MSI perf_data_converter]$ bazelisk --version
bazel 6.0.0
[user@MSI perf_data_converter]$ bazelisk build src:perf_to_profile
INFO: Analyzed target //src:perf_to_profile (0 packages loaded, 0 targets configured).
INFO: Found 1 target...
ERROR: /home/user/.cache/bazel/_bazel_user/ca4327f72acbaba3e49bb9ab64aaca71/external/com_google_protobuf/BUILD:155:11: Compiling src/google/protobuf/generated_message_tctable_lite.cc [for tool] failed: (Exit 1): ccache failed: error executing command (from target @com_google_protobuf//:protobuf_lite) /usr/bin/ccache -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 ... (remaining 33 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/usr/bin/ccache: invalid option -- 'U'
ERROR: /home/user/.cache/bazel/_bazel_user/ca4327f72acbaba3e49bb9ab64aaca71/external/com_google_protobuf/BUILD:155:11: Compiling src/google/protobuf/stubs/bytestream.cc [for tool] failed: (Exit 1): ccache failed: error executing command (from target @com_google_protobuf//:protobuf_lite) /usr/bin/ccache -U_FORTIFY_SOURCE -fstack-protector -Wall -Wthread-safety -Wself-assign -Wunused-but-set-parameter -Wno-free-nonheap-object -fcolor-diagnostics -fno-omit-frame-pointer -g0 -O2 ... (remaining 33 arguments skipped)
Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
/usr/bin/ccache: invalid option -- 'U'
Target //src:perf_to_profile failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 0.148s, Critical Path: 0.06s
INFO: 20 processes: 20 internal.
FAILED: Build did NOT complete successfully
I have the same problem on popOS but with windows in the error:
ERROR: /root/.cache/bazel/_bazel_root/ae8fea7311d419a0748ee3b71cb69bba/external/boringssl/BUILD:133:11: @platforms//os:windows is not a valid configuration key for @boringssl//:crypto
ERROR: Analysis of target '//src:perf_to_profile' failed; build aborted: Analysis failed
INFO: Elapsed time: 8.269s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (21 packages loaded, 632 targets configured)
Easily reproducible by running a docker container ubuntu:latest
, installing the deps in the readme and bazel-bootstrap and running bazel build src:perf_to_profile
UPDATE: installing latest bazel via bazelisk fixed it
On a x86_64 Ubuntu 22.04.3 LTS (x86_64)
bazel build src:perf_to_profile
DEBUG: Rule 'boringssl' indicated that a canonical reproducible form can be obtained by modifying arguments sha256 = "ea58709ddfa7d2c63627abc2127471962a3cb4f33f96d246efbc4f832900a720"
DEBUG: Repository boringssl instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule http_archive defined at:
/home/ayoung/.cache/bazel/_bazel_ayoung/baa21aa92728e2469fe19f438390c93e/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
Does updating Bazel work for you?
I use docker to compile it, and get error
bazel version: 3.5.0
/root/.cache/bazel/_bazel_root/a08c2e4811c846650b733c6fc815a920/external/bazel_tools/tools/build_defs/repo/http.bzl:336:31: in
ERROR: /root/.cache/bazel/_bazel_root/a08c2e4811c846650b733c6fc815a920/external/boringssl/BUILD:203:11: @platforms//os:linux is not a valid configuration key for @boringssl//:crypto
cc_library( name = "crypto", srcs = crypto_sources + crypto_internal_headers + crypto_sources_asm, hdrs = crypto_headers + fips_fragments, copts = boringssl_copts_c11, includes = ["src/include"], linkopts = select({
Android supports pthreads, but does not provide a libpthread
)