Skip to content

[Bug]: Error on build xz under Windows #2828

Open
@graphixillusion

Description

@graphixillusion

What happened?

As the title says i'm getting this error when i try to build the xz module

bazel build @xz
INFO: Analyzed target @@xz~//:xz (67 packages loaded, 513 targets configured).
ERROR: C:/users/user/_bazel_user/frpfojar/external/xz~/BUILD.bazel:71:10: Copying files failed: (Exit 1): cmd.exe failed: error executing CopyFile command (from target @@xz~//:copy_config) cmd.exe /C bazel-out\x64_windows-fastbuild\bin\external\xz~\copy_config-cmd.bat
Unable to find specified path.
Target @@xz~//:xz failed to build
Use --verbose_failures to see the command lines of failed build steps.
INFO: Elapsed time: 4.916s, Critical Path: 0.34s
INFO: 4 processes: 4 internal.
ERROR: Build did NOT complete successfully

Of course all the files seems to be in the correct place and if i manually run this command, it works without errors:

cmd.exe /C bazel-out\x64_windows-fastbuild\bin\external\xz~\copy_config-cmd.bat

Version

Development (host) and target OS/architectures:
Windows 11 x64 23H2

Output of bazel --version:
7.3.1

Version of relevant rules from the WORKSPACE or MODULE.bazel file:
bazel_dep(name = "hermetic_cc_toolchain", version = "3.1.1")
bazel_dep(name = "zlib", version = "1.3.1.bcr.3")
bazel_dep(name = "bzip2", version = "1.0.8.bcr.1")
bazel_dep(name = "lz4", version = "1.9.4")
bazel_dep(name = "zstd", version = "1.5.6")
bazel_dep(name = "xz", version = "5.4.5.bcr.4")

toolchains = use_extension("@hermetic_cc_toolchain//toolchain:ext.bzl", "toolchains")
use_repo(toolchains, "zig_sdk")

register_toolchains(
"@zig_sdk//toolchain:windows_amd64",
)

xz is the only module which throws this error, all the other modules works good.

How to reproduce

No response

Any other information?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions