build issue on Apple Silicon #191

Closed
opened 2022-03-27 20:10:38 +00:00 by coetry · 3 comments
coetry commented 2022-03-27 20:10:38 +00:00 (Migrated from github.com)

I cloned the repo and ran zig build run-example in the gpu directory and ran into the following error:

./libs/mach-gpu-dawn/build.zig:238:9: error: no member named 'addLibraryPath' in struct 'std.build.LibExeObjStep'
    step.addLibraryPath(target_cache_dir);
        ^
./libs/mach-gpu-dawn/build.zig:398:66: error: no member named 'mode' in struct 'std.fs.file.OpenFlags'
    var file = try std.fs.openFileAbsolute(src_absolute_path, .{ .mode = .read_only });
                                                                 ^
./libs/mach-gpu-dawn/build.zig:346:5: note: referenced here
    try gzipDecompress(allocator, gz_target_file, target_file);
    ^
./libs/mach-gpu-dawn/build.zig:298:113: note: referenced here
    downloadBinary(allocator, commit_cache_dir, release_tag, target_cache_dir, zig_triple, is_windows, version) catch |err| {
                                                                                                                ^

I have Zig 0.9.0 installed.

I cloned the repo and ran `zig build run-example` in the `gpu` directory and ran into the following error: ``` ./libs/mach-gpu-dawn/build.zig:238:9: error: no member named 'addLibraryPath' in struct 'std.build.LibExeObjStep' step.addLibraryPath(target_cache_dir); ^ ./libs/mach-gpu-dawn/build.zig:398:66: error: no member named 'mode' in struct 'std.fs.file.OpenFlags' var file = try std.fs.openFileAbsolute(src_absolute_path, .{ .mode = .read_only }); ^ ./libs/mach-gpu-dawn/build.zig:346:5: note: referenced here try gzipDecompress(allocator, gz_target_file, target_file); ^ ./libs/mach-gpu-dawn/build.zig:298:113: note: referenced here downloadBinary(allocator, commit_cache_dir, release_tag, target_cache_dir, zig_triple, is_windows, version) catch |err| { ^ ``` I have Zig **0.9.0** installed.
emidoots commented 2022-03-27 20:21:26 +00:00 (Migrated from github.com)

Hi there! Thanks for trying it out :) We currently require Zig v0.10 (unstable), you'll need to install that version for it to work.

No need to build from source, just use one of the 0.10 downloads at the top of this page: https://ziglang.org/download/

Hi there! Thanks for trying it out :) We currently require Zig v0.10 (unstable), you'll need to install that version for it to work. No need to build from source, just use one of the 0.10 downloads at the top of this page: https://ziglang.org/download/
seidtgeist commented 2022-03-28 06:58:10 +00:00 (Migrated from github.com)

@slimsag Hah, I totally glossed over the “If you have Zig v0.10” bit, too. It worked after installing with --HEAD :)

@slimsag Hah, I totally glossed over the “If you have Zig v0.10” bit, too. It worked after installing with --HEAD :)
emidoots commented 2022-03-28 07:21:22 +00:00 (Migrated from github.com)

Glad to hear it! :)

Glad to hear it! :)
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#191
No description provided.