Repository navigation
nvidia: split patchelf invocations - #576397
Merged
SomeoneSerge merged 1 commit intoOct 21, 2026
Merged
Conversation
bokicoder
approved these changes
Oct 20, 2026
Contributor
|
links: workaround for #576412 and NixOS/patchelf#674 |
Kiskae
approved these changes
Oct 20, 2026
SomeoneSerge
enabled auto-merge
October 20, 2026 16:21
Contributor
Author
|
Update: I tested this against upstream Patchelf Both tests used the same original So it looks like the upstream fix resolves this particular issue. Given the rebuild concerns around updating Patchelf, the change in this PR could still serve as a temporary workaround for Nvidia until the updated Patchelf can be brought into NixOS. |
Member
|
Squash the second commit into the first to solve the CI error |
basnijholt
added a commit
to basnijholt/dotfiles
that referenced
this pull request
Oct 20, 2026
nixpkgs 09063bd (current nixos-unstable) ships patchelf 0.19.2, which aborts in shiftFile while patching CUDA redists (cuda_sanitizer_api fails on pc) and produces segfaulting nvidia-smi/nvidia-powerd binaries, breaking pc's nvidia-undervolt service. Fixes are NixOS/nixpkgs#575979 (merged to master, not yet in nixos-unstable) and NixOS/nixpkgs#576397 (open). Update again once both reach nixos-unstable.
basnijholt
added a commit
to basnijholt/dotfiles
that referenced
this pull request
Oct 20, 2026
Re-apply the flake input update held back in the previous commit (nixpkgs 09063bd) and fix what it breaks on pc: - patchelf 0.19.2 aborts in shiftFile while patching CUDA redists and writes segfaulting nvidia-smi/nvidia-powerd binaries. Pin CUDA redists (via _cuda.extensions) and the NVIDIA driver to patchelf 0.15.2, like NixOS/nixpkgs#575979; NixOS/nixpkgs#576397 is still open. Each pin disables itself with a warning once its upstream fix is in nixpkgs. - Build CUDA kernels for sm_86 only (cudaCapabilities = [ "8.6" ]); the CUDA 12.9 -> 13.4 default bump otherwise compiles opencv and friends for ten architectures locally. - llama-cpp b11756 already contains the patch nixpkgs backports, and its new test-llama-context-model pulls in the network-only test-download-model fixture, so drop the patch and disable the test. - whisper-cpp now links llama-cpp's ggml; our llama-cpp drops GGML_BACKEND_DL so that link needs libcuda.so.1. Use the cached CPU whisper-cpp on stock llama-cpp (only ffmpeg-full uses it). - Drop HandBrake's A15 pgssubdec ffmpeg patch, which no longer applies to ffmpeg 8.1.3 (NixOS/nixpkgs#576333, fix in NixOS/nixpkgs#576407).
auto-merge was automatically disabled
October 21, 2026 03:52
Head branch was pushed to by a user without write access
TPi-Home
force-pushed
the
fix-nvidia-patchelf-invocations
branch
from
October 21, 2026 03:52
4d2ebf3 to
70ec044
Compare
Contributor
Author
|
Squashed the commits as requested! |
4 tasks done
4 of 13 tasks
cramt
added a commit
to cramt/nixconf
that referenced
this pull request
Oct 23, 2026
patchelf 0.19.2 maps .dynamic read-only when --interpreter and --set-rpath run in one call; ld.so faults writing DT_DEBUG. Backports NixOS/nixpkgs#576397 until our nixpkgs carries it.
iedame
added a commit
to iedame/nixos-configs
that referenced
this pull request
Oct 27, 2026
nixpkgs now calls patchelf twice in the NVIDIA builder, setting the rpath before the interpreter (NixOS/nixpkgs#576397), which fixes the nvidia-smi crash of NixOS/nixpkgs#576412. The override's --replace-fail pattern no longer matches, so it has to go with this update. Assisted-by: Claude Code (Claude Opus 5.5)
iedame
added a commit
to iedame/nixos-configs
that referenced
this pull request
Oct 27, 2026
* chore: flake update - 2026-10-27 * claude-code: build mcp-nixos against mcp 1.x, for now nixpkgs moved python3Packages.mcp to 2.x, and marked fastmcp-slim broken because fastmcp doesn't support it yet, so mcp-nixos no longer evaluates and the hosts with Claude Code (Kawagoe, Aurora, Akihabara) fail. Override its Python scope with mcp_1, as nixpkgs did for ha-mcp (NixOS/nixpkgs#578535), until mcp-nixos evaluates again. Assisted-by: Claude Code (Claude Opus 5.5) * aurora: drop the NVIDIA patchelf override nixpkgs now calls patchelf twice in the NVIDIA builder, setting the rpath before the interpreter (NixOS/nixpkgs#576397), which fixes the nvidia-smi crash of NixOS/nixpkgs#576412. The override's --replace-fail pattern no longer matches, so it has to go with this update. Assisted-by: Claude Code (Claude Opus 5.5) --------- Co-authored-by: nixos-configs-bot[bot] <340610392+nixos-configs-bot[bot]@users.noreply.github.com> Co-authored-by: Rafael Ieda <[email protected]>
Ramblurr
added a commit
to Ramblurr/nixcfg
that referenced
this pull request
Oct 28, 2026
The unstable pin already splits the patchelf RPATH and interpreter edits from NixOS/nixpkgs#576397. Remove the duplicate builder patch without changing the selected driver or its settings. Validation: Quine driver build and nvidia-smi --help pass; nixfmt, git diff --check, and active LSP diagnostics are clean.
9 of 14 tasks
Sammyalhashe
added a commit
to Sammyalhashe/nixosConfig
that referenced
this pull request
Nov 5, 2026
alcxyz
added a commit
to alcxyz/nix-config
that referenced
this pull request
Nov 7, 2026
The nixpkgs pin now includes NixOS/nixpkgs#576397, so the driver builder already patches its binaries in two calls and the local re-patch is redundant.
2 of 5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In local testing, applying
--set-rpathand--interpretertogether in a singlepatchelfinvocation consistently produced annvidia-smibinary that segfaulted. Applying the same changes in separate invocations, with the RPATH set first and the interpreter second, produced a working binary. Applying either change individually also worked.These results strongly suggest an interaction between the two operations when performed in a single invocation. The underlying cause within
patchelfhas not yet been identified.