bazel config fails with no configuration found error
See original GitHub issueDescription of the bug:
I have a constraint named mach
, that I use in a select statement. A simplified pseudo code is below
constraint_setting(mach) # values = [ A, B, C]
cc_binary("binary", srcs = select(A = ["a.cpp"], .. )
#
platform("PA", constraint_values = ["mach:A"])
platform("PB", constraint_values = ["mach:B"])
create_image('IA', deps = ["binary"], platform = "PA")
create_image('IB', deps = ["binary"], platform = "PB")
create_image
does a transition on the platform internally.
It works for most of the images, but for some image it fails to build with the an error
configurable attribute "srcs" in mylibname doesn't match this configuration: Unable to find mach implementation for 'servo'
This instance of mylibname has configuration identifier 22f6aa7
But when I try bazel config 22f6aa7
, it errors out with
︁︁ ︁ bazel config 22f6aa7
INFO: Invocation ID: c7fa3463-a54c-49ea-bb21-79f8c3717ac2
INFO: Displaying config with id 22f6aa7
ERROR: No configuration found with ID prefix 22f6aa7
I also tried
︁︁ ︁ bazel config
INFO: Invocation ID: 033a5c8a-c369-4616-a4fe-7b6270175228
Available configurations:
Link to the slack discussion https://bazelbuild.slack.com/archives/CA31HN1T3/p1655992434086069
What’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
No response
Which operating system are you running Bazel on?
Ubuntu 16.04.7 LTS
What is the output of bazel info release
?
release 5.0.0- (@non-git)
If bazel info release
returns development version
or (@non-git)
, tell us how you built Bazel.
NIXOS based bazel
What’s the output of git remote get-url origin; git rev-parse master; git rev-parse HEAD
?
No response
Have you found anything relevant by searching the web?
No response
Any other information, logs, or outputs that you want to share?
No response
Issue Analytics
- State:
- Created a year ago
- Comments:15 (6 by maintainers)
Top Results From Across the Web
Beautify Bazel configuration errors · Issue #11984 - GitHub
I'm starting this for configuration-related errors since this is the Bazel area I know best. More broadly I'd like to extend these principles...
Read more >Configurations | Bazel
Bazel doesn't support transitioning on --config . This is because --config is an "expansion" flag that expands to other flags. Crucially, -- ...
Read more >Bazel setup issue: "Auto-Configuration Error: Cannot find Java ...
Environment variable JAVA_HOME is unset. In this configuration the following command fails: $ bazel coverage --config=linux_x86 -c dbg ...
Read more >Executing genrule @png_archive//:configure failed
I've been trying to understand why I can't build Tensorflow with Bazel. I've been following the install instructions from the Tensorflow webpage ...
Read more >IntelliJ IDEA Setup - Gerrit Code Review
If the synchronization of the project with the BUILD files using the Bazel plugin fails and IntelliJ reports the error Could not get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Debugging bazel is kind of tricky, but here’s a rough guide:
bazel build -c dbg //src:bazel
bazel-dev.sh
script from the bazel source: this will rebuild your dev bazel if necessary, assuming that either you checked out bazel to$HOME/os-bazel
or that you set theBAZEL_DIR
environment attributebazel-dev --host_jvm_debug build options targets
SkyframeExecutor.handleAnalysisInvalidatingChange
, and see if that works. This might be the wrong location, since I don’t see the log message I would expect.SkyframeExecutor.clearAnalysisCache
orBlazeWorkspace.clearCaches
Good luck!
Yes, if you’re invalidating your build everytime you invoke Bazel, this will happen.
Look into the
--stamp
flag and the workspace status feature for a more maintainable way to handle this.