bazelbuild/bazel

Documentation issue: Compiling Bazel from source

Open

#11.500 aperta il 27 mag 2020

Vedi su GitHub
 (1 commento) (0 reazioni) (0 assegnatari)Java (4465 fork)batch import
P3area-EngProdhelp wantedteam-Documentationteam-OSStype: documentation (cleanup)

Metriche repository

Star
 (25.384 star)
Metriche merge PR
 (Merge medio 22g 20h) (77 PR mergiate in 30 g)

Descrizione

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:

[...]

Guida contributor