NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.57k stars 13.73k forks source link

ncdu 2.4 segfaults on Darwin #329073

Open DUOLabs333 opened 2 months ago

DUOLabs333 commented 2 months ago

Describe the bug

Exactly what's in the title

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install ncdu while on macOS (the exact method doesn't matter; however, for completeness, I'm using home-manager)
  2. Run ncdu
  3. See segmentation fault

Expected behavior

That there is no segmentation fault,

Screenshots

If applicable, add screenshots to help explain your problem.

Additional context

Add any other context about the problem here.

Notify maintainers

@pSub @rodrgz

Metadata

 - system: `"aarch64-darwin"`
 - host os: `Darwin 20.4.0, macOS 11.3.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/Users/system/.nix-defexpr/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

khaneliman commented 2 months ago

What's your usage like? Full drive and running for a long time? Specific files? I have it installed on darwin and dont get a segfault when scanning my home folder.

DUOLabs333 commented 2 months ago

Any invocation makes it fail. There's nothing particularly unique about my setup (in fact, outside of Nix itself, it's a pretty standard install). On Darwin, is ncdu compiled on the user's machine, or is it downloaded from a mirror?

DUOLabs333 commented 2 months ago

I will note that I've been using unstable.ncdu --- switching to pkgs.ncdu fails to build due to:

Running phase: unpackPhase
unpacking source archive /nix/store/311mpzwmfd5h3n44bk0g758fzpw3swpz-ncdu-2.4.tar.gz
source root is ncdu-2.4
setting SOURCE_DATE_EPOCH to timestamp 1713689903 of file ncdu-2.4/src/main.zig
Running phase: patchPhase
Running phase: updateAutotoolsGnuConfigScriptsPhase
Running phase: configurePhase
no configure script, doing nothing
Running phase: buildPhase
zig build flags: -Dcpu=baseline --release=safe -Dpie=true
/nix/store/s6smzmbvzv7ra9s2y5d1jj7ip924gala-zig-hook/nix-support/setup-hook: line 10: 84690 Abort trap: 6           zig build "${flagsArray[@]}"
error: builder for '/nix/store/9sx9j1laccpiagqi3bn0fvynkak9rs4l-ncdu-2.4.drv' failed with exit code 134;
       last 10 log lines:
       > unpacking source archive /nix/store/311mpzwmfd5h3n44bk0g758fzpw3swpz-ncdu-2.4.tar.gz
       > source root is ncdu-2.4
       > setting SOURCE_DATE_EPOCH to timestamp 1713689903 of file ncdu-2.4/src/main.zig
       > Running phase: patchPhase
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > no configure script, doing nothing
       > Running phase: buildPhase
       > zig build flags: -Dcpu=baseline --release=safe -Dpie=true
       > /nix/store/s6smzmbvzv7ra9s2y5d1jj7ip924gala-zig-hook/nix-support/setup-hook: line 10: 84690 Abort trap: 6           zig build "${flagsArray[@]}"
       For full logs, run 'nix log /nix/store/9sx9j1laccpiagqi3bn0fvynkak9rs4l-ncdu-2.4.drv'.
error: 1 dependencies of derivation '/nix/store/5xd7gfg4005848zdrzam4qrnac303xcl-home-manager-applications.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vfwkldb4gccjjkv9pa9fchvxg1vy2fgr-home-manager-fonts.drv' failed to build
error: 1 dependencies of derivation '/nix/store/vil7rsq0afhlygkhw2zdcy17a0173an8-home-manager-path.drv' failed to build
error: 1 dependencies of derivation '/nix/store/1d3mghz99ckr8fdn1bk6v3dfy0rp4zs5-home-manager-generation.drv' failed to build