bazelbuild/bazel

Documentation issue: Compiling Bazel from source

Open

#11,500 opened on 2020年5月27日

GitHub で見る
 (1 comment) (0 reactions) (0 assignees)Java (4,465 forks)batch import
P3area-EngProdhelp wantedteam-Documentationteam-OSStype: documentation (cleanup)

Repository metrics

Stars
 (25,384 stars)
PR merge metrics
 (平均マージ 22d 20h) (30d で 77 merged PRs)

説明

Documentation URL: https://docs.bazel.build/versions/master/install-compile-source.html

Python. Versions 2 and 3 are supported, installing one of them is enough.

But compiling Bazel 3.1.0 with Python 2 fails with the following error.

ERROR: /[...]/src/BUILD:305:2: Executing genrule //src:embedded_tools_nojdk failed (Exit 1): bash failed: error executing command
  (cd /tmp/bazel_E1NyC7jk/out/execroot/io_bazel && \
  exec env - \
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
  /bin/bash -c 'source external/bazel_tools/tools/genrule/genrule-setup.sh; bazel-out/host/bin/src/create_embedded_tools "bazel-out/k8-opt/bin/src/embedded_tools_nojdk.zip" bazel-out/k8-opt/bin/src/embedded_tools_nojdk.params')
Execution platform: //:default_host_platform
Error occurred while attempting to use the default Python toolchain (@rules_python//python:autodetecting_toolchain).
According to '/usr/bin/python -V', version is 'Python 2.7.5', but we need version 3. PATH is:

[...]

コントリビューターガイド