cpp-example stage1 build error : An error occurred during the fetch of repository

Abierto
#594 1 comentario 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
cpp
Área
build-system

Línea de trabajo

Comienza con el objetivo stage1/main/BUILD y reproduce bazel build //main:hello-world en la configuración de Windows indicada. Lee el tutorial de C++ enlazado y las instrucciones sobre los prerrequisitos de Windows junto con el error de la toolchain de rules_cc; se considerará terminado cuando se identifique una corrección reproducible del lado del ejemplo o un prerrequisito documentado, y la compilación de stage1 se complete correctamente.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

First of all, thanks for your contributions

I'm trying to follow the instruction , and gets build error .

Tried to look for existing issues but couldn't find any, so reporting.


Here's the full log of my command (run on cmd inside VS Code):

(base) D:\work\bazel_examples\cpp-tutorial\stage1>bazel build //main:hello-world
Starting local Bazel server (8.2.1) and connecting to it...
INFO: Repository rules_cc++cc_configure_extension+local_config_cc instantiated at:
  <builtin>: in <toplevel>
Repository rule cc_autoconf defined at:
  C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/cc_configure.bzl:109:30: in <toplevel>
ERROR: C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/lib_cc_configure.bzl:112:9: An error occurred during the fetch of repository 'rules_cc++cc_configure_extension+local_config_cc':
   Traceback (most recent call last):
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/cc_configure.bzl", line 89, column 36, in cc_autoconf_impl
                configure_windows_toolchain(repository_ctx)
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 881, column 35, in configure_windows_toolchain
                msvc_vars_x64 = _get_msvc_vars(repository_ctx, paths, "x64")
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 699, column 32, in _get_msvc_vars
                env = setup_vc_env_vars(repository_ctx, vc_path)
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 383, column 19, in setup_vc_env_vars
                envs = execute(repository_ctx, ["./get_env.bat"], environment = env).split(",")
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/lib_cc_configure.bzl", line 206, column 32, in execute
                auto_configure_fail(
        File "C:/users/c2k/_bazel_c2k/7ncs2dzs/external/rules_cc+/cc/private/toolchain/lib_cc_configure.bzl", line 112, column 9, in auto_configure_fail
                fail("\n%sAuto-Configuration Error:%s %s\n" % (red, no_color, msg))
Error in fail:
Auto-Configuration Error: non-zero exit code: 1, command ["./get_env.bat"], stderr: ('conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
)
ERROR: no such package '@@rules_cc++cc_configure_extension+local_config_cc//':
Auto-Configuration Error: non-zero exit code: 1, command ["./get_env.bat"], stderr: ('conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
)
ERROR: D:/work/bazel_examples/cpp-tutorial/stage1/main/BUILD:3:10: //main:hello-world depends on @@rules_cc++cc_configure_extension+local_config_cc//:cc-compiler-x64_windows in repository @@rules_cc++cc_configure_extension+local_config_cc which failed to fetch. no such package '@@rules_cc++cc_configure_extension+local_config_cc//':
Auto-Configuration Error: non-zero exit code: 1, command ["./get_env.bat"], stderr: ('conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
)
ERROR: D:/work/bazel_examples/cpp-tutorial/stage1/main/BUILD:3:10: //main:hello-world depends on @@rules_cc++cc_configure_extension+local_config_cc//:cc-compiler-x64_windows in repository @@rules_cc++cc_configure_extension+local_config_cc which failed to fetch. no such package '@@rules_cc++cc_configure_extension+local_config_cc//':
Auto-Configuration Error: non-zero exit code: 1, command ["./get_env.bat"], stderr: ('conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
ġ  ƴմϴ.
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
)
ERROR: D:/work/bazel_examples/cpp-tutorial/stage1/main/BUILD:3:10: //main:hello-world depends on @@rules_cc++cc_configure_extension+local_config_cc//:cc-compiler-x64_windows in repository @@rules_cc++cc_configure_extension+local_config_cc which failed to fetch. no such package '@@rules_cc++cc_configure_extension+local_config_cc//':
Auto-Configuration Error: non-zero exit code: 1, command ["./get_env.bat"], stderr: ('conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
'conda'��()  Ǵ ܺ ,   ִ ��α׷, Ǵ
ġ  ƴմϴ.
)
ERROR: Analysis of target '//main:hello-world' failed; build aborted: Analysis failed
INFO: Elapsed time: 5.901s, Critical Path: 0.08s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully

  • installed bazel via chocolatey

  • installed visual c++ redistributables via your tutorial and have restarted the PC

  • This is my env
    Windows 10 Pro (Korean) version 22H2
    OS Build 19045.5854

  • have clang, git, mingw, conda installed and accessable on cmd commands

  • Since I see 'conda' in error log, here's what I have on regedit (to activate conda everytime on cmd startup)

HKEY_CURRENT_USER\SOFTWARE\Microsoft\Command Processor
set value AutoRun as following
call "C:\ProgramData\miniconda3\condabin\conda_hook.bat" && conda activate base

  • Device:
    Processor AMD Ryzen Threadripper 2950X 16-Core Processor 3.50 GHz
    RAM 64.0GB
    Dist 932 GB HDD WDC WD10EZEX-00ZF5A0, 2.73 TB HDD TOSHIBA HDWD130, 466 GB SSD Samsung SSD 970 EVO Plus 500GB
    GFX NVIDIA GeForce RTX 2070 SUPER (8 GB)
Lenguaje dominante
Starlark
Estrellas
958
Forks
582
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de bazelbuild/examples

Todos los issues de bazelbuild/examples

Issues similares

Más issues de Build System

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.