Build fails on OpenSuse Tumbleweed with latest available zig (version 0.10.1)

After installing the dependencies with sudo zypper in zig{,-libs} SDL2{,-devel,_ttf-devel,_image-devel} libSDL2_gfx-{1_0-0,devel} and setting my path with export PATH="$PATH:$(realpath $(pwd))/scripts", running zig build run resulted in the following error:

/home/thalia/.local/src/mepo/build.zig:16:34: error: expected struct or union; found '[]const u8'
        .source_dir = .{ .path = "scripts" },
referenced by:
    runBuild: /usr/lib/zig/build_runner.zig:232:22
    usage__anon_5090: /usr/lib/zig/build_runner.zig:242:13
    remaining reference traces hidden; use '-freference-trace' to see all reference traces

This was the case with both the 1.2.0 tarball and a clone of the master branch.

Assigned to
7 months ago
7 days ago

~mil 7 months ago

Hey there - the latest 1.2.0 release and master as well is pinned against zig 0.11.x and unfortunately won't build with zig 0.10.1. You should upgrade your zig install locally to 0.11.x and try rebuilding.

~mcepl 2 months ago

Still fails for me https://build.opensuse.org/package/show/home:mcepl/mepo (the build log is at https://mcepl.fedorapeople.org/tmp/_log_mepo.txt) with

+ zig build -Drelease-safe=true
[   19s] /home/abuild/rpmbuild/BUILD/mepo-1.0/build.zig:16:23: error: expected type 'Build.LazyPath', found '*const [7:0]u8'
[   19s] /usr/lib/zig/std/Build.zig:1672:22: note: union declared here

~cnx 2 months ago

/home/abuild/rpmbuild/BUILD/mepo-1.0/build.zig:16:23: error: [...]

To build with Zig 0.11, Mepo version should be 1.2 innit?

~mcepl 2 months ago

Yes, you are right, 1.2.0 builds just fine, https://build.opensuse.org/package/show/home:mcepl/mepo.

This ticket can be closed.

~mil REPORTED CLOSED 7 days ago

Register here or Log in to comment, or comment via email.