Cannot find path #517

Closed
opened 2022-09-08 09:30:26 +00:00 by rpherman · 12 comments
rpherman commented 2022-09-08 09:30:26 +00:00 (Migrated from github.com)

I installed Zig and performed the first two steps of the following successfully:

git clone https://github.com/hexops/mach cd mach/ zig build run-example-boids

But when I try the 'zig build run-example-boids' line, it fails with this error:

PS E:\mach> zig build run-example-boids E:\mach\libs\sysaudio\build.zig:3:23: error: unable to load 'E:\mach\libs\sysaudio\libs\mach-sysjs\build.zig': FileNotFound const sysjs = @import("libs/mach-sysjs/build.zig");

I am running Zig version:

PS E:\mach\libs> zig version 0.10.0-dev.980+db82c1b98

mach-sysjs appears to be a file, and not a directory containing build.zig.

Very excited for this to work! Thank you!

I installed Zig and performed the first two steps of the following successfully: `git clone https://github.com/hexops/mach cd mach/ zig build run-example-boids` But when I try the 'zig build run-example-boids' line, it fails with this error: `PS E:\mach> zig build run-example-boids E:\mach\libs\sysaudio\build.zig:3:23: error: unable to load 'E:\mach\libs\sysaudio\libs\mach-sysjs\build.zig': FileNotFound const sysjs = @import("libs/mach-sysjs/build.zig");` I am running Zig version: `PS E:\mach\libs> zig version 0.10.0-dev.980+db82c1b98` mach-sysjs appears to be a file, and not a directory containing build.zig. Very excited for this to work! Thank you!
alichraghi commented 2022-09-08 09:32:39 +00:00 (Migrated from github.com)

could u provide some more info?

could u provide some more info?
rpherman commented 2022-09-08 09:50:47 +00:00 (Migrated from github.com)

could u provide some more info?

I just edited my issue with the proper error I received. Thanks!

> could u provide some more info? I just edited my issue with the proper error I received. Thanks!
rpherman commented 2022-09-08 09:57:05 +00:00 (Migrated from github.com)

I am on Windows 11. I turned on Developer Mode and set git to use symlinks per the Known Issues page.

It runs a bit further and then spits all of this out:

PS E:\> cd mach PS E:\mach> zig build run-example-boids .\build.zig:205:9: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = "examples/libs/zmath/src/zmath.zig" }, ^ .\libs\freetype\build.zig:12:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/src/main.zig" }, ^ .\libs\ecs\build.zig:14:15: error: no member named 'use_stage1' in struct 'std.build.LibExeObjStep' main_tests.use_stage1 = true; ^ .\libs\sysaudio\build.zig:15:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/soundio/main.zig" }, ^ .\build.zig:402:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/src/main.zig" }, ^ .\build.zig:416:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\glfw\build.zig:157:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = thisDir(); ^ .\libs\gpu-dawn\sdk.zig:157:18: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = comptime thisDir(); ^ .\libs\basisu\build.zig:106:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\sysaudio\build.zig:135:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\glfw\system_sdk.zig:246:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = cwd; ^ .\libs\gpu-dawn\sdk.zig:452:18: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = comptime thisDir(); ^ PS E:\mach>

I am on Windows 11. I turned on Developer Mode and set git to use symlinks per the Known Issues page. It runs a bit further and then spits all of this out: `PS E:\> cd mach PS E:\mach> zig build run-example-boids .\build.zig:205:9: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = "examples/libs/zmath/src/zmath.zig" }, ^ .\libs\freetype\build.zig:12:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/src/main.zig" }, ^ .\libs\ecs\build.zig:14:15: error: no member named 'use_stage1' in struct 'std.build.LibExeObjStep' main_tests.use_stage1 = true; ^ .\libs\sysaudio\build.zig:15:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/soundio/main.zig" }, ^ .\build.zig:402:5: error: no member named 'source' in struct 'std.build.Pkg' .source = .{ .path = thisDir() ++ "/src/main.zig" }, ^ .\build.zig:416:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\glfw\build.zig:157:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = thisDir(); ^ .\libs\gpu-dawn\sdk.zig:157:18: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = comptime thisDir(); ^ .\libs\basisu\build.zig:106:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\sysaudio\build.zig:135:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = (comptime thisDir()); ^ .\libs\glfw\system_sdk.zig:246:10: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = cwd; ^ .\libs\gpu-dawn\sdk.zig:452:18: error: type '@typeInfo(@typeInfo(@TypeOf(std.child_process.ChildProcess.init)).Fn.return_type.?).ErrorUnion.error_set!*std.child_process.ChildProcess' does not support field access child.cwd = comptime thisDir(); ^ PS E:\mach>`
michal-z commented 2022-09-08 10:04:20 +00:00 (Migrated from github.com)

You need newer version of Zig compiler.

You need newer version of Zig compiler.
rpherman commented 2022-09-08 10:12:55 +00:00 (Migrated from github.com)

You need newer version of Zig compiler.

Do I need to build it? The Zig page had this as the latest from master.

I will try a Choco install for Windows. Thanks!

> You need newer version of Zig compiler. Do I need to build it? The Zig page had this as the latest from master. I will try a Choco install for Windows. Thanks!
michal-z commented 2022-09-08 10:17:32 +00:00 (Migrated from github.com)

I don't think you have the latest. Latest is here: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3885+a7661f115.zip

I don't think you have the latest. Latest is here: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3885+a7661f115.zip
rpherman commented 2022-09-08 10:22:25 +00:00 (Migrated from github.com)

I don't think you have the latest. Latest is here: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3885+a7661f115.zip

Ok, I'll try this one, but it looks very similar to what I had: zig version 0.10.0-dev.980+db82c1b98

> I don't think you have the latest. Latest is here: https://ziglang.org/builds/zig-windows-x86_64-0.10.0-dev.3885+a7661f115.zip Ok, I'll try this one, but it looks very similar to what I had: zig version 0.10.0-dev.980+db82c1b98
rpherman commented 2022-09-08 10:31:12 +00:00 (Migrated from github.com)

No luck. I did the first step on the "Known issues" page by turning on Developer Mode in Windows and enabling symlinks in git.
The recommended step has "cd mach/gpu". I don't have a mach/gpu directory in my cloned repository of mach. Any ideas or more steps to carry out the first recommendation? I have WSL, but I am not sure what the last step "Run the exe in zig-out/bin/ outside of WSL" means.

Windows does not have symlinks enabled, or Git is not configured to use them. This is very annoying and [has been reported to Microsoft](https://twitter.com/slimsag/status/1508114938933362688).

Two solutions:

    (recommended) Build a native Windows binary by cross-compiling from WSL -> Windows:

    cd mach/gpu
    zig build -Dtarget=x86_64-windows
    Run the exe in zig-out/bin/ outside of WSL.

    Enable symlinks in Windows:

    [Turn on Development Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development)
    [Ensure symlinks are installed in Git](https://stackoverflow.com/a/59761201) git config --global core.symlinks true
    Re-clone the repository and try again.
No luck. I did the first step on the "Known issues" page by turning on Developer Mode in Windows and enabling symlinks in git. The recommended step has "cd mach/gpu". I don't have a mach/gpu directory in my cloned repository of mach. Any ideas or more steps to carry out the first recommendation? I have WSL, but I am not sure what the last step "Run the exe in zig-out/bin/ outside of WSL" means. ``` Windows does not have symlinks enabled, or Git is not configured to use them. This is very annoying and [has been reported to Microsoft](https://twitter.com/slimsag/status/1508114938933362688). Two solutions: (recommended) Build a native Windows binary by cross-compiling from WSL -> Windows: cd mach/gpu zig build -Dtarget=x86_64-windows Run the exe in zig-out/bin/ outside of WSL. Enable symlinks in Windows: [Turn on Development Mode](https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development) [Ensure symlinks are installed in Git](https://stackoverflow.com/a/59761201) git config --global core.symlinks true Re-clone the repository and try again. ```
michal-z commented 2022-09-08 10:36:27 +00:00 (Migrated from github.com)

The latest version is 0.10.0-dev.3885+db82c1b98 (not 0.10.0-dev.980+db82c1b98). You are using very old version. Looks like you have the old version in the path.

The latest version is 0.10.0-dev.**3885**+db82c1b98 (not 0.10.0-dev.**980**+db82c1b98). You are using very old version. Looks like you have the old version in the path.
alichraghi commented 2022-09-08 10:40:38 +00:00 (Migrated from github.com)

@rpherman github issues isn't the right place to help you. please consider to join Mach's Discord server

@rpherman github issues isn't the right place to help you. please consider to join [Mach's Discord](https://discord.gg/XNG3NZgCqp) server
rpherman commented 2022-09-08 10:45:02 +00:00 (Migrated from github.com)

@alichraghi Sorry, not very experienced with Github. I will look there. Thanks.

@alichraghi Sorry, not very experienced with Github. I will look there. Thanks.
emidoots commented 2022-09-08 15:13:57 +00:00 (Migrated from github.com)

Excited to see you in the discord! :) We can definitely help quicker / more interactively there, GitHub issues are a bit slower to respond to for things like this. I'll close this for now.

Excited to see you in the discord! :) We can definitely help quicker / more interactively there, GitHub issues are a bit slower to respond to for things like this. I'll close this for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#517
No description provided.