0

I just upgrade mac OS to macOS Big Sur (11), it is no issue to reinstall drake from source (./setup/mac/install_prereqs.sh). But some errors happen during "bazel built". The message is posted below:

MacBook-Pro examples % bazel test ...

    INFO: Repository cc instantiated at:
      /Users/wc/drake/WORKSPACE:10:22: in <toplevel>
      /Users/wc/drake/tools/workspace/default.bzl:311:29: in add_default_workspace
      /Users/wc/drake/tools/workspace/default.bzl:110:22: in add_default_repositories
    Repository rule cc_repository defined at:
      /Users/wc/drake/tools/workspace/cc/repository.bzl:161:32: in <toplevel>
    ERROR: An error occurred during the fetch of repository 'cc':
       Traceback (most recent call last):
        File "/Users/wc/drake/tools/workspace/cc/repository.bzl", line 58, column 33, in _impl
            cc = repository_ctx.path(Label("@local_config_cc//:wrapped_clang"))
    Error in path: Not a regular file: /private/var/tmp/_bazel_wc/ecfb0aaf3c5988894c5be550fe9d5e24/external/local_config_cc/wrapped_clang
    ERROR: Error fetching repository: Traceback (most recent call last):
        File "/Users/wc/drake/tools/workspace/cc/repository.bzl", line 58, column 33, in _impl
            cc = repository_ctx.path(Label("@local_config_cc//:wrapped_clang"))
    Error in path: Not a regular file: /private/var/tmp/_bazel_wc/ecfb0aaf3c5988894c5be550fe9d5e24/external/local_config_cc/wrapped_clang
    INFO: Repository rules_python instantiated at:
      /Users/wc/drake/WORKSPACE:10:22: in <toplevel>
      /Users/wc/drake/tools/workspace/default.bzl:311:29: in add_default_workspace
      /Users/wc/drake/tools/workspace/default.bzl:236:32: in add_default_repositories
      /Users/wc/drake/tools/workspace/rules_python/repository.bzl:12:19: in rules_python_repository
      /Users/wc/drake/tools/workspace/github.bzl:77:25: in github_archive
    Repository rule _github_archive_real defined at:
      /Users/wc/drake/tools/workspace/github.bzl:98:39: in <toplevel>
    ERROR: no such package '@cc//': Not a regular file: /private/var/tmp/_bazel_wc/ecfb0aaf3c5988894c5be550fe9d5e24/external/local_config_cc/wrapped_clang
    INFO: Elapsed time: 1.605s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (0 packages loaded)
    FAILED: Build did NOT complete successfully (0 packages loaded)
        currently loading: examples/acrobot ... (3 packages
Wc Chang
  • 97
  • 6
  • What version of bazel is installed (via homebrew?). Also please be sure to install all patches and the very latest version of Xcode and its command line tools. – jwnimmer-tri Feb 20 '21 at 04:00
  • The bazel version is bazel 4.0.0. Finally, I solve this issue by re-install OS to ensure everything is clean. Such a similar issue sometimes happens in drake upgrading, it is lousy but not worth taking time to solve. – Wc Chang Feb 21 '21 at 03:43

0 Answers0