fix(build): symlink /usr/local/bin/cc to clang — cargo has no compiler on PATH #286
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/cc-symlink-for-cargo"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to #284 (merged) — the static-libs backfill fixed the linker's missing crt/libc objects, but cargo still couldn't find a compiler at all: FreeBSD base hasn't shipped
cc/GCC since 14.0, and thellvm19port (pulled in byrust) only installs an unversionedclanginside its own private bin dir, never asccanywhere on$PATH.Confirmed on the real 0.13.0 build+chroot test from the #284 validation thread:
cargo buildneeded an explicit-C linker=clangpointing at/usr/local/llvm19/bin/clangto work at all.Fix: after the static-libs backfill, symlink
/usr/local/bin/cc→ whicheverllvm{19,20,21}/bin/clangis actually present in the image, so cargo's default linker discovery works with zero user configuration. Gap-fill only — skips ifccalready exists, warns (doesn't fail) if no clang is found.Gates:
sh -n build.shclean,check-format.shclean, no "smoke" occurrences. Branch is a clean fast-forward off currentmain(which has #284).🤖 Generated with Claude Code