NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.9k stars 13.95k forks source link

cudaPackages.cuda_sanitizer_api: outputs split improperly #349426

Open sliedes opened 3 days ago

sliedes commented 3 days ago

Updated description

SomeoneSerge:

CC @NixOS/cuda-maintainers

Original description

in cudaPackages.cudatoolkit from cuda-merged-12.4, bin/compute-sanitizer is a short shell script wrapper trying to exec something that is not installed.

Contents of /nix/store/jgf0bwr4nwgynj0drynsw7z4f9flf84h-cuda_sanitizer_api-12.4.99-bin/bin/compute-sanitizer:

#!/bin/sh

DIR="$(dirname -- "$(readlink -f -- "$0")")"
exec "$DIR"/../compute-sanitizer/compute-sanitizer "$@"

Executing it results in this error:

$ NIXPKGS_ALLOW_UNFREE=1 nix-shell -p cudatoolkit --run compute-sanitizer
/nix/store/6y5smq0gvqvwsarlmqnn7x6w40098yg6-cuda-merged-12.4/bin/compute-sanitizer: line 4: /nix/store/jgf0bwr4nwgynj0drynsw7z4f9flf84h-cuda_sanitizer_api-12.4.99-bin/bin/../compute-sanitizer/compute-sanitizer: No such file or directory

Notify maintainers

Team cuda: @ConnorBaker @samuela @SomeoneSerge

Metadata

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.53, NixOS, 24.11 (Vicuna), 24.11.20241009.5633bcf`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.8`
 - channels(root): `"nixos"`
 - nixpkgs: `/nix/store/60sn02zhawl3kwn0r515zff3h6hg6ydz-source`

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

SomeoneSerge commented 2 days ago

You can start fixing this by overriding outputs = [ "out" ] for cuda_sanitizer_api in pkgs/development/cuda-modules/cuda/overrides.nix (there are examples there) and are encouraged to open a PR. As for really splitting the outputs, we need to research how cuda_sanitizer_api is actually used as a library if at all

Thanks