NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.65k stars 13.8k forks source link

Build failure: bitwarden-cli #339576

Open duckpuppy opened 1 month ago

duckpuppy commented 1 month ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. build bitwarden-cli on aarch64-darwin on master

Build log

Relevant log lines:

330 npm error /nix/store/ap4xjkwp0lshyywxqw88phnnc0j1fnzw-bash-5.2p32/bin/sh: line 1: perl: command not found
331 npm error gyp: Call to 'cc -v 2>&1 | perl -ne 'print $1 if /clang version ([0-9]+(\.[0-9]+){2,})/'' returned exit sta>
332 npm error gyp ERR! configure error
333 npm error gyp ERR! stack Error: `gyp` failed with exit code: 1
334 npm error gyp ERR! stack     at ChildProcess.onCpExit (/private/tmp/nix-build-bitwarden-cli-2024.8.1.drv-3/source/nod>
335 npm error gyp ERR! stack     at ChildProcess.emit (node:events:519:28)
336 npm error gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:294:12)
337 npm error gyp ERR! System Darwin 23.6.0
338 npm error gyp ERR! command "/nix/store/iikbj8fwd3msxvh747v22b0gpf1rckww-nodejs-20.16.0/bin/node" "/private/tmp/nix-bu>
339 npm error gyp ERR! cwd /private/tmp/nix-build-bitwarden-cli-2024.8.1.drv-3/source/node_modules/bufferutil
340 npm error gyp ERR! node -v v20.16.0
341 npm error gyp ERR! node-gyp -v v9.4.1
342 npm error gyp ERR! not ok

It seems that perl is not available to the build process

Notify maintainers

@dotlambda

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
this path will be fetched (0.00 MiB download, 0.00 MiB unpacked):
  /nix/store/3bj2c590msmkn6qpc3q3z5jayki83afn-nix-info
copying path '/nix/store/3bj2c590msmkn6qpc3q3z5jayki83afn-nix-info' from 'https://cache.nixos.org'...
 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.6.0, macOS 14.6.1`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.5`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

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

afh commented 2 weeks ago

While bitwarden-cli 2024.9.0 has been released recently, updating the nixpkgs to that version unfortunately does not fix the build issue.

Looking at the error message it seems that perl is missing form the dependencies and alas adding perl to the nativeBuildInputs fixes the build error described above.

Regrettably another build issue surfaces when building on aarch64-darwin

> npm error fatal error: /nix/store/6hkvz0l4pwbmas1ccsykcyncrjk2xn2h-cctools-1010.6/bin/lipo: /private/tmp/nix-build-bitwarden-cli-2024.9.0.drv-0/validation-043e26/validation-x86_64.out and /private/tmp/nix-build-bitwarden-cli-2024.9.0.drv-0/validation-e29541/validation-arm64.out have the same architectures (arm64) and can't be in the same fat output file
> npm error clang-16: error: lipo command failed with exit code 1 (use -v to see invocation)
yakimant commented 6 days ago

2024.7.2 is the last one ok