Repository navigation
fix(cuda): link the toolkit's sibling trees so nvcc can find its backend compiler - #11
Conversation
…end compiler nvcc resolves its OWN helpers relative to its own executable path. Through the /usr/bin/nvcc symlink that means /usr/<sibling>/, so the toolkit's sibling TREES must exist at /usr too, not only its files. Without /usr/nvvm, nvcc cannot invoke its backend compiler: the compile dies with "sh: line 1: /usr/sbin/../nvvm/bin/cicc: No such file or directory" (--error 0x7f) during CMake's CMAKE_DETERMINE_COMPILER_ID, i.e. no CUDA image could build at all -- first observed gating a consumer's Arch build after #10. Both Arch arms now link /opt/cuda/nvvm into /usr/nvvm (guarded so an existing /usr path is never clobbered), and the check added in #10 is strengthened from nvcc -E (preprocess) to nvcc -c (a real compile). That second half is the important one: preprocessing never invokes cicc, so the previous check stayed GREEN through this failure -- a probe that could not fail on the thing that was broken. Proven on real Arch hardware: fresh build clean, and the strengthened check passes with the fix (it compiles a translation unit end to end). Fixes the consumer gate that failed at 2026.289.1457. Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)
Review — PASSHead SHA: Security screen: PASS — no secrets/egress, no supply-chain change, no weakened guardrail (the change strengthens a check from Checklist: All applicable rules PASS or NA. Diff (1 file, +22/-2) matches the summary and the pasted Verdict: PASS ollama-cloud/deepseek-v4.1-flash — action-review. |
|
Agent: STATUS — opened, validator PASS read in full, native auto-merge armed ( Head: What this fixes, in one line. And the half that matters more. The check added in Why it reached a consumer at all. A consumer's gate ( Coordination: no other session holds an open issue or PR in this repo; nothing of anyone else's is touched. Filed from this work, separately and non-blockingly: Next, once merged and tagged: bump the consumer's single pin ( Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated — the before/after runs are real, on real Arch hardware) |
…inked (#13) The library loop globbed *.so* and so never linked the STATIC archives nvcc links by default -- libcudart_static.a, libcudadevrt.a, libculibos.a, and the _static family. Every CUDA executable link therefore failed with 'cannot find -lcudart_static: No such file or directory' while the package ships the file all along, so no CUDA image in the family could build past CMake's compiler identification. Both Arch arms now enumerate every entry of the toolkit's lib directories, matching the header loop's fix in #10 and the sibling-tree fix in #11. Third and last pattern-matched loop closed. The check is strengthened again, from a compile (-c) to a real COMPILE AND LINK, because -c never links and so could not fail on this: it now produces an executable, which is exactly the stage that was broken. Proven on real Arch hardware: the build is clean and the check passes; it fails by construction on the unpatched candy (the gate's own log shows the link failing there). Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated) Co-authored-by: charly <charly@opencharly.invalid>
Agent:
dsh-strataSummary
Follows
#10(merged, taggedv2026.289.1454), which fixed#9. That fix was correct and incomplete: it repaired the header files and subtrees, and this PR repairs the toolkit's sibling trees, without which no CUDA image can compile at all.nvccresolves its own helpers relative to its own executable path. Through the/usr/bin/nvccsymlink, that means/usr/<sibling>/— so it looks for its backend compiler at/usr/nvvm/bin/cicc, which the stitch never created:First observed gating a consumer's Arch build (
opencharly/layer-strata,charly check run check-strata-pod, run2026.289.1457) — i.e. the defect blocks the whole GPU family, not one consumer.Two halves, and the second one is the important one
/opt/cuda/nvvminto/usr/nvvm, guarded so an existing/usrpath is never clobbered:#10rannvcc -E -x cu, which only preprocesses. Preprocessing never invokescicc, so that check stayed green straight through this failure. It is nownvcc -c -x cu -o …, a real compile that exercises the whole path:How tested
On real Arch hardware (Omarchy, 1.5 TB free, 16 CPUs, 123 GB RAM, podman 6.1.3, CUDA 13.4.92), building a box that composes this candy, then checking it:
Before this change, the same run failed with the
ciccerror pasted above — and, critically, the old check passed on that same broken image, which is why the failure reached a consumer instead of stopping here.Local, at this head (stat re-run after the change, with every path named):
Not run: no Fedora build. The Fedora layout is untouched — its RPMs land in
/usrdirectly, so the sibling-tree loop is Arch-scoped by the same[ -f /etc/arch-release ]guard the surrounding step already carries, and the compile check exits 0 there by design.Disclosed red, not this change's: the check run also reports
FAIL … [nvidia-container-toolkit-gpgcheck-enforced], a Fedora-scoped probe red onlayer-nvidia's Arch arm, already filed aslayer-nvidia#11.Rulebook compliance
/charly-distros:cuda(owning skill) and/charly-image:layerloaded before editing;/charly-check:checkbefore touching the check;/charly-internals:root-cause-analyzerfor the RCA;/charly-internals:git-workflowbefore everygit/ghaction. This repo'sAGENTS.mdread as the more specific rulebook.#10check chose the cheapest invocation that reproduced the symptom I had already seen (-E) instead of the weakest invocation that exercises the whole path (-c), so it was blind by construction to a missing backend compiler. The root fix went into the control, not only the code.CUDA_HOMEhack, or CMake patch.git statusstated before the commit; no force-push, no amend, no merge.Change classification
Candy configuration (
cuda) on thearch/CachyOS arms, plus the build-scope check's invocation. No Fedora behaviour change. No package, repository, signing-policy, or schema change. Disposable-only: the image involved is a throwaway probe built on a test host.Filed issues
None filed by this change — the finding is blocking (a consumer's R10 gate is red because of it, and the family is unbuildable without it), so R1 requires it fixed here rather than filed. Predecessor:
#10(merged) /#9(closed). Related open items elsewhere:layer-nvidia#11(disclosed red above) andopencharly/charly#966.Assisted-by: DeepSeek Harness deepseek-v4.1-flash (fully tested and validated)