Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

@bazel_tools references missing targets below tools/cpp/runfiles #15397

Open
FaBrand opened this issue May 4, 2022 · 0 comments
Open

@bazel_tools references missing targets below tools/cpp/runfiles #15397

FaBrand opened this issue May 4, 2022 · 0 comments
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug

Comments

@FaBrand
Copy link
Contributor

FaBrand commented May 4, 2022

Description of the bug:

The exported version of @bazel_tools//tools/cpp:srcs references a label that does not exist.

This causes a cquery to fail:

$ bazel cquery @bazel_tools//tools/cpp/...
no such target '@bazel_tools//tools/cpp/runfiles:srcs': target 'srcs' not declared in package 'tools/cpp/runfiles' defined by <output_base</external/bazel_tools/tools/cpp/runfiles/BUILD and referenced by '@bazel_tools//tools/cpp:srcs'

ERROR: Analysis of target '@bazel_tools//tools/cpp:srcs' failed; build aborted: Analysis failed

What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Executing cquery:

bazel cquery @bazel_tools//tools/cpp/...

Which operating system are you running Bazel on?

Windows 10 and ubuntu 20.04

What is the output of bazel info release?

release 5.1.1

If bazel info release returns development version or (@non-git), tell us how you built Bazel.

No response

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?

I searched the issues https://github.com/bazelbuild/bazel/issues for similar issues.

Any other information, logs, or outputs that you want to share?

I found a difference in https://github.com/bazelbuild/bazel/blob/5.1.1/tools/cpp/BUILD.tools#L487 .

As compared to: https://github.com/bazelbuild/bazel/blob/5.1.1/tools/cpp/BUILD#L24

I can't tell whether the referred target https://github.com/bazelbuild/bazel/blob/5.1.1/tools/cpp/runfiles/BUILD#L4 should be also included in https://github.com/bazelbuild/bazel/blob/5.1.1/tools/cpp/runfiles/BUILD.tools or if the dangling reference should be removed.

@sgowroji sgowroji added type: bug team-Configurability platforms, toolchains, cquery, select(), config transitions untriaged labels May 5, 2022
@gregestren gregestren added team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website and removed team-Configurability platforms, toolchains, cquery, select(), config transitions labels May 9, 2022
@meteorcloudy meteorcloudy added P3 We're not considering working on this, but happy to review a PR. (No assignee) help wanted Someone outside the Bazel team could own this and removed untriaged labels May 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Someone outside the Bazel team could own this P3 We're not considering working on this, but happy to review a PR. (No assignee) team-OSS Issues for the Bazel OSS team: installation, release processBazel packaging, website type: bug
Projects
None yet
Development

No branches or pull requests

4 participants