Selenium: ERROR: An error occurred during the fetch of repository 'local_config_cc'

Created on 20 May 2020  路  7Comments  路  Source: SeleniumHQ/selenium

馃悰 Bug Report

When I try run go.bat script I get errors:

Parsing rb/build.desc
* Invoke default (first_time)
*
Invoke grid (first_time)
* Invoke selenium-server-standalone (first_time)
*
Invoke //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar (first_time)
** Execute //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar
Loading:
Loading: 0 packages loaded
Analyzing: target //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar (0 packages loaded, 0 targets configured)
INFO: Call stack for the definition of repository 'local_config_cc' which is a cc_autoconf (rule definition at C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/cc_configure.bzl:143:15):

  • C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/cc_configure.bzl:179:5
  • /DEFAULT.WORKSPACE.SUFFIX:317:1
    Analyzing: target //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar (0 packages loaded, 0 targets configured)
    ERROR: An error occurred during the fetch of repository 'local_config_cc':
    Traceback (most recent call last):
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/cc_configure.bzl", line 120
    configure_windows_toolchain(<1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 690, in configure_windows_toolchain
    _get_msvc_vars(repository_ctx, <1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 566, in _get_msvc_vars
    _get_clang_version(<2 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 469, in _get_clang_version
    repository_ctx.execute(<1 more arguments>)
    Argument 0 of execute is neither a path nor a string.
    ERROR: C:/users/izada/desktop/selenium-master/selenium-master/java/server/src/org/openqa/selenium/grid/BUILD.bazel:62:1: //java/server/src/org/openqa/selenium/grid:selenium_server depends on @local_config_cc//:cc-compiler-x64_windows in repository @local_config_cc which failed to fetch. no such package '@local_config_cc//': Traceback (most recent call last):
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/cc_configure.bzl", line 120
    configure_windows_toolchain(<1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 690, in configure_windows_toolchain
    _get_msvc_vars(repository_ctx, <1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 566, in _get_msvc_vars
    _get_clang_version(<2 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 469, in _get_clang_version
    repository_ctx.execute(<1 more arguments>)
    Argument 0 of execute is neither a path nor a string.
    ERROR: Analysis of target '//java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar' failed; build aborted: no such package '@local_config_cc//': Traceback (most recent call last):
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/cc_configure.bzl", line 120
    configure_windows_toolchain(<1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 690, in configure_windows_toolchain
    _get_msvc_vars(repository_ctx, <1 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 566, in _get_msvc_vars
    _get_clang_version(<2 more arguments>)
    File "C:/users/izada/_bazel_izada/63qufbrf/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 469, in _get_clang_version
    repository_ctx.execute(<1 more arguments>)
    Argument 0 of execute is neither a path nor a string.
    INFO: Elapsed time: 2.389s
    INFO: 0 processes.
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)
    Exception RuntimeError' at C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45 - bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false Exception#>' at C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45 - bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false
    Exception #<Class:#<RuntimeError:0x1a06602f>>' at C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45 - bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false Exception#>' at C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45 - bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false
    Exception #<Class:#<RuntimeError:0x1a06602f>>' at C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45 - bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false go aborted! bazel build //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar --workspace_status_command scripts/build-info.py 2>&1 failed with exit code: false C:/Users/IZADA/Desktop/selenium-master/selenium-master/rake_tasks/bazel.rb:45:inexecute'
    C:/Users/IZADA/Desktop/selenium-master/selenium-master/Rakefile:94:in block in <main>' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:273:inblock in execute'
    org/jruby/RubyArray.java:1800:in each' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:273:inexecute'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:214:in block in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:226:inmon_synchronize'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:238:inblock in invoke_prerequisites'
    org/jruby/RubyArray.java:1800:in each' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:236:ininvoke_prerequisites'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:213:in block in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:226:inmon_synchronize'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:238:inblock in invoke_prerequisites'
    org/jruby/RubyArray.java:1800:in each' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:236:ininvoke_prerequisites'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:213:in block in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:226:inmon_synchronize'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:238:inblock in invoke_prerequisites'
    org/jruby/RubyArray.java:1800:in each' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:236:ininvoke_prerequisites'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:213:in block in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/monitor.rb:226:inmon_synchronize'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:194:in invoke_with_call_chain' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/task.rb:183:ininvoke'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:160:in invoke_task' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:116:inblock in top_level'
    org/jruby/RubyArray.java:1800:in each' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:116:inblock in top_level'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:125:in run_with_threads' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:110:intop_level'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:83:in block in run' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:186:instandard_exception_handling'
    uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/lib/rake/application.rb:80:in run' uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared/gems/rake-12.3.2/exe/rake:27:in
    '
    org/jruby/RubyKernel.java:1022:in load' uri:classloader:/META-INF/jruby.home/bin/rake:1:in
    '
    Tasks: TOP => default => grid => selenium-server-standalone => //java/server/src/org/openqa/selenium/grid:selenium_server_deploy.jar

Environment

OS: Windows 10
Bazel version: --> 3.0.0
Java: --> java openJDK 11
Python --> 3.7.7
Ruby --> 2.7.1p83
Maven --> 3.6.3

needs-triaging

Most helpful comment

@t-node It's hardly possible on Windows because Bazel plugin for IDEA has serious Windows-specific issues. That's why we have a good old IDEA project in the tree, just open Selenium source root directory in IDEA and you're done.

All 7 comments

Is this issue still actual in the HEAD of the master branch?

Closing as requested info hasnt been given and no obvious build target in the report

Is this issue still actual in the HEAD of the master branch?

yes its in the head branch

INFO: Repository local_config_cc instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule cc_autoconf defined at:
C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/cc_configure.bzl:143:30: in
ERROR: An error occurred during the fetch of repository 'local_config_cc':
Traceback (most recent call last):
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/cc_configure.bzl", line 120
configure_windows_toolchain(<1 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 721, in configure_windows_toolchain
_get_msvc_vars(repository_ctx, <1 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 534, in _get_msvc_vars
_find_missing_vc_tools(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 418, in _find_missing_vc_tools
find_msvc_tool(repository_ctx, <2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 398, in find_msvc_tool
_get_vc_full_version(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 388, in _get_vc_full_version
_get_latest_subversion(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 366, in _get_latest_subversion
repository_ctx.path((vc_path + "\Tools\MSVC")).readdir()
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC (No such file or directory)
INFO: Repository com_google_guava instantiated at:
no stack (--record_rule_instantiation_callstack not enabled)
Repository rule java_import_external defined at:
C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/io_bazel_rules_closure/closure/private/java_import_external.bzl:113:39: in
ERROR: C:/users/vmoza/ideaprojects/selenium/java/client/test/org/openqa/selenium/virtualauthenticator/BUILD.bazel:4:25: //java/client/test/org/openqa/selenium/virtualauthenticator:VirtualAuthenticatorTest-ie depends on @local_config_cc//:cc-compiler-x64_windows in repository @local_config_cc which failed to fetch. no such package '@local_config_cc//': Traceback (most recent call last):
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/cc_configure.bzl", line 120
configure_windows_toolchain(<1 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 721, in configure_windows_toolchain
_get_msvc_vars(repository_ctx, <1 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 534, in _get_msvc_vars
_find_missing_vc_tools(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 418, in _find_missing_vc_tools
find_msvc_tool(repository_ctx, <2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 398, in find_msvc_tool
_get_vc_full_version(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 388, in _get_vc_full_version
_get_latest_subversion(<2 more arguments>)
File "C:/users/vmoza/_bazel_vmoza/4fu4fbkr/external/bazel_tools/tools/cpp/windows_cc_configure.bzl", line 366, in _get_latest_subversion
repository_ctx.path((vc_path + "\Tools\MSVC")).readdir()
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC (No such file or directory)
ERROR: Analysis of target '//java/client/test/org/openqa/selenium/virtualauthenticator:VirtualAuthenticatorTest-ie' failed; build aborted: Analysis failed
INFO: Elapsed time: 1.743s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (252 packages loaded, 787 targets configured)

I suppose that the rootcause is
C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC (No such file or directory)

Set BAZEL_VC environment variable that points to the proper location of the VC directory. You may also need BAZEL_VC_FULL_VERSION env variable that specifies VC version and BAZEL_VS env variable that points to the location of the BuildTools directory.

See https://docs.bazel.build/versions/2.0.0/windows.html#build_cpp for more details.

Thanks, this worked and I was able to generate binaries. I am trying to setup the selenium java project in Intellij. Can you point me to any helpful resource to setup bazel build project in Intellij?

@t-node It's hardly possible on Windows because Bazel plugin for IDEA has serious Windows-specific issues. That's why we have a good old IDEA project in the tree, just open Selenium source root directory in IDEA and you're done.

Was this page helpful?
0 / 5 - 0 ratings