[PATCH] D107714: Simplify setting up LLVM as bazel external repo

Geoffrey Martin-Noble via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 17 14:17:14 PDT 2021


GMNGeoffrey added a comment.

I actually just tested this further and it breaks resolution of deps_impl. This is yet another case where Bazel makes it really hard to understand what labels are being resolved relative to...

  ~/src/llvm-project/utils/bazel/examples/http_archive$ bazel build @llvm-project//llvm:llvm-symbolizer
  INFO: Invocation ID: b5fb0254-073a-4ef5-b9f3-6dcaad9ac98f
  INFO: Repository llvm_zlib instantiated at:
    /usr/local/google/home/gcmn/src/llvm-project/utils/bazel/examples/http_archive/WORKSPACE:45:35: in <toplevel>
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/configure.bzl:93:10: in llvm_disable_optional_support_deps
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
  Repository rule llvm_zlib_disable defined at:
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/zlib.bzl:72:36: in <toplevel>
  INFO: Repository llvm_terminfo instantiated at:
    /usr/local/google/home/gcmn/src/llvm-project/utils/bazel/examples/http_archive/WORKSPACE:45:35: in <toplevel>
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/configure.bzl:98:10: in llvm_disable_optional_support_deps
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/bazel_tools/tools/build_defs/repo/utils.bzl:201:18: in maybe
  Repository rule llvm_terminfo_disable defined at:
    /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/terminfo.bzl:35:40: in <toplevel>
  ERROR: An error occurred during the fetch of repository 'llvm_zlib':
     Traceback (most recent call last):
          File "/usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/zlib.bzl", line 66, column 28, in _llvm_zlib_disable_impl
                  repository_ctx.template(
  Error in template: Unable to load package for @llvm-archive//deps_impl:zlib_disable.BUILD: BUILD file not found in directory 'deps_impl' of external repository @llvm-archive. Add a BUILD file to a directory to mark it as a package.
  ERROR: Error fetching repository: Traceback (most recent call last):
          File "/usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-archive/utils/bazel/zlib.bzl", line 66, column 28, in _llvm_zlib_disable_impl
                  repository_ctx.template(
  Error in template: Unable to load package for @llvm-archive//deps_impl:zlib_disable.BUILD: BUILD file not found in directory 'deps_impl' of external repository @llvm-archive. Add a BUILD file to a directory to mark it as a package.
  ERROR: /usr/local/google/home/gcmn/.cache/bazel/_bazel_gcmn/862d4f35edba4a3b7a8ffb6f5ccce305/external/llvm-project/llvm/BUILD.bazel:170:11: @llvm-project//llvm:Support depends on @llvm_zlib//:zlib in repository @llvm_zlib which failed to fetch. no such package '@llvm_zlib//': Unable to load package for @llvm-archive//deps_impl:zlib_disable.BUILD: BUILD file not found in directory 'deps_impl' of external repository @llvm-archive. Add a BUILD file to a directory to mark it as a package.
  ERROR: Analysis of target '@llvm-project//llvm:llvm-symbolizer' failed; build aborted: Analysis failed
  INFO: Elapsed time: 3.309s
  INFO: 0 processes.
  FAILED: Build did NOT complete successfully (15 packages loaded, 1015 targets configured)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D107714/new/

https://reviews.llvm.org/D107714



More information about the llvm-commits mailing list