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

0.12.0 requires local_config_cc to be configured #1198

Closed
Toxicable opened this issue Oct 11, 2019 · 5 comments
Closed

0.12.0 requires local_config_cc to be configured #1198

Toxicable opened this issue Oct 11, 2019 · 5 comments

Comments

@Toxicable
Copy link
Contributor

Toxicable commented Oct 11, 2019

Now that rules_docker depends on rules_go we have an issue where downstream users who trying to build a nodejs, or other non C++ containers, now requires C++ to be setup and configured.
The specific error im getting in CI:

ERROR: /home/runner/.cache/bazel/_bazel_runner/f2e96da83c9a9bca36350376aeb4df02/external/io_bazel_rules_go/BUILD.bazel:80:1: Target '@io_bazel_rules_go//:cgo_context_data' depends on toolchain '@local_config_cc//:cc-compiler-k8', which cannot be found: error loading package '@local_config_cc//': Unable to load file '@local_config_cc//:armeabi_cc_toolchain_config.bzl': file doesn't exist'

The defaults work on my workstation but not in CI since I don't know what system deps are required for the C/C++ tool chains to configure themselves on our CI docker container.

I think if possible we should change some config so that downstream projects don't require the C/C++ toolchains to be configured.
or
Provide documentation for how to disable it.
or
If it's not possible to disable this requirement, then provide documentation on how to setup the C/C++ toolchain, even a mention + a link would be suffcient here.

@nlopezgi
Copy link
Contributor

nlopezgi commented Oct 11, 2019

Thanks for creating this issue. I will look into it asap.

@nlopezgi
Copy link
Contributor

see also bazel-contrib/rules_go#2089 (comment)

@nlopezgi
Copy link
Contributor

rules_docker now includes an implementation for containerregistry that is go based. It's very likely the case that this go code has a dependency on a C toolchain that we cannot remove. It's also quite possible that rules_go now always requires this dependency on the C toolchain to be present (@jayconrod, can you comment if you know?).
If this is the case, then a C toolchain is required now to use rules_docker.
Setting up a C/C++ toolchain should be as simple as installing the required packages for Bazel (e.g., https://docs.bazel.build/versions/master/install-ubuntu.html#step-1-install-required-packages). Will keep open to wait for opinion from @jayconrod, but likely, you'll just need to install gcc/clang in your CI (note this is a requirement for Bazel overall to have C/C++ tools installed).

@jayconrod
Copy link

@nlopezgi I just commented on bazel-contrib/rules_go#2089 (comment).

+1 to installing gcc or clang as a workaround.

@nlopezgi
Copy link
Contributor

Thanks for your comment. Closing for now as a C/C++ toolchain is stated as a requirement for installing Bazel and it is now a hard requirement for these rules. Please let me know if for any reason anyone wants me to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants