-
-
Notifications
You must be signed in to change notification settings - Fork 13.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cudaPackages.autoAddOpenGLRunpathHook: don't skip shared libraries #250639
Conversation
Testing now, will merge if it fixes it. Thank you for the help debugging and the quick fix :) |
Worked for me! Using The parent commit of the PR change which caused the breakage works as expected: [connorbaker@nixos-desktop:~/nix-cuda-test]$ nix run .#torch-cuda-is-available --override-input nixpkgs github:nixos/nixpkgs/6a830314d4da9242e61a485f050d4fe6c4d1dba6
warning: Git tree '/home/connorbaker/nix-cuda-test' is dirty
warning: not writing modified lock file of flake 'git+file:///home/connorbaker/nix-cuda-test':
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/cf795c35039b544a66a29a9ad3cd4d37bd1d6cb3' (2023-08-21)
→ 'github:nixos/nixpkgs/6a830314d4da9242e61a485f050d4fe6c4d1dba6' (2023-07-27)
True The change which broke things is broke as expected: [connorbaker@nixos-desktop:~/nix-cuda-test]$ nix run .#torch-cuda-is-available --override-input nixpkgs github:nixos/nixpkgs/03e72e46cbbde146046bbc85fca41e90bcebad57
warning: Git tree '/home/connorbaker/nix-cuda-test' is dirty
warning: not writing modified lock file of flake 'git+file:///home/connorbaker/nix-cuda-test':
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/cf795c35039b544a66a29a9ad3cd4d37bd1d6cb3' (2023-08-21)
→ 'github:nixos/nixpkgs/03e72e46cbbde146046bbc85fca41e90bcebad57' (2023-08-06)
False And with this PR, it's fixed again! [connorbaker@nixos-desktop:~/nix-cuda-test]$ nix run .#torch-cuda-is-available --override-input nixpkgs github:nixos/nixpkgs/065f90d25c2265f6daf2fe2ba4c56c579eba3d48
warning: Git tree '/home/connorbaker/nix-cuda-test' is dirty
warning: not writing modified lock file of flake 'git+file:///home/connorbaker/nix-cuda-test':
• Updated input 'nixpkgs':
'github:NixOS/nixpkgs/cf795c35039b544a66a29a9ad3cd4d37bd1d6cb3' (2023-08-21)
→ 'github:nixos/nixpkgs/065f90d25c2265f6daf2fe2ba4c56c579eba3d48' (2023-08-22)
True |
Thanks for the fix! |
My original implementation used |
@@ -2,17 +2,21 @@ | |||
# Run addOpenGLRunpath on all dynamically linked, ELF files | |||
echo "Sourcing auto-add-opengl-runpath-hook" | |||
|
|||
elfHasDynamicSection() { | |||
patchelf --print-rpath "$1" >& /dev/null |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file uses 2-space tabs. But not worth a big rebuild just to fix that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad. Though I guess occasional inconsistencies are expected when there's no automation to enforce the conventions
The more silly of me... :) |
Description of changes
Hotfix for #245789 (comment):
Things done
Things NOT done
I didn't test if @de11n's original use-case (static libraries) is still handled correctly
We should write an automated test which would verify that the hook
NIX_DEBUG=1
does produce a message about the library presumed static, and does indeed leave the file intact;We should also set up GPU-enabled tests, including one that would verify
torch.cuda.is_available()