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

rules_cc fails on windows: Error: key "DUMPBIN" not found in dictionary #308

Open
jerbdroid opened this issue Jan 19, 2025 · 0 comments
Open

Comments

@jerbdroid
Copy link

Using Bazel 8.0.1 on windows rules_cc fails with following error Error: key "DUMPBIN" not found in dictionary.

ERROR ../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl:754:64: An error occurred during the fetch of repository 'rules_cc++cc_configure_extension+local_config_cc':
   Traceback (most recent call last):
        File ".../rules_cc+/cc/private/toolchain/cc_configure.bzl", line 89, column 36, in cc_autoconf_impl
                configure_windows_toolchain(repository_ctx)
        File ".../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 881, column 35, in configure_windows_toolchain
                msvc_vars_x64 = _get_msvc_vars(repository_ctx, paths, "x64")
        File ".../rules_cc+/cc/private/toolchain/windows_cc_configure.bzl", line 754, column 64, in _get_msvc_vars
                "%{msvc_dumpbin_path_" + target_arch + "}": build_tools["DUMPBIN"],

Looks like build_tools["DUMPBIN"] = find_msvc_tool(repository_ctx, vc_path, "dumpbin.exe", "x64") is missing from _get_msvc_vars . Adding the missing line seems to fix the issue.

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

1 participant