fix(rpm): derive the libcuda link stub from source (fixes undefined cu* symbols)
apple / swift (push) Successful in 54s
ci / rust (push) Successful in 1m10s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m22s
deb / build-publish (push) Successful in 3m9s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
ci / bench (push) Successful in 4m37s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m57s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 9m2s
docker / deploy-docs (push) Successful in 13s
apple / swift (push) Successful in 54s
ci / rust (push) Successful in 1m10s
ci / web (push) Successful in 30s
ci / docs-site (push) Successful in 31s
android / android (push) Successful in 3m22s
deb / build-publish (push) Successful in 3m9s
decky / build-publish (push) Successful in 11s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
ci / bench (push) Successful in 4m37s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 5s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m57s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 9m2s
docker / deploy-docs (push) Successful in 13s
The Fedora RPM build linked punktfunk-host against a synthesized libcuda stub with a FROZEN symbol list baked into ci/fedora-rpm.Dockerfile. The priority- stream work added cuCtxGetStreamPriorityRange / cuStreamCreateWithPriority / cuStreamSynchronize / cuMemcpy2DAsync_v2, which weren't in that list, so the link failed with "undefined symbol". build-rpm.sh now regenerates /usr/lib64/libcuda.so.1 from every cu* symbol the host source references (grep of crates/punktfunk-host/src), before rpmbuild — so a new cu* call can never silently break the link again. Self-maintaining and needs no builder-image rebuild (it supersedes the Dockerfile's frozen stub). Verified the 23 extracted symbols compile and cover the 4 that were undefined. Also fix the bogus %changelog weekday (Sun -> Mon, Jun 15 2026 is a Monday) that rpmbuild warned on. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -28,6 +28,25 @@ mkdir -p "$TOP"/{SOURCES,SPECS,BUILD,BUILDROOT,RPMS,SRPMS}
|
|||||||
git archive --format=tar.gz --prefix="punktfunk-${PF_VERSION}/" \
|
git archive --format=tar.gz --prefix="punktfunk-${PF_VERSION}/" \
|
||||||
-o "$TOP/SOURCES/punktfunk-${PF_VERSION}.tar.gz" HEAD
|
-o "$TOP/SOURCES/punktfunk-${PF_VERSION}.tar.gz" HEAD
|
||||||
|
|
||||||
|
# libcuda link stub (self-maintaining). The zerocopy FFI links the NVIDIA driver lib (-lcuda), but
|
||||||
|
# the CI builder has no GPU and never RUNS CUDA. Synthesize a stub libcuda that DEFINES every cu*
|
||||||
|
# driver symbol the host source references, derived from the source HERE so a newly-added cu* call
|
||||||
|
# can't silently break the link. (ci/fedora-rpm.Dockerfile ships a frozen list that went stale —
|
||||||
|
# undefined cuStreamCreateWithPriority/cuMemcpy2DAsync_v2/…; this regen supersedes it.) Defining
|
||||||
|
# extra unused symbols is harmless; a missing one fails the link. Only when /usr/lib64 is writable
|
||||||
|
# (CI image runs as root) — COPR/mock provides the real cuda-cudart-devel stub instead.
|
||||||
|
if [ "$(id -u)" = 0 ] && [ -d /usr/lib64 ]; then
|
||||||
|
CU_SYMS="$(grep -rhoE '\bcu[A-Z][A-Za-z0-9_]*' crates/punktfunk-host/src/ | sort -u || true)"
|
||||||
|
if [ -n "$CU_SYMS" ]; then
|
||||||
|
STUB_C="$(mktemp --suffix=.c)"
|
||||||
|
for s in $CU_SYMS; do printf 'int %s(void){return 0;}\n' "$s" >> "$STUB_C"; done
|
||||||
|
gcc -shared -fPIC -Wl,-soname,libcuda.so.1 -o /usr/lib64/libcuda.so.1 "$STUB_C"
|
||||||
|
ln -sf libcuda.so.1 /usr/lib64/libcuda.so
|
||||||
|
rm -f "$STUB_C"; ldconfig 2>/dev/null || true
|
||||||
|
echo "== libcuda stub regenerated from source: $(printf '%s\n' "$CU_SYMS" | wc -l) symbols =="
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# --nodeps: the spec's BuildRequires (cargo, rust, *-devel) are for COPR's mock chroot, which
|
# --nodeps: the spec's BuildRequires (cargo, rust, *-devel) are for COPR's mock chroot, which
|
||||||
# resolves them from RPMs. Our builder image provides the toolchain via rustup (so
|
# resolves them from RPMs. Our builder image provides the toolchain via rustup (so
|
||||||
# rust-toolchain.toml's pinned channel works) and the -devel libs via dnf, neither of which
|
# rust-toolchain.toml's pinned channel works) and the -devel libs via dnf, neither of which
|
||||||
|
|||||||
@@ -299,7 +299,7 @@ echo "Then open http://<host-ip>:3000"
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sun Jun 15 2026 punktfunk <noreply@anthropic.com> - 0.0.1-2
|
* Mon Jun 15 2026 punktfunk <noreply@anthropic.com> - 0.0.1-2
|
||||||
- Add punktfunk-web subpackage (management console, --with web; auto-wired to the host token).
|
- Add punktfunk-web subpackage (management console, --with web; auto-wired to the host token).
|
||||||
* Wed Jun 10 2026 punktfunk <noreply@anthropic.com> - 0.0.1-1
|
* Wed Jun 10 2026 punktfunk <noreply@anthropic.com> - 0.0.1-1
|
||||||
- Initial RPM: punktfunk-host + udev rule + systemd user unit + headless helpers.
|
- Initial RPM: punktfunk-host + udev rule + systemd user unit + headless helpers.
|
||||||
|
|||||||
Reference in New Issue
Block a user