NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.66k stars 13.11k forks source link

Build failure: sunshine (with CUDA enabled) #240795

Open robwhitaker opened 1 year ago

robwhitaker commented 1 year ago

Steps To Reproduce

Steps to reproduce the behavior:

  1. Build sunshine with CUDA enabled (i.e. sunshine.override { cudaSupport = true; })

Build log

The final error is:

[100%] Linking CXX executable sunshine
/nix/store/zsvpmlddl2i5mpzm031a99xfpn410m5b-binutils-2.40/bin/ld: /nix/store/18qyy12yw5jb046jm0qga4j59vj7r310-zeromq-4.3.4/lib/libzmq.so.5: undefined reference to `std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.30'
collect2: error: ld returned 1 exit status
make[2]: *** [CMakeFiles/sunshine.dir/build.make:686: sunshine-0.20.0] Error 1
make[1]: *** [CMakeFiles/Makefile2:137: CMakeFiles/sunshine.dir/all] Error 2
make: *** [Makefile:156: all] Error 2

Full build log: https://gist.github.com/robwhitaker/829d4cae374e8c9e8bcc31289d581052

Additional context

N/A

Notify maintainers

@devusb

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"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.1.34, NixOS, 23.11 (Tapir), 23.11.20230628.60a783e`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.15.1`
 - channels(root): `""`
 - channels(rhit): `""`
 - nixpkgs: `/nix/store/22qgs3skscd9bmrxv9xv4q5d4wwm5ppx-source`
devusb commented 1 year ago

Think this PR is intended to resolve the build issue -- unfortunately I no longer have an NVIDIA card so unable to verify.

robwhitaker commented 1 year ago

Thanks, I applied the change in that PR myself:

sunshine.override {
  cudaSupport = true;
  stdenv = cudaPackages.backendStdenv;
}

and it works!

peperunas commented 4 months ago

Should have been fixed by #293938