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

almost all of @bazel_tools//tools/cpp may not exist for [email protected] #612

Open
kczulko opened this issue Nov 26, 2024 · 3 comments · Fixed by #613 · May be fixed by #622
Open

almost all of @bazel_tools//tools/cpp may not exist for [email protected] #612

kczulko opened this issue Nov 26, 2024 · 3 comments · Fixed by #613 · May be fixed by #622
Labels
P0 blocker: fix immediately! type: bug

Comments

@kczulko
Copy link
Contributor

kczulko commented Nov 26, 2024

Hello,

I've just received an email from bazelbuild/bazel-central-registry saying that the module I maintain contains errors for [email protected]. The build output says that this import may not exist.

Build run: https://buildkite.com/bazel/bcr-bazel-compatibility-test/builds/72#019367bc-a445-4f6b-8c2b-0413f2287689

Error message:

(09:32:44) ERROR: Traceback (most recent call last):
	File "/var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5d027fa2b9037dc8b327099b176cebb0/external/rules_nixpkgs_core+/util.bzl", line 1, column 55, in <toplevel>
		load("@bazel_tools//tools/cpp:lib_cc_configure.bzl", "get_cpu_value")
Error: file '@bazel_tools//tools/cpp:lib_cc_configure.bzl' does not contain symbol 'get_cpu_value'
(09:32:44) ERROR: Analysis of target '//:spec' failed; build aborted: Error loading '@@rules_nixpkgs_core+//extensions:package.bzl' for module extensions, requested by /var/lib/buildkite-agent/builds/bk-docker-2fzt/bazel-org-repo-root/output/rules_elm-1.0.1/examples/elm-test/MODULE.bazel:105:24: at /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5d027fa2b9037dc8b327099b176cebb0/external/rules_nixpkgs_core+/extensions/package.bzl:6:6: at /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5d027fa2b9037dc8b327099b176cebb0/external/rules_nixpkgs_core+/nixpkgs.bzl:36:5: initialization of module 'util.bzl' failed: at /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5d027fa2b9037dc8b327099b176cebb0/external/rules_nixpkgs_core+/extensions/package.bzl:6:6: at /var/lib/buildkite-agent/.cache/bazel/_bazel_buildkite-agent/5d027fa2b9037dc8b327099b176cebb0/external/rules_nixpkgs_core+/nixpkgs.bzl:36:5: initialization of module 'util.bzl' failed
@malt3
Copy link
Collaborator

malt3 commented Nov 26, 2024

Thank you for reporting this bug! It looks like it might be easy enough to fix, since this symbol is now provided by rules_cc.
If you feel comfortable doing so, feel free to open a PR or I'll try to get to it soon.

EDIT: the implementation I linked to is private, so depending on it is probably a bad idea.
@avdv suggested vendoring the macro instead.

@kczulko
Copy link
Contributor Author

kczulko commented Nov 26, 2024

Hi @malt3

Sure, I may give it a try in my spare time. Thx for the hints!

Best regards,
Karol

@mergify mergify bot closed this as completed in #613 Nov 28, 2024
@malt3 malt3 changed the title 'get_cpu_value' may not exist for [email protected] almost all of @bazel_tools//tools/cpp may not exist for [email protected] Nov 29, 2024
@malt3
Copy link
Collaborator

malt3 commented Nov 29, 2024

I noticed that most of that package was deleted.

Here is a list of components I will migrate:

  • many symbols from @bazel_tools//tools/cpp:lib_cc_configure.bzl
  • @bazel_tools//tools/cpp:BUILD.tpl
  • @bazel_tools//tools/cpp:armeabi_cc_toolchain_config.bzl
  • @bazel_tools//tools/cpp:generate_system_module_map.sh
  • @bazel_tools//tools/cpp:osx_cc_wrapper.sh.tpl
  • @bazel_tools//tools/cpp:linux_cc_wrapper.sh.tpl

We can vendor them from rules_cc.

@malt3 malt3 reopened this Nov 29, 2024
@malt3 malt3 added P0 blocker: fix immediately! and removed good first issue labels Nov 29, 2024
@malt3 malt3 linked a pull request Nov 29, 2024 that will close this issue
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P0 blocker: fix immediately! type: bug
Projects
None yet
2 participants