NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.46k stars 13.66k forks source link

ripgrep doesn't build on aarch64-linux (binfmt) #212853

Open bbigras opened 1 year ago

bbigras commented 1 year ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. nix-build --argstr system "aarch64-linux" -A ripgrep

Build log

failures:

---- misc::compressed_brotli stdout ----
thread 'misc::compressed_brotli' panicked at '

==========
command failed but expected success!

command: "/build/source/target/aarch64-unknown-linux-gnu/release/deps/../rg" "--path-separator" "/" "-z" "Sherlock" "sherlock.br"

cwd: /build/ripgrep-tests/compressed_brotli/213

dir list: ["/build/ripgrep-tests/compressed_brotli/213", "/build/ripgrep-tests/compressed_brotli/213/sherlock.br"]

status: exit status: 2

stdout:

stderr: sherlock.br: <stderr is empty>

==========
', tests/util.rs:406:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- misc::compressed_lz4 stdout ----
thread 'misc::compressed_lz4' panicked at '

==========
command failed but expected success!

command: "/build/source/target/aarch64-unknown-linux-gnu/release/deps/../rg" "--path-separator" "/" "-z" "Sherlock" "sherlock.lz4"

cwd: /build/ripgrep-tests/compressed_lz4/220

dir list: ["/build/ripgrep-tests/compressed_lz4/220", "/build/ripgrep-tests/compressed_lz4/220/sherlock.lz4"]

status: exit status: 2

stdout:

stderr: sherlock.lz4: <stderr is empty>

==========
', tests/util.rs:406:13

---- misc::compressed_zstd stdout ----
thread 'misc::compressed_zstd' panicked at '

==========
command failed but expected success!

command: "/build/source/target/aarch64-unknown-linux-gnu/release/deps/../rg" "--path-separator" "/" "-z" "Sherlock" "sherlock.zst"

cwd: /build/ripgrep-tests/compressed_zstd/228

dir list: ["/build/ripgrep-tests/compressed_zstd/228", "/build/ripgrep-tests/compressed_zstd/228/sherlock.zst"]

status: exit status: 2

stdout:

stderr: sherlock.zst: <stderr is empty>

==========
', tests/util.rs:406:13

failures:
    misc::compressed_brotli
    misc::compressed_lz4
    misc::compressed_zstd

test result: FAILED. 268 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.58s

error: test failed, to rerun pass `--test integration`
error: builder for '/nix/store/kl99vn4qyzp53k2qrwhfz5vrfpcr04kz-ripgrep-13.0.0.drv' failed with exit code 101;
       last 10 log lines:
       >
       >
       > failures:
       >     misc::compressed_brotli
       >     misc::compressed_lz4
       >     misc::compressed_zstd
       >
       > test result: FAILED. 268 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out; finished in 29.58s
       >
       > error: test failed, to rerun pass `--test integration`
       For full logs, run 'nix log /nix/store/kl99vn4qyzp53k2qrwhfz5vrfpcr04kz-ripgrep-13.0.0.drv'.

Additional context

Notify maintainers

@tailhook @globin @ma27 @zowoq

Metadata

zowoq commented 1 year ago

/nix/store/kl99vn4qyzp53k2qrwhfz5vrfpcr04kz-ripgrep-13.0.0.drv

I tried this on two different aarch64-linux machines, builds fine on both.

bbigras commented 1 year ago

I have the problem on my machine and on GitHub actions. Both using QEMU.

https://github.com/bbigras/nix-config/actions/runs/4018126001/jobs/6903357457#step:6:4574

wegank commented 1 year ago

Also fine on my aarch64-linux machine. I guess it's a ~cross-compilation~ binfmt issue?

adamcstephens commented 1 year ago

I can confirm binfmt fails and native succeeds.