Zig: FileNotFound in the cache system

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

When building the cg-workbench, the build fails with FileNotFound:

(Stripped out a lot of OutOfMemory errors)

[felix@denkplatte-v2 cg-workbench]$ ~/projects/forks/zig/build/zig build -Dtarget=x86_64-windows-gnu
/home/felix/projects/forks/zig/lib/std/os.zig:1193:23: 0x55e771fad721 in std.os.openatZ (zig1)
            ENOENT => return error.FileNotFound,
                      ^
/home/felix/projects/forks/zig/lib/std/fs.zig:754:13: 0x55e771e81a4f in std.fs.Dir.openFileZ (zig1)
            try os.openatZ(self.fd, sub_path, os_flags, 0);
            ^
/home/felix/projects/forks/zig/lib/std/fs.zig:687:9: 0x55e771e81509 in std.fs.Dir.openFile (zig1)
        return self.openFileZ(&path_c, flags);
        ^
/home/felix/projects/forks/zig/src/Cache.zig:389:22: 0x55e771f39569 in Cache.Manifest.populateFileHash (zig1)
        const file = try fs.cwd().openFile(ch_file.path.?, .{});
                     ^
/home/felix/projects/forks/zig/src/Cache.zig:364:17: 0x55e771ebd25a in Cache.Manifest.hit (zig1)
                try self.populateFileHash(ch_file);
                ^
/home/felix/projects/forks/zig/src/link/Coff.zig:853:13: 0x55e771f1122e in link.Coff.linkWithLLD (zig1)
        _ = try man.hit();
            ^
/home/felix/projects/forks/zig/src/link/Coff.zig:733:9: 0x55e771f0c206 in link.Coff.flush (zig1)
        return self.linkWithLLD(comp);
        ^
/home/felix/projects/forks/zig/src/link.zig:341:22: 0x55e771ec8ba2 in link.File.flush (zig1)
            .coff => return @fieldParentPtr(Coff, "base", base).flush(comp),
                     ^
/home/felix/projects/forks/zig/src/Compilation.zig:1054:5: 0x55e771ec1e84 in Compilation.update (zig1)
    // If there are any errors, we anticipate the source files being loaded
    ^
/home/felix/projects/forks/zig/src/main.zig:1761:5: 0x55e771e68334 in main.updateModule (zig1)
    try comp.update();
    ^
/home/felix/projects/forks/zig/src/main.zig:1637:5: 0x55e771e05388 in main.buildOutputType (zig1)
    try updateModule(gpa, comp, zir_out_path, hook);
    ^
/home/felix/projects/forks/zig/src/main.zig:126:9: 0x55e771ddeed2 in main.mainArgs (zig1)
        return buildOutputType(gpa, arena, args, .{ .build = .Exe });
        ^

I haven't debugged into it further, but before i forget, i make a bug report. Happens with 0.6.0+4eb390b15

bug stage1

Most helpful comment

All 3 comments

I believe it's because of the mismatch between computeOutFileNames and binNameAlloc, the latter is completely oblivious to the gnu-on-windows abi naming conventions.

Yeah, we discovered this yesterday in the IRC as well, but i didn' had the idea to put that finding here :facepalm:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

bronze1man picture bronze1man  路  3Comments

DavidYKay picture DavidYKay  路  3Comments

S0urc3C0de picture S0urc3C0de  路  3Comments

andrewrk picture andrewrk  路  3Comments

jayschwa picture jayschwa  路  3Comments