Zig: [windows] zig build give warning: failed to save archive hash digest symlink: AccessDenied

Created on 1 Oct 2020  路  6Comments  路  Source: ziglang/zig

version: 0.6.0+4eb390b15
os: windows

LLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied
warning: failed to save archive hash digest symlink: AccessDenied
LLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied
warning: failed to save archive hash digest symlink: AccessDenied
Code Generation [317/2034] std.hash_map.HashMapUnmanaged([]const u8,std.build.UserInpLLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied
warning: failed to save linking hash digest symlink: AccessDenied
LLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied
warning: failed to save archive hash digest symlink: AccessDenied
LLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied
warning: failed to save archive hash digest symlink: AccessDenied
LLVM Emit Output... warning(compilation): failed to save stage1 hash digest symlink: AccessDenied

Most helpful comment

In order to create symlinks on windows you need to be an Administrator (or have the permission to create symlinks) or, on newer Windows 10 builds, you can do so iff the developer mode is active.

This is news to me. In this case the code should be modified to not use a symlink to store the hash. File contents will do just as well. Using a symlink was just a way to do fewer syscalls since the file contents is only a few bytes.

All 6 comments

In order to create symlinks on windows you need to be an Administrator (or have the permission to create symlinks) or, on newer Windows 10 builds, you can do so _iff_ the developer mode is active.

In order to create symlinks on windows you need to be an Administrator (or have the permission to create symlinks) or, on newer Windows 10 builds, you can do so _iff_ the developer mode is active.

BUT as a compiler, it should not require any privilege...

This digest symlink is an optimization, failing to update it just means you will get an extra cache miss later.

In order to create symlinks on windows you need to be an Administrator (or have the permission to create symlinks) or, on newer Windows 10 builds, you can do so iff the developer mode is active.

This is news to me. In this case the code should be modified to not use a symlink to store the hash. File contents will do just as well. Using a symlink was just a way to do fewer syscalls since the file contents is only a few bytes.

Closing this now in favor of #6500

Was this page helpful?
0 / 5 - 0 ratings