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

Windows 2022 build issue #58

Open
Vertexwahn opened this issue Sep 16, 2023 · 0 comments
Open

Windows 2022 build issue #58

Vertexwahn opened this issue Sep 16, 2023 · 0 comments

Comments

@Vertexwahn
Copy link

Vertexwahn commented Sep 16, 2023

When I try to build a Hello World example with these rules on Windows 2022 Server I get the following error message:

[4 / 5] Linking D binary hello_world; 0s local
ERROR: D:/a/1/s/hello_world/d/BUILD.bazel:3:9: Linking D binary hello_world failed: (Exit 1): dmd.exe failed: error executing command (from target //:hello_world) external\dmd_windows_x86_64\dmd2\windows\bin64\dmd.exe -g -m64 -mscrtlib=msvcrt -ofbazel-out/x64_windows-fastbuild/bin/hello_world.exe -L/LIBPATH:external/dmd_windows_x86_64/dmd2/windows/lib64 ... (remaining 1 argument skipped)
lld-link: error: could not open 'msvcrt.lib': no such file or directory
lld-link: error: could not open 'OLDNAMES.lib': no such file or directory
Error: linker exited with status 1
Target //:hello_world failed to build

hello_world.d:

import std.stdio;

void main()
{
    writeln("Hello, World!");
}

WORKSPACE.bazel:

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "io_bazel_rules_d",
    sha256 = "c30aaca512a376058f9295a4d9c2b3a385ad323b6026295a715b48dd53e20520",
    strip_prefix = "rules_d-0e23b60794508983f4a2d21137f5299cdaee6ae3",
    urls = ["https://github.com/bazelbuild/rules_d/archive/0e23b60794508983f4a2d21137f5299cdaee6ae3.tar.gz"],
)

load("@io_bazel_rules_d//d:d.bzl", "d_repositories")

d_repositories()

BUILD.bazel:

load("@io_bazel_rules_d//d:d.bzl", "d_binary")

d_binary(
    name = "hello_world",
    srcs = ["hello_world.d"],
)

.bazelversion:

6.3.2

The example works on Windows 2019 Server

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