NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

ncu (nsight_compute) fails in finding nsight-compute directory #288059

Open janik-git opened 9 months ago

janik-git commented 9 months ago

Describe the bug

Installing cudaPackages_11_8.nsight_compute and subsequently calling ncu leads to ERROR : nsight-compute directory is not found under /nix/store/wyb1jvq175232ncw6v173bv1n62091ri-nsight_compute-2022.3.0.22/bin/../ or /opt/nvidia. Nsight Compute is not installed on your system.

Steps To Reproduce

Steps to reproduce the behavior: NIXPKGS_ALLOW_UNFREE=1 nix-shell -p cudaPackages_11_8.nsight_compute

Expected behavior

Expected behavior can be achieved by manually navigating to /nix/store/wyb1jvq175232ncw6v173bv1n62091ri-nsight_compute-2022.3.0.22/nsight-compute/2022.3.0/ncu

Additional context

Using a different version (cudaPackages_11.nsight_compute) leads to the same behavior. While _12 fails building because auto-patchelf could not satisfy dependency, https://github.com/NixOS/nixpkgs/issues/276597#issue-2055303305

Notify maintainers

@NixOS/cuda-maintainers

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.71, NixOS, 23.11 (Tapir), 23.11.20240110.3dc440f`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

jess-sol commented 2 months ago

Same issues:

$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p '(import <nixpkgs-unstable> {}).cudaPackages.nsight_compute'
...
searching for dependencies of /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/extras/python/_ncu_report.so
    libgcc_s.so.1 -> found: /nix/store/yfd49ay99aa1a0jg80jsvnxbyl61fsh6-gcc-13.2.0-libgcc/lib
setting RPATH to: /nix/store/yfd49ay99aa1a0jg80jsvnxbyl61fsh6-gcc-13.2.0-libgcc/lib:$ORIGIN
auto-patchelf: 19 dependencies could not be satisfied
error: auto-patchelf could not satisfy dependency libgstaudio-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/li
bQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstvideo-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/libQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstpbutils-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/
libQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstallocators-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x
64/libQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstapp-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/libQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstbase-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/lib
Qt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libgstreamer-1.0.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/l
ibQt6Multimedia.so.6
error: auto-patchelf could not satisfy dependency libQt6WlShellIntegration.so.6 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/Plugins/wayland-shell-integration/libwl-shell-plugin.so
error: auto-patchelf could not satisfy dependency libtiff.so.5 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/linux-desktop-glibc_2_11_3-x64/Plugins/im
ageformats/libqtiff.so
warn: auto-patchelf ignoring missing libcuda.so.1 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/nvgpucs
error: auto-patchelf could not satisfy dependency libibumad.so.3 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/clx
error: auto-patchelf could not satisfy dependency libucp.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/clx
error: auto-patchelf could not satisfy dependency libuct.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/clx
error: auto-patchelf could not satisfy dependency libucs.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/clx
error: auto-patchelf could not satisfy dependency libucm.so.0 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/clx
error: auto-patchelf could not satisfy dependency libcom_err.so.2 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/libssl.so.10
error: auto-patchelf could not satisfy dependency libibmad.so.5 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/lib/providers/
libevents_switch_provider.so
error: auto-patchelf could not satisfy dependency libibumad.so.3 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/lib/providers
/libevents_switch_provider.so
error: auto-patchelf could not satisfy dependency libibverbs.so.1 wanted by /nix/store/w2ryjnsf2a6idf5xbdj67zp54p2g06fi-nsight_compute-2023.2.2.3/nsight-compute/2023.2.2/host/target-linux-x64/CollectX/lib/providers/libevents_switch_provider.so
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p '(import <nixpkgs-unstable> {}).cudaPackages_11.nsight_compute'
(shell) $ ncu-ui
ERROR : nsight-compute directory is not found under /nix/store/bamknrlr9vrz5hh04cmq6v8f5bi9fjq2-nsight_compute-2022.3.0.22-bin/bin/../ or /opt/nvidia. Nsight Compute is not installed on your system.

nsight-systems seems broken as well:

$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p '(import <nixpkgs-unstable> {}).cudaPackages_11.nsight_systems'
error: auto-patchelf could not satisfy dependency libboost_regex.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_system.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_thread.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_timer.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_program_options.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_serialization.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libProtobufComm.so
error: auto-patchelf could not satisfy dependency libboost_date_time.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libTimelineUIUtils.so
error: auto-patchelf could not satisfy dependency libboost_system.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libTimelineUIUtils.so
error: auto-patchelf could not satisfy dependency libboost_thread.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libTimelineUIUtils.so
error: auto-patchelf could not satisfy dependency libboost_timer.so.1.78.0 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/host-linux-x64/libTimelineUIUtils.so
error: auto-patchelf could not satisfy dependency libcom_err.so.2 wanted by /nix/store/awjl9q0p6f8vn7qawjrmxpis2d47qvb9-nsight_systems-2022.4.2.1/nsight-systems/2022.4.2/target-linux-x64/CollectX/libssl.so.10
auto-patchelf failed to find all the required dependencies.
Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.

I was able to get it working by applying the PR nixos/nixpkgs#291471, and adding the following packages to nsight_compute's buildInputs:

rdma-core
ucx
e2fsprogs
kdePackages.qtwayland
MaartenBehn commented 5 days ago

Same issue got nsys-ui running with:

nix shell --impure --expr 'with builtins; with import (getFlake github:mcwitt/nixpkgs/fix/nsight_systems) { config = { allowUnfree = true; cudaSupport = true; }; }; cudaPackages.nsight_systems' --command 'nsys-ui'

but ncu-ui fails with the same error

ERROR : nsight-compute directory is not found under /nix/store/bamknrlr9vrz5hh04cmq6v8f5bi9fjq2-nsight_compute-2022.3.0.22-bin/bin/../ or /opt/nvidia. Nsight Compute is not installed on your system.

Is there anything we can do about this?