distcc-avahi: package missing /usr/lib/distcc/bin/{gcc,g++,cc,c++} masquerade symlinks #7
Reference in New Issue
Block a user
Delete Branch "%!s()"
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?
Symptom
On a build host with
distcc-avahi 3.4-17installed andBUILDENV=(distcc color !ccache check !sign)+DISTCC_HOSTS="+zeroconf"in/etc/makepkg.conf(or~/.makepkg.conf), distcc never engages for native gcc/g++ invocations. All compilation runs locally; remote workers (dcc1/dcc2/tesla discovered via avahi) sit idle.Observed on boltzmann (aarch64) during the kernel-pkgrel=5 build of
linux-pinetab2-danctnix-besser. Load average 16+ from local cc1 processes,distccmon-textempty,avahi-browse _distcc._tcpshowed dcc1/dcc2/tesla all reachable. Same situation in pkgrel=1..4 builds previously — distcc was never offloading on this host even though everything looked configured.Root cause
distcc-avahiships only the binaries themselves:It does not populate
/usr/lib/distcc/bin/with symlinks likemakepkg's distcc integration prepends/usr/lib/distcc/bintoPATHwhendistccis inBUILDENV. Without those symlinks, plaingcc/g++/cc/c++lookups fall through to/usr/bin/gcc(etc.) and compile locally. The cross-prefix symlinks (aarch64-linux-gnu-gcc) that boltzmann had were created manually out-of-band and so don't help when the build invokes plaingcc(which is the case for native kernel builds).Reproducer
Kick a kernel build, watch
distccmon-text— empty.Fix
PKGBUILD::package()should create the four standard masquerade symlinks. Reference: Arch upstreamdistccpackage does this via:Non-x86 hosts that also need cross-prefix names can extend the list (e.g.
aarch64-linux-gnu-gcc,arm-linux-gnueabihf-gcc), but the four basic names cover the native-build common case which is what makepkg expects.Workaround
Until packaged:
sudo ln -sf /usr/bin/distcc /usr/lib/distcc/bin/{gcc,g++,cc,c++}. Verified to immediately enable distcc — distccmon-text starts showing remote compile slots within seconds of the next cc1 invocation.Where this matters
Every aarch64 build host running
distcc-avahi: boltzmann, fermi, fresnel (if used as builder), tesla, dcc1, dcc2, ampere. They've all been compiling locally instead of sharing load. Kernel builds are the most visible case (~50min becomes ~25-30min when cluster engages); package builds in general also benefit.Doesn't affect builds that explicitly use the cross-prefix wrapper (e.g. cross-arch builds). Affects any native-aarch64 build that invokes
gcc/cc.Related
reference_distcc_kernel_builds.mdnotes in claude-noether memory.Shipped in
distcc-avahi 3.4-20(skipped the broken 19 slot — the previous publish left a stale db entry pointing at a missing pkg).package()now installs masquerade symlinks forc++ c89 c99 cc clang clang++ cpp g++ gccplus${CHOST}-g++/gcc/gcc-$(version)into/usr/lib/distcc/bin/.Verified on boltzmann post-install:
/usr/lib/distcc/bin/gccowned bydistcc-avahi 3.4-20. Roll out viapacman -S distcc-avahion each affected host (boltzmann ✓; fermi/ampere/dcc1/dcc2/tesla/fresnel: pending).Bonus diagnostic finding: the in-flight
linux-fresnel-fourier 7.0-1build that ran 17:30-19:32 on boltzmann was never actually using distcc despite the load-32 visual — same root cause (no masquerade symlinks, gcc resolved to /usr/bin/gcc). Pure local 8-core. Future kernel-agent builds are no-distcc by policy anyway, so the only practical effect is on the historical record.