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

no such package '@[unknown repo 'gettext_runtime' requested from @rules_foreign_cc #1191

Open
JeySamir opened this issue Apr 11, 2024 · 1 comment

Comments

@JeySamir
Copy link

Trying to build examples. I get the error "no such package". How can I fix it?
OS: Windows 10

MSYS2:

$ 
Jay@PC  /c/projects/other/rules_foreign_cc-0.10.1/rules_foreign_cc-0.10.1/examples
bazel build //cmake_hello_world_lib/shared:libhello
ERROR: no such package '@@[unknown repo 'gettext_runtime' requested from @@rules_foreign_cc~]//': The repository '@@[unknown repo 'gettext_runtime' requested from @@rules_foreign_cc~]' could not be resolved: No repository visible as '@gettext_runtime' from repository '@@rules_foreign_cc~'
ERROR: C:/msys64/home/Jay/_bazel_Jay/5z5babhu/external/rules_foreign_cc~/toolchains/BUILD.bazel:317:15: no such package '@@[unknown repo 'gettext_runtime' requested from @@rules_foreign_cc~]//': The repository '@@[unknown repo 'gettext_runtime' requested from @@rules_foreign_cc~]' could not be resolved: No repository visible as '@gettext_runtime' from repository '@@rules_foreign_cc~' and referenced by '@@rules_foreign_cc~//toolchains:pkgconfig_tool_msvc_build_'
ERROR: Analysis of target '//cmake_hello_world_lib/shared:libhello' failed; build aborted: Analysis failed
INFO: Elapsed time: 0.188s, Critical Path: 0.01s
INFO: 1 process: 1 internal.
ERROR: Build did NOT complete successfully
FAILED:
    Fetching repository @@rules_foreign_cc~~tools~cmake-3.23.2-windows-x86_64; starting
    Fetching repository @@rules_foreign_cc~~tools~gnumake_src; starting
@jsharpe
Copy link
Member

jsharpe commented Apr 21, 2024

You probably need to add something like the following to your MODULE.bazel file:

tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
use_repo(tools, "gettext_runtime", "glib_dev", "glib_src")

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

2 participants