poe-dat-viewer icon indicating copy to clipboard operation
poe-dat-viewer copied to clipboard

Zig master can't build dat-analysis

Open zao opened this issue 5 months ago • 1 comments

With the current master of Zig as of 2024-09-05 (version 0.14.0-dev.1421+f87dd43c1), trying to replicate the steps in the GitHub workflows on an Ubuntu 24.04 machine fails for dat-analysis:

zao@poe-dat-vm:~/poe-dat-viewer$ env -C lib/src/dat-analysis/ zig build -Doptimize=ReleaseSmall
/home/zao/poe-dat-viewer/lib/src/dat-analysis/build.zig:16:33: error: no field named 'path' in union 'Build.LazyPath'
        .root_source_file = .{ .path = "./analysis.zig" },
                                ^~~~
/home/zao/tools/zig-linux-x86_64-0.14.0-dev.1421+f87dd43c1/lib/std/Build.zig:2209:22: note: union declared here
pub const LazyPath = union(enum) {
                     ^~~~~

Patching this to read b.path("./analysis.zig"), gets me past this part to another problem:

zao@poe-dat-vm:~/poe-dat-viewer$ env -C lib/src/dat-analysis/ zig build -Doptimize=ReleaseSmall
/home/zao/poe-dat-viewer/lib/src/dat-analysis/build.zig:20:12: error: no field named 'export_symbol_names' in struct 'Build.Step.Compile'    module.export_symbol_names = &[_][]const u8{
           ^~~~~~~~~~~~~~~~~~~
/home/zao/tools/zig-linux-x86_64-0.14.0-dev.1421+f87dd43c1/lib/std/Build/Step/Compile.zig:1:1: note: struct declared here
const builtin = @import("builtin");
^~~~~

This problem I have not found a solution to yet. I guess I could work around by using an older Zig version, but it'd be nice if things work out of the box, particularly as this might also affect CI.

zao avatar Sep 05 '24 03:09 zao