references a path outside of the execution root
- Dominant language
- Java
- Stars
- 25.8k
- Forks
- 4.6k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 72
Description
package(default_visibility = ["//visibility:public"])
load("@rules_cc//cc:defs.bzl", "cc_binary", "cc_library")
cc_library(
name = "libbpf",
srcs = glob([
"libbpf/src/*.c",
"libbpf/src/*.h",
]),
hdrs = glob([
"libbpf/src/*.h",
]),
includes = ["libbpf/src"],
copts = [
"-Ilibbpf/src",
"-Ilibbpf/include",
"-DPACKAGE=\"bpftool\"",
"-I/usr/src/linux-headers-6.8.0-40-generic/include",
"-D__EXPORTED_HEADERS__"
],
linkopts = ["-lelf", "-lz"]
)
Contributor guide
Research direction
Start with the reported cc_library rule and reproduce the error using the shown /usr/src/linux-headers-6.8.0-40-generic/include path. Trace how Bazel handles this include path relative to the execution root; done means the rule no longer reports an outside-root reference while retaining the shown libbpf build inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, linux
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100