Open AndersSundman opened 1 month ago
Hi @AndersSundman
Thanks for your report.
The xorg
recipe is what we call a "system" recipe, just a wrapper around some existing system libraries, but not containing the libraries itself. It is possible that the BazelDeps integration is not taking system packages into account, I am assigning @franramirez688 to check this.
Hi @AndersSundman
I can't reproduce the issue. I just tried your example, and it's working fine. The xorg
recipe is empty as it doesn't contain the library itself. Could you please provide a minimum repro case? I'm using Bazel 7.1.2 and Conan 2.7.0. I also recommend to update the requirements just in case you're using an older version:
$ conan create . --build=missing --update
Describe the bug
This conanfile.py
Creates an invalid
BUILD.bazel
file for theglfw
dependencyxorg
. Note: these specific libraries are just examples. I think it might be a problem for all libraries that use absolute paths.The problem is the generated
BUILD.bazel
file that has this cc_libraryError message is:
Bazel doesn't (afaik) support absolute globs, so the
hdrs
attribute can't be generated with a glob that takes an absolute path.How to reproduce it
I'm trying this on ubuntu 22.
Create a minimal project with the conanfile above,
Put this in the MODULE.bazel
and create a dummy cc_library with empty files and a
deps = ["@glfw"]
then bazel build the target and you get the error