bazel-contrib / bazel-contrib/rules_foreign_cc

could not be resolved: No repository visible as '@glib_dev' from repository '@@rules_foreign_cc~'

Open
#1,198 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
737
Forks
270
PR merge metrics
No merged PRs in 30d

Description

**Environment**
`
Windows 11, Microsoft Visual Studio 2022, bazel 7.1.1
`

**MODULE.bazel**
`
bazel_dep(name = "rules_foreign_cc", version = "0.10.1")
tools = use_extension("@rules_foreign_cc//foreign_cc:extensions.bzl", "tools")
tools.cmake(version = "3.23.2")
tools.ninja(version = "1.11.1")
use_repo(
tools,
"glib_runtime",
"glib_dev",
"glib_src",
"gettext_runtime",
"cmake_3.23.2_toolchains",
"cmake_src",
"gnumake_src",
"meson_src",
"ninja_1.11.1_toolchains",
"ninja_build_src",
"pkgconfig_src",
"rules_foreign_cc_framework_toolchains",
)

register_toolchains(
"@rules_foreign_cc_framework_toolchains//:all",
"@rules_foreign_cc//toolchains:built_make_toolchain",
"@rules_foreign_cc//toolchains:built_meson_toolchain",
"@rules_foreign_cc//toolchains:built_pkgconfig_toolchain",
"@rules_foreign_cc//toolchains:preinstalled_autoconf_toolchain",
"@rules_foreign_cc//toolchains:preinstalled_automake_toolchain",
"@rules_foreign_cc//toolchains:preinstalled_m4_toolchain",
"@rules_foreign_cc//toolchains:preinstalled_pkgconfig_toolchain",
"@cmake_3.23.2_toolchains//:all",
"@ninja_1.11.1_toolchains//:all",
)
`
**Command**
bazel build @@//tender-gui --config debug --define=PATH="%PATH%" --define=PKG_CONFIG_PATH="%PKG_CONFIG_PATH%"

**Output**
`
Starting local Bazel server and connecting to it...
ERROR: no such package '@@[unknown repo 'glib_dev' requested from @@rules_foreign_cc~]//': The repository '@@[unknown repo 'glib_dev' requested from @@rules_foreign_cc~]' could not be resolved: No repository visible as '@glib_dev' from repository '@@rules_foreign_cc~'
ERROR: D:/appdata/bazel/7ibwqnpt/external/rules_foreign_cc~/toolchains/BUILD.bazel:317:15: no such package '@@[unknown repo 'glib_dev' requested from @@rules_foreign_cc~]//': The repository '@@[unknown repo 'glib_dev' requested from @@rules_foreign_cc~]' could not be resolved: No repository visible as '@glib_dev' from repository '@@rules_foreign_cc~' and referenced by '@@rules_foreign_cc~//toolchains:pkgconfig_tool_msvc_build_'
ERROR: Analysis of target '//tender-gui:tender-gui' failed; build aborted: Analysis failed
INFO: Elapsed time: 29.633s, Critical Path: 0.06s
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~ninja_1.11.1_win; starting
Fetching repository @@rules_foreign_cc~~tools~gnumake_src; starting
Fetching repository @@rules_foreign_cc~~tools~pkgconfig_src; starting
Fetching D:/appdata/bazel/7ibwqnpt/external/rules_foreign_cc~~tools~gnumake_src; Extracting make-4.4.tar.gz
`

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the failure with the provided Bazel command and inspect MODULE.bazel alongside rules_foreign_cc/toolchains/BUILD.bazel, especially the pkgconfig toolchain reference to glib_dev. Determine why the repository created by the tools extension is not visible there. Done means the target analyzes and builds successfully on the stated Windows and Bazel versions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.