website: getting started guide not working with Zig 0.12.0-dev.2063+804cee3b9 #1140

Closed
opened 2024-01-10 16:45:00 +00:00 by jacobsandlund · 1 comment
jacobsandlund commented 2024-01-10 16:45:00 +00:00 (Migrated from github.com)

I'm on the candidate for supported zig version (0.12.0-dev.2063+804cee3b9) and getting this when I zig build the exact code from the getting started guide.

/Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:107:31: error: root struct of file 's
td' has no member named 'build'
            deps: ?[]const std.build.ModuleDependency = null,
                           ~~~^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
referenced by:
    init: /Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:101:18
    build: /Users/jacobsandlund/dev/dvorak/build.zig:23:34
    remaining reference traces hidden; use '-freference-trace' to see all reference traces
/Users/jacobsandlund/.cache/zig/p/1220533928f944fe59f6dd2807db71cd69108cc810101e627835c3abcc4afea4fb06/build.zig:10:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/12207ae0264760e850554e47a71124dd0156e86785510662f87a268b222c10a86206/build.zig:13:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:31:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/12209d26c597b7ce8be2b5d69389c43bbcf08144431c294782b30fdd0047e114e600/build.zig:114:34: error: root struct of file 's
td' has no member named 'build'
pub fn link(b: *Build, step: *std.build.CompileStep, options: Options) void {
                              ~~~^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
/Users/jacobsandlund/.cache/zig/p/1220bbdbedab9568a37795090e38341c241fe0e22131b8e882bc02954c4b87eecdf3/build.zig:114:34: error: root struct of file 's
td' has no member named 'build'
pub fn link(b: *Build, step: *std.build.CompileStep, options: Options) void {
                              ~~~^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
/Users/jacobsandlund/.cache/zig/p/1220e011b9bb9e642b0a0434f7a30617cc12e2c8ea05af50d889f079ec531dc04512/build.zig:32:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/1220fbe0d105e6cb85c02572cb7510057c3fa7aceee4f0d877dccbd76d484709d892/build.zig:13:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/1220187935c4c5d4cf824927df28e858dcd06cb864bb5d6be4cd349d2836abb4aec4/build.zig:13:10: error: no field named 'source_
file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/12202044ed9fd69af156b0afde619ffd1d111554c557f57ab670ca9960e76d60d0b8/build.zig:19:27: error: root struct of file 'std' has no member named 'build'
pub fn addPaths(step: *std.build.CompileStep) void {
                       ~~~^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
/Users/jacobsandlund/.cache/zig/p/122020d1ba277ff9e4b5ffff3e3bf4a3c98eeaec821e2a497d031070b05f7814b91f/build.zig:16:27: error: root struct of file 'Build' has no member named 'CompileStep'
    const lib = std.Build.CompileStep.create(b, .{
                          ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build.zig:1:1: note: struct declared here
const std = @import("std.zig");
^~~~~
/Users/jacobsandlund/.cache/zig/p/122033bae174097c3236afaf934f56c35abfa7b68238abacc4a7df9c0ff43c29ed2e/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/122039b4af1d6006d2daa48547a6224464fbc5d69d480a54a9c8f92dfe4a555d1af6/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "src/main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/122051b3c616c62d55a82207c1cb76e2264b26e8378f56b1e5376d7684bd13616589/build.zig:19:27: error: root struct of file 'std' has no member named 'build'
pub fn addPaths(step: *std.build.CompileStep) void {
                       ~~~^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here
pub const ArrayHashMap = array_hash_map.ArrayHashMap;
^~~
/Users/jacobsandlund/.cache/zig/p/12207562ecd84ebeefaabb9e33bd874d03e9d47cb44d95bc61384838df0fd3a26834/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions'
        .source_file = .{ .path = "main.zig" },
         ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/122080249197eef2dc5290874ead429285741bcd509b57badc22b716f2630d78149e/build.zig:4:49: error: no field named 'source_file' in struct 'Build.Module.CreateOptions'
    _ = b.addModule("vulkan-zig-generated", .{ .source_file = .{ .path = "vk.zig" } });
                                                ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~
/Users/jacobsandlund/.cache/zig/p/122098cc0b0a39d24aaffcd6d5556e8f31f5dd1a754559ffa468918f2ed6c1ad0a03/build.zig:13:13: error: no field named 'target' in struct 'Build.Step.Compile'
    if (lib.target.toTarget().cpu.arch == .x86_64) {
            ^~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Step/Compile.zig:1:1: note: struct declared here
const builtin = @import("builtin");
^~~~~
/Users/jacobsandlund/.cache/zig/p/1220d4b32bf9d74efb498a939b81b5f1c77bea213a346b88d06ae079836d2dc84aff/build.zig:25:41: error: no field named 'source_file' in struct 'Build.Module.CreateOptions'
    _ = b.addModule("mach-model3d", .{ .source_file = .{ .path = "src/main.zig" } });
                                        ^~~~~~~~~~~
/Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here
pub const CreateOptions = struct {
                          ^~~~~~

These are the deps in my build.zig.zon:

        .mach_core = .{
            .url = "https://pkg.machengine.org/mach-core/90c927e20d045035152d9b0b421ea45db7e5569c.tar.gz",
            .hash = "12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662",
        },

Edit: Ah, I see that version is just a candidate. I got confused since there is no other nominated zig version on https://machengine.org/about/nominated-zig/

I'm on the candidate for supported zig version (0.12.0-dev.2063+804cee3b9) and getting this when I `zig build` the exact code from the getting started guide. ``` /Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:107:31: error: root struct of file 's td' has no member named 'build' deps: ?[]const std.build.ModuleDependency = null, ~~~^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here pub const ArrayHashMap = array_hash_map.ArrayHashMap; ^~~ referenced by: init: /Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:101:18 build: /Users/jacobsandlund/dev/dvorak/build.zig:23:34 remaining reference traces hidden; use '-freference-trace' to see all reference traces /Users/jacobsandlund/.cache/zig/p/1220533928f944fe59f6dd2807db71cd69108cc810101e627835c3abcc4afea4fb06/build.zig:10:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/12207ae0264760e850554e47a71124dd0156e86785510662f87a268b222c10a86206/build.zig:13:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662/build.zig:31:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/12209d26c597b7ce8be2b5d69389c43bbcf08144431c294782b30fdd0047e114e600/build.zig:114:34: error: root struct of file 's td' has no member named 'build' pub fn link(b: *Build, step: *std.build.CompileStep, options: Options) void { ~~~^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here pub const ArrayHashMap = array_hash_map.ArrayHashMap; ^~~ /Users/jacobsandlund/.cache/zig/p/1220bbdbedab9568a37795090e38341c241fe0e22131b8e882bc02954c4b87eecdf3/build.zig:114:34: error: root struct of file 's td' has no member named 'build' pub fn link(b: *Build, step: *std.build.CompileStep, options: Options) void { ~~~^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here pub const ArrayHashMap = array_hash_map.ArrayHashMap; ^~~ /Users/jacobsandlund/.cache/zig/p/1220e011b9bb9e642b0a0434f7a30617cc12e2c8ea05af50d889f079ec531dc04512/build.zig:32:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/1220fbe0d105e6cb85c02572cb7510057c3fa7aceee4f0d877dccbd76d484709d892/build.zig:13:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/1220187935c4c5d4cf824927df28e858dcd06cb864bb5d6be4cd349d2836abb4aec4/build.zig:13:10: error: no field named 'source_ file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/12202044ed9fd69af156b0afde619ffd1d111554c557f57ab670ca9960e76d60d0b8/build.zig:19:27: error: root struct of file 'std' has no member named 'build' pub fn addPaths(step: *std.build.CompileStep) void { ~~~^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here pub const ArrayHashMap = array_hash_map.ArrayHashMap; ^~~ /Users/jacobsandlund/.cache/zig/p/122020d1ba277ff9e4b5ffff3e3bf4a3c98eeaec821e2a497d031070b05f7814b91f/build.zig:16:27: error: root struct of file 'Build' has no member named 'CompileStep' const lib = std.Build.CompileStep.create(b, .{ ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build.zig:1:1: note: struct declared here const std = @import("std.zig"); ^~~~~ /Users/jacobsandlund/.cache/zig/p/122033bae174097c3236afaf934f56c35abfa7b68238abacc4a7df9c0ff43c29ed2e/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/122039b4af1d6006d2daa48547a6224464fbc5d69d480a54a9c8f92dfe4a555d1af6/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "src/main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/122051b3c616c62d55a82207c1cb76e2264b26e8378f56b1e5376d7684bd13616589/build.zig:19:27: error: root struct of file 'std' has no member named 'build' pub fn addPaths(step: *std.build.CompileStep) void { ~~~^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/std.zig:1:1: note: struct declared here pub const ArrayHashMap = array_hash_map.ArrayHashMap; ^~~ /Users/jacobsandlund/.cache/zig/p/12207562ecd84ebeefaabb9e33bd874d03e9d47cb44d95bc61384838df0fd3a26834/build.zig:8:10: error: no field named 'source_file' in struct 'Build.Module.CreateOptions' .source_file = .{ .path = "main.zig" }, ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/122080249197eef2dc5290874ead429285741bcd509b57badc22b716f2630d78149e/build.zig:4:49: error: no field named 'source_file' in struct 'Build.Module.CreateOptions' _ = b.addModule("vulkan-zig-generated", .{ .source_file = .{ .path = "vk.zig" } }); ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ /Users/jacobsandlund/.cache/zig/p/122098cc0b0a39d24aaffcd6d5556e8f31f5dd1a754559ffa468918f2ed6c1ad0a03/build.zig:13:13: error: no field named 'target' in struct 'Build.Step.Compile' if (lib.target.toTarget().cpu.arch == .x86_64) { ^~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Step/Compile.zig:1:1: note: struct declared here const builtin = @import("builtin"); ^~~~~ /Users/jacobsandlund/.cache/zig/p/1220d4b32bf9d74efb498a939b81b5f1c77bea213a346b88d06ae079836d2dc84aff/build.zig:25:41: error: no field named 'source_file' in struct 'Build.Module.CreateOptions' _ = b.addModule("mach-model3d", .{ .source_file = .{ .path = "src/main.zig" } }); ^~~~~~~~~~~ /Users/jacobsandlund/dev/zig/build/stage3/lib/zig/std/Build/Module.zig:140:27: note: struct declared here pub const CreateOptions = struct { ^~~~~~ ``` These are the deps in my `build.zig.zon`: ``` .mach_core = .{ .url = "https://pkg.machengine.org/mach-core/90c927e20d045035152d9b0b421ea45db7e5569c.tar.gz", .hash = "12209c255c69822b57cd8906754bbee815e69678741d48a64e945168e611874da662", }, ``` Edit: Ah, I see that version is just a candidate. I got confused since there is no other nominated zig version on https://machengine.org/about/nominated-zig/
emidoots commented 2024-01-11 05:08:32 +00:00 (Migrated from github.com)

For now use https://machengine.org/about/zig-version/

We're still working on updating to that new version. You can follow along in #1135 if you like :)

Help that helps!

For now use https://machengine.org/about/zig-version/ We're still working on updating to that new version. You can follow along in #1135 if you like :) Help that helps!
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#1140
No description provided.