rules_foreign_cc icon indicating copy to clipboard operation
rules_foreign_cc copied to clipboard

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

Open JeySamir opened this issue 1 year ago • 1 comments

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

JeySamir avatar Apr 11 '24 12:04 JeySamir

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")

jsharpe avatar Apr 21 '24 14:04 jsharpe