ziglang / zig

General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
https://ziglang.org
MIT License
34.33k stars 2.51k forks source link

Zig 0.14 no longer works with mounted drives #20674

Closed oldwo closed 2 months ago

oldwo commented 2 months ago

Zig Version

0.14.0-dev.362+9d9b5a11e

Steps to Reproduce and Observed Behavior

set ZIG_LOCAL_CACHE_DIR=D:\ZIG_LOCAL_CACHE_DIR REM Where D: is RAMDISK (ImDisk, RadeonRAMDisk or ArsenalImageMounter) or a Samba network drive. zig build ....

thread 5424 panic: invalid enum value C:\WinProg\zig\lib\std\Build\Step.zig:442:77: 0x1abe27 in evalZigProcess (build.exe.obj) const prefix_index: std.zig.Server.Message.PathPrefix = @enumFromInt(prefixed_path[0] - 1); ^ C:\WinProg\zig\lib\std\Build\Step\Compile.zig:1744:54: 0x1646c3 in make (build.exe.obj) const maybe_output_bin_path = step.evalZigProcess(zig_args, prog_node) catch |err| switch (err) { ^ C:\WinProg\zig\lib\std\Build\Step.zig:225:13: 0x120830 in make (build.exe.obj) s.makeFn(s, prog_node) catch |err| switch (err) { ^ C:\WinProg\zig\lib\compiler\build_runner.zig:1034:31: 0xdc508 in workerMakeOneStep (build.exe.obj) const make_result = s.make(sub_prog_node); ^ C:\WinProg\zig\lib\std\Thread\Pool.zig:115:39: 0xdcdb8 in runFn (build.exe.obj) @call(.auto, func, closure.arguments); ^ C:\WinProg\zig\lib\std\Thread\Pool.zig:291:32: 0x149a91 in worker (build.exe.obj) run_node.data.runFn(&run_node.data, id); ^ C:\WinProg\zig\lib\std\Thread.zig:409:13: 0x11f5dc in callFn__anon_13901 (build.exe.obj) @call(.auto, f, args); ^ C:\WinProg\zig\lib\std\Thread.zig:522:30: 0xdbaee in entryFn (build.exe.obj) return callFn(f, self.fn_args); ^ ???:?:?: 0x7ff82aec7343 in ??? (KERNEL32.DLL) ???:?:?: 0x7ff82b21cc90 in ??? (ntdll.dll) error: unable to read results of configure phase from 'D:\ZIG_LOCAL_CACHE_DIR\tmp\6eebbdfc7da4add8': FileNotFound

rust is known to not work with RAMDrives due to llvm limitations. This was one of the main reasons I switched to zig. My sources reside on a network Samba-mounted drive. See also https://github.com/ziglang/zig/issues/8997 https://github.com/ziglang/zig/issues/9215

Expected Behavior

Zig should create executable file in zig-out/bin directory. It works fine with zig versions 0.11, 0.12 and "zig-windows-x86_64-0.13.0-dev.345+103b885fc".

oldwo commented 2 months ago

The demo project from zig init is good enough to demonstrate the failure.

andrewrk commented 2 months ago

Pretty sure this is a duplicate of #20648. should be fixed soon

(it also has absolutely nothing to do with mounted drives)