You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
bazel --bazelrc=./conan/conan_bzl.rc build --config=conan-config //main:demo
Extracting Bazel installation...
Starting local Bazel server and connecting to it...
WARNING: Couldn't auto load rules or symbols, because no dependency on module/repository 'rules_android' found. This will result in a failure if there's a reference to those rules or symbols.
ERROR: Traceback (most recent call last):
File "/home/eriff/repos/examples2/examples/tools/google/bazeltoolchain/7_x/string_formatter/conan/bazelRootDir/d5c9c1c12146af1a257e11f337e7ccd9/external/+conan_extension+fmt/BUILD.bazel", line 47, column 16, in <toplevel>
srcs = glob([
Error in glob: glob pattern 'bin/**' didn't match anything, but allow_empty is set to False (the default value of allow_empty can be set with --incompatible_disallow_empty_glob).
ERROR: /home/eriff/repos/examples2/examples/tools/google/bazeltoolchain/7_x/string_formatter/main/BUILD:1:10: Target '@@+conan_extension+fmt//:fmt' contains an error and its package is in error and referenced by '//main:demo'
ERROR: Analysis of target '//main:demo' failed; build aborted: Analysis failed
INFO: Elapsed time: 21.228s, Critical Path: 0.02s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
Fetching repository @@rules_cc++cc_configure_extension+local_config_cc; starting
It complains about the conan-generated files, particularly this part
Since fmt provides no binaries, that glob matches nothing and Bazel doesn't like it. Commenting out the whole block makes the build pass, but a better fix is to add allow_empty to that glob call.
Environment
Describe the bug
I'm following the tutorial from https://docs.conan.io/2/examples/tools/google/bazeltoolchain/build_simple_bazel_7x_project.html
to learn how to integrate conan into a bazel project.
Granted, the tutorial mentions it is for Bazel 7 yet I'm using 8. Maybe conan doesn't support 8?
Anyways, the build fails with
It complains about the conan-generated files, particularly this part
Since
fmt
provides no binaries, that glob matches nothing and Bazel doesn't like it. Commenting out the whole block makes the build pass, but a better fix is to addallow_empty
to thatglob
call.With that fix the build passes
The text was updated successfully, but these errors were encountered: