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 · 3 comments
Open
Labels
P3 Accepted issue. Team is likely to fix this issue in the future, but no short-term promises are made. type: bug Something that should be working isn't working

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.

@fmeum
Copy link
Contributor

fmeum commented Jan 30, 2025

Would you be interested in sending a PR? The fix looks correct.

@comius comius added P3 Accepted issue. Team is likely to fix this issue in the future, but no short-term promises are made. type: bug Something that should be working isn't working labels Jan 31, 2025
@jerbdroid
Copy link
Author

#363

@grefab
Copy link

grefab commented Mar 11, 2025

Same problem here. Can I help somehow?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 Accepted issue. Team is likely to fix this issue in the future, but no short-term promises are made. type: bug Something that should be working isn't working
Projects
None yet
Development

No branches or pull requests

4 participants