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

Attempting to zig build run (exe.run()) when cross-compiling #12875

Open
DiskPoppy opened this issue Sep 16, 2022 · 1 comment
Open

Attempting to zig build run (exe.run()) when cross-compiling #12875

DiskPoppy opened this issue Sep 16, 2022 · 1 comment
Labels
bug Observed behavior contradicts documented or intended behavior contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Milestone

Comments

@DiskPoppy
Copy link

Zig Version

0.10.0-dev.3685+dae7aeb33

Steps to Reproduce

I cross-compiled on macOS to Windows, however I erroneously did zig build run instead of zig build (while having the default run step generated by zig init-exe).

Expected Behavior

I expected to have an appropriate error message. (Ideally, I would want to launch wine, though that should be possible by coding it in the build.zig)

Actual Behavior

Instead I get this:

error: UnexpectedExitCode
/path/zig/lib/zig/std/os.zig:2753:19: 0x10dc2a60e in mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/path/zig/lib/zig/std/os.zig:2713:9: 0x10dc16053 in mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/path/zig/lib/zig/std/fs.zig:1361:9: 0x10dc15f0b in makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/path/zig/lib/zig/std/os.zig:2753:19: 0x10dc2a60e in mkdiratZ (build)
        .EXIST => return error.PathAlreadyExists,
                  ^
/path/zig/lib/zig/std/os.zig:2713:9: 0x10dc16053 in mkdirat (build)
        return mkdiratZ(dir_fd, &sub_dir_path_c, mode);
        ^
/path/zig/lib/zig/std/fs.zig:1361:9: 0x10dc15f0b in makeDir (build)
        try os.mkdirat(self.fd, sub_path, default_new_dir_mode);
        ^
/path/zig/lib/zig/std/build/RunStep.zig:277:17: 0x10dc9f575 in runCommand (build)
                return error.UnexpectedExitCode;
                ^
/path/zig/lib/zig/std/build/RunStep.zig:183:5: 0x10dc88554 in make (build)
    try runCommand(
    ^
/path/zig/lib/zig/std/build.zig:3655:9: 0x10dc2ab87 in make (build)
        try self.makeFn(self);
        ^
/path/zig/lib/zig/std/build.zig:508:9: 0x10dc16f99 in makeOneStep (build)
        try s.make();
        ^
/path/zig/lib/zig/std/build.zig:502:17: 0x10dc16efd in makeOneStep (build)
                return err;
                ^
/path/zig/lib/zig/std/build.zig:463:13: 0x10dc16b7a in make (build)
            try self.makeOneStep(s);
            ^
/path/zig/lib/zig/build_runner.zig:213:21: 0x10dc1a0cf in main (build)
            else => return err,

@DiskPoppy DiskPoppy added the bug Observed behavior contradicts documented or intended behavior label Sep 16, 2022
@DiskPoppy
Copy link
Author

DiskPoppy commented Sep 17, 2022

Ideally, I would want to launch wine

Nevermind, there is -fwine, but it only seems to work on Linux.

@andrewrk andrewrk added zig build system std.Build, the build runner, `zig build` subcommand, package management contributor friendly This issue is limited in scope and/or knowledge of Zig internals. labels Oct 15, 2022
@andrewrk andrewrk added this to the 0.12.0 milestone Oct 15, 2022
@andrewrk andrewrk added the enhancement Solving this issue will likely involve adding new logic or components to the codebase. label Oct 15, 2022
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 contributor friendly This issue is limited in scope and/or knowledge of Zig internals. enhancement Solving this issue will likely involve adding new logic or components to the codebase. zig build system std.Build, the build runner, `zig build` subcommand, package management
Projects
None yet
Development

No branches or pull requests

2 participants