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] zig build installsystemd returns thread panic error.FileNotFound #711

Open
1 task done
mbekkomo opened this issue Nov 3, 2024 · 1 comment
Open
1 task done
Labels
bug This issue or pull request discusses a bug

Comments

@mbekkomo
Copy link

mbekkomo commented Nov 3, 2024

Pre-requisites

  • I have looked for any other duplicate issues

Ly version

1.1.0-dev.102+e125d8f

Observed behavior

When running zig build installsystemd, the command returns a thread panic with error.FileNotFound error.

Expected behavior

Successfully installed Ly.

Steps to reproduce

  1. Prepare Zig 0.13.0
  2. Run zig build
  3. Run zig build installsystemd
  4. Expect thread panic to be appear

Relevant logs

info: installed /usr/bin/ly
info: installed /etc/ly/config.ini
info: installed /etc/ly/setup.sh
info: installed /etc/ly/lang/cat.ini
info: installed /etc/ly/lang/cs.ini
info: installed /etc/ly/lang/de.ini
info: installed /etc/ly/lang/en.ini
info: installed /etc/ly/lang/es.ini
info: installed /etc/ly/lang/fr.ini
info: installed /etc/ly/lang/it.ini
info: installed /etc/ly/lang/pl.ini
info: installed /etc/ly/lang/pt.ini
info: installed /etc/ly/lang/pt_BR.ini
info: installed /etc/ly/lang/ro.ini
info: installed /etc/ly/lang/ru.ini
info: installed /etc/ly/lang/sr.ini
info: installed /etc/ly/lang/sv.ini
info: installed /etc/ly/lang/tr.ini
info: installed /etc/ly/lang/uk.ini
thread 10240 panic: attempt to unwrap error: FileNotFound
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/posix.zig:1768:23: 0x1194400 in openatZ (build)
            .NOENT => return error.FileNotFound,
                      ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/fs/Dir.zig:1564:21: 0x115eb46 in openDirFlagsZ (build)
        else => |e| return e,
                    ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/fs/Dir.zig:1528:5: 0x110e652 in openDirZ (build)
    return self.openDirFlagsZ(sub_path_c, symlink_flags);
    ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/fs/Dir.zig:1472:5: 0x11033be in openDir (build)
    return self.openDirZ(&sub_path_c, args);
    ^
/home/komo/Dev/ly/build.zig:307:65: 0x117cf0a in install_ly (build)
        var pam_dir = std.fs.cwd().openDir(pam_path, .{}) catch unreachable;
                                                                ^
/home/komo/Dev/ly/build.zig:127:27: 0x1127824 in make (build)
            try install_ly(step.owner.allocator, install_conf);
                          ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/Build/Step.zig:182:13: 0x11836aa in make (build)
    s.makeFn(s, prog_node) catch |err| switch (err) {
            ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/compiler/build_runner.zig:948:31: 0x1130def in workerMakeOneStep (build)
    const make_result = s.make(sub_prog_node);
                              ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/Thread/Pool.zig:102:39: 0x1131775 in runFn (build)
            @call(.auto, func, closure.arguments);
                                      ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/Thread/Pool.zig:191:18: 0x11ce0a4 in worker (build)
            runFn(&run_node.data);
                 ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/Thread.zig:408:13: 0x11822cd in callFn__anon_15311 (build)
            @call(.auto, f, args);
            ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/std/Thread.zig:1226:30: 0x11304b7 in entryFn (build)
                return callFn(f, self.fn_args);
                             ^
/nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/lib/zig/c.zig:239:13: 0x131ea80 in clone (c)
            asm volatile (
            ^
???:?:?: 0x7f897fe33fff in ??? (???)
Unwind information for `???:0x7f897fe33fff` was not available, trace may be incomplete

error: the following build command crashed:
/home/komo/Dev/ly/.zig-cache/o/66a4254b48c366d746d22629eb966283/build /nix/store/6q6srzrba184plhcd7vpv3k0b9qsx6vx-zig-0.13.0/bin/zig /home/komo/Dev/ly /home/komo/Dev/ly/.zig-cache /root/.cache/zig --seed 0x3fb5b65d -Z0ea7f21ccd8f1099 installsystemd
@mbekkomo mbekkomo added the bug This issue or pull request discusses a bug label Nov 3, 2024
@mbekkomo
Copy link
Author

mbekkomo commented Nov 3, 2024

I have resolved it by creating /etc/pam.d directory.

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

1 participant