Skip to content

Bazel errors on Ubuntu 22.04  #18

@llbytes

Description

@llbytes

Hi! Unfortunately, I'm still on the first page of this great guide. I'm trying to install this build on common systems (Ubuntu 22.04, Debian 12, FreeBSD 13.2). My actions (Ubuntu 22.04):

# apt install bazel-bootstrap bazel-skylib
# git clone https://github.com/j2kun/mlir-tutorial.git
# cd mlir-tutorial
# bazel build @llvm-project//mlir:IR

After this I get the following errors:

root@ubuntu:~/mlir-tutorial# bazel build @llvm-project//mlir:IR
INFO: Repository rules_python instantiated at:
  no stack (--record_rule_instantiation_callstack not enabled)
Repository rule new_git_repository defined at:
  /root/.cache/bazel/_bazel_root/fac3d405565bb727227c10fb24b5c557/external/bazel_tools/tools/build_defs/repo/git.bzl:182:37: in <toplevel>
ERROR: An error occurred during the fetch of repository 'rules_python':
   Traceback (most recent call last):
        File "/root/.cache/bazel/_bazel_root/fac3d405565bb727227c10fb24b5c557/external/bazel_tools/tools/build_defs/repo/git.bzl", line 169, column 13, in _new_git_repository_implementation
                fail("Exactly one of build_file and build_file_content must be provided.")
Error in fail: Exactly one of build_file and build_file_content must be provided.
ERROR: no such package '@rules_python//python': Exactly one of build_file and build_file_content must be provided.
INFO: Elapsed time: 0.056s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded)

I tried to compile this tutorial on Ubuntu 22.04, Debian 12 and FreeBSD 13.2, but no luck so far. What makes debugging Bazel even more difficult is that the first step (cloning the monorepository) is quite time-consuming. Given your excellent example code, I might even find it easier to write my own CMakeLists.txt files.

Thank you for prudently indicating the commit number from which the compiler infrastructure should be built. Could you provide the version of the operating system and package versions that you use to successfully build this tutorial, as well as the commit version of the mlir-tutorial repository itself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions