bazelbuild/bazel

Documentation issue: Compiling Bazel from source

Open

#11.500 geöffnet am 27. Mai 2020

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)Java (4.465 Forks)batch import
P3area-EngProdhelp wantedteam-Documentationteam-OSStype: documentation (cleanup)

Repository-Metriken

Stars
 (25.384 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 22T 20h) (77 gemergte PRs in 30 T)

Beschreibung

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:

[...]

Contributor Guide