Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] not building with zig 0.14.0-dev #718

Open
1 task done
JonasFocke01 opened this issue Dec 7, 2024 · 4 comments
Open
1 task done

[Bug] not building with zig 0.14.0-dev #718

JonasFocke01 opened this issue Dec 7, 2024 · 4 comments
Labels
bug This issue or pull request discusses a bug

Comments

@JonasFocke01
Copy link

JonasFocke01 commented Dec 7, 2024

Pre-requisites

  • I have looked for any other duplicate issues

Ly version

current main branch

Observed behavior

I have never worked with zig before, so this might be just me being dumb. So any help is appreciated!

I cloned the repo, downloaded zig***.tar.gz (version 0.14.0), added zig to my path and ran $ zig build in the ly repo root directory. This build error came up after a few seconds:

~/Downloads/ly » zig build
/home/jonas/Downloads/ly/build.zig:93:48: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void'
    installexe_step.makeFn = ExeInstaller(true).make;
                             ~~~~~~~~~~~~~~~~~~^~~~~
/home/jonas/Downloads/ly/build.zig:93:48: note: pointer type child 'fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/jonas/Downloads/ly/build.zig:93:48: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~
referenced by:
    runBuild__anon_4410: /home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/std/Build.zig:2296:44
    main: /home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/compiler/build_runner.zig:339:29
    5 reference(s) hidden; use '-freference-trace=7' to see all references
/home/jonas/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) anyerror!void'
            }
            ^
/home/jonas/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: pointer type child 'fn (*Build.Step, Progress.Node) anyerror!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/jonas/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/home/jonas/Downloads/zig-linux-x86_64-0.14.0-dev.2384+cbc05e0b1/lib/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {

Expected behavior

The build works as instructed from the readme

Steps to reproduce

Basically compile with zig 0.14.0

@JonasFocke01 JonasFocke01 added the bug This issue or pull request discusses a bug label Dec 7, 2024
@eirenicon
Copy link

Another zig 'novice' says the zig build instructions don't do as they ought...
Here's my error on Debian Sid:

mark@debian:~/ly$ zig build
./build.zig:27:21: error: container 'std' has no member called 'Build'
pub fn build(b: *std.Build) !void {
                    ^
/usr/lib/zig/0.6.0/lib/zig/std/special/build_runner.zig:131:35: note: referenced here
    switch (@typeInfo(@TypeOf(root.build).ReturnType)) {
                                  ^
./build.zig:11:24: error: container 'std' has no member called 'SemanticVersion'
    const min_zig = std.SemanticVersion.parse(min_zig_string) catch unreachable;

@wi2david
Copy link

Same problem here:

/home/wi2david/temp/ly/build.zig:93:48: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void'
    installexe_step.makeFn = ExeInstaller(true).make;
                             ~~~~~~~~~~~~~~~~~~^~~~~
/home/wi2david/temp/ly/build.zig:93:48: note: pointer type child 'fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/wi2david/temp/ly/build.zig:93:48: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~
referenced by:
    runBuild__anon_4253: /usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/std/Build.zig:2296:44
    main: /usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/compiler/build_runner.zig:339:29
    5 reference(s) hidden; use '-freference-trace=7' to see all references
/root/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) anyerror!void'
            }
            ^
/root/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: pointer type child 'fn (*Build.Step, Progress.Node) anyerror!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/root/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/usr/local/src/zig-linux-x86_64-0.14.0-dev.2435+7575f2121/lib/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~

@Drillionaire
Copy link

and here as well. compiled zig from source just before attempting to compile ly (on debian trixie/sid x86_64, kernel 6.12.13_amd64, zig version 0.14.0-dev.3267+59dc15fa0)

/home/farrier/builds/ly/build.zig:93:48:` error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void'
    installexe_step.makeFn = ExeInstaller(true).make;
                             ~~~~~~~~~~~~~~~~~~^~~~~
/home/farrier/builds/ly/build.zig:93:48: note: pointer type child 'fn (*Build.Step, Progress.Node) @typeInfo(@typeInfo(@TypeOf(build.ExeInstaller(true).make)).@"fn".return_type.?).error_union.error_set!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/farrier/builds/ly/build.zig:93:48: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/home/farrier/builds/zig/build/stage3/lib/zig/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/home/farrier/builds/zig/build/stage3/lib/zig/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~
referenced by:
    runBuild__anon_4096: /home/farrier/builds/zig/build/stage3/lib/zig/std/Build.zig:2428:44
    main: /home/farrier/builds/zig/build/stage3/lib/zig/compiler/build_runner.zig:339:29
    5 reference(s) hidden; use '-freference-trace=7' to see all references
/home/farrier/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) anyerror!void'
            }
            ^
/home/farrier/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: pointer type child 'fn (*Build.Step, Progress.Node) anyerror!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/farrier/.cache/zig/p/122062d301a203d003547b414237229b09a7980095061697349f8bef41be9c30266b/build.zig:83:13: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/home/farrier/builds/zig/build/stage3/lib/zig/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/home/farrier/builds/zig/build/stage3/lib/zig/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~

@mss0406
Copy link

mss0406 commented Mar 2, 2025

Similar Problem here altho it doesnt even seem to get that far:

msspwn@mssLaptop ~/ly (master) [1]> neofetch
       _,met$$$$$gg.          msspwn@mssLaptop 
    ,g$$$$$$$$$$$$$$$P.       ---------------- 
  ,g$$P"     """Y$$.".        OS: Debian GNU/Linux 12 (bookworm) x86_64 
 ,$$P'              `$$$.     Host: NS50_70MU Applicable 
',$$P       ,ggs.     `$$b:   Kernel: 6.1.0-31-amd64 
`d$$'     ,$P"'   .    $$$    Uptime: 48 mins 
 $$P      d$'     ,    $$P    Packages: 2823 (dpkg), 4 (brew), 89 (flatpak) 
 $$:      $$.   -    ,d$$'    Shell: fish 3.6.0 
 $$;      Y$b._   _,d$P'      Resolution: 1920x1080 
 Y$$.    `.`"Y$$$$P"'         DE: Plasma 5.27.5 
 `$$b      "-.__              WM: kwin 
  `Y$$                        Theme: [Plasma], MyBreeze-Dark-GTK [GTK2/3] 
   `Y$$.                      Icons: breeze-dark [Plasma], breeze-dark [GTK2/3] 
     `$$b.                    Terminal: konsole 
       `Y$$b.                 Terminal Font: Terminess Nerd Font 14 
          `"Y$b._             CPU: 11th Gen Intel i7-1165G7 (8) @ 4.700GHz 
              `"""            GPU: Intel TigerLake-LP GT2 [Iris Xe Graphics] 
                              Memory: 9515MiB / 31874MiB 

                                                      
                                                      


msspwn@mssLaptop ~/ly (master)> zig build
/home/msspwn/ly/build.zig.zon:2:13: error: expected enum literal
    .name = "ly",

See Codeblock for neofetch and zig build output, also happens with bash and sh

Edit: changing to ZIG V0.12.1 works

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue or pull request discusses a bug
Projects
None yet
Development

No branches or pull requests

5 participants