Skip to content

FileNotFound in the cache system #6483

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

Closed
ikskuh opened this issue Oct 1, 2020 · 3 comments
Closed

FileNotFound in the cache system #6483

ikskuh opened this issue Oct 1, 2020 · 3 comments
Assignees
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Milestone

Comments

@ikskuh
Copy link
Contributor

ikskuh commented Oct 1, 2020

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

@alexnask alexnask added bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend. labels Oct 1, 2020
@Vexu Vexu added this to the 0.7.0 milestone Oct 1, 2020
@LemonBoy
Copy link
Contributor

LemonBoy commented Oct 3, 2020

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.

@ikskuh
Copy link
Contributor Author

ikskuh commented Oct 3, 2020

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

@andrewrk andrewrk self-assigned this Oct 5, 2020
andrewrk added a commit that referenced this issue Oct 5, 2020
See #6552 #6553 #6483

Also fixes a regression introduced in
1d777e9 of not converting an integer to
a string for a command line parameter.
@andrewrk
Copy link
Member

Fixed by 33bc1eb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Observed behavior contradicts documented or intended behavior stage1 The process of building from source via WebAssembly and the C backend.
Projects
None yet
Development

No branches or pull requests

5 participants