Skip to content

fbuild: Add version 2.5.21 - #3235

Draft
luhenry wants to merge 4 commits into
mainfrom
fbuild
Draft

luhenry wants to merge 4 commits into
mainfrom
fbuild

Conversation

@luhenry

@luhenry luhenry commented Oct 14, 2026 •

Copy link
Copy Markdown
Member

Compiles the Rust fbuild and fbuild-daemon binaries and the PyO3 _native abi3 extension of FastLED's PlatformIO-compatible embedded build tool. Upstream publishes no riscv64 wheel (and no sdist).

Mirrors upstream's template_native_build.yml and the build-pypi job of release-auto.yml, assembling the wheel with the checkout's own ci/publish.py.

Differs from upstream

  • Native glibc build in manylinux_2_39_riscv64 - upstream cross-builds static musl binaries with cargo-zigbuild
  • No -D warnings - lint gate, not packaging

Matrix: one cp310-abi3 wheel, tested on 3.12/3.13/3.14; abi3 is not installable on 3.14t.

Testing

  • same as upstream (fbuild --version, import fbuild), plus find_firmware and a licence-metadata check

License: Upstream wheels ship no licence text for the AGPL-3.0-only project, so the build adds it.

Patches

  • 0001-publish-ship-LICENSE-in-wheels.patch - To upstream [upstream's wheels ship no licence file or licence metadata on any platform]. Without it the wheel carries no LICENSE. Reproduces on every platform.

Build fbuild's riscv64 wheel the way upstream's release-auto.yml does for
every other platform: cargo-build the fbuild and fbuild-daemon binaries and
the PyO3 _native abi3 extension, then assemble the wheel with the
checkout's own ci/publish.py, natively inside manylinux_2_39_riscv64.

Patch ci/publish.py so the wheel ships the AGPL-3.0-only LICENSE and
declares it via License-Expression/License-File.
luhenry added a commit that referenced this pull request Oct 15, 2026
…ated

topk-sdk (#3230), zope-index (#3228), zccache (#3229), kfnetlist (#3231),
ligo-skymap (#3233), quantile-forest (#3232), fbuild (#3235),
py-ballisticcalc-exts (#3238), resdata (#3237), oxapy (#3239),
pyramids-gis (#3240), biscuit-python (#3223), ansys-mapdl-reader (#3227)
all had open PRs that queue.yml never reflected (status still queued,
pr still null). Verified each PR independently before updating.
Build fbuild 2.5.21 manylinux_riscv64 failed compiling crash-context
0.6.3 (pulled in transitively via zccache/running-process-probe's
crash-handler dependency) with "cannot find type ucontext_t in module
super" -- that version has no riscv64 branch in its getcontext()/
ucontext_t/fpregset_t cfg-if chains at all.

crash-context 0.7.0 added real riscv64 support, but crash-handler
0.6.3 and 0.7.0 (both locked here, neither ours to patch -- external
git deps) each pin crash-context = "0.6", rejecting 0.7.0 under
semver. Vendors the complete, unmodified 0.7.0 release with just its
version string turned back to 0.6.3 so it still satisfies that
requirement, wired in via [patch.crates-io] in the top-level
Cargo.toml -- no hand-written riscv64 code, it's EmbarkStudios' own
tested release.
luhenry added a commit that referenced this pull request Oct 15, 2026
@luhenry
luhenry marked this pull request as draft October 15, 2026 12:14
zccache's crash-handler 0.6.3 pin has no riscv64 branch in its own
linux/jmp.rs or linux/state.rs -- a separate crate from crash-context,
not fixed by 0002. Vendor the real upstream 0.7.0 release the same way,
version string turned back to "0.6.3", wired in via a second
[patch.crates-io] entry.

luhenry commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Root cause

The failing job (Build fbuild 2.5.21 manylinux_riscv64, run 38713460011) is a genuine build error, not a runner hiccup — it ran for ~31 minutes on a real runner and failed with actual Rust compile errors:

error[E0425]: cannot find type `__jmp_buf` in this scope
  --> crash-handler-0.6.3/src/linux/jmp.rs:51:16
error[E0609]: no field `fpregs` on type `crash_context::mcontext_t`
  --> crash-handler-0.6.3/src/linux/state.rs:461:48 (and :462)

0002 (vendor-crash-context-riscv64.patch) already vendors crash-context 0.7.0 to fix riscv64 support in that crate. But crash-handler 0.6.3 — pulled in separately by zccache, an external git dependency — has its own arch-specific code that also lacks riscv64: linux/jmp.rs's __jmp_buf layout and linux/state.rs's float-state read (uc_mcontext.fpregs, which doesn't exist on riscv64 glibc; the real field is __fpregs). That's a different crate from crash-context and isn't touched by 0002. (Cargo.lock also resolves a second crash-handler 0.7.0 for running-process's pin — that one already has riscv64 support, so only the 0.6.3 line used by zccache is broken.)

Fix

Added patches/fbuild/2.5.21/0003-vendor-crash-handler-riscv64.patch, following the exact same pattern as 0002: vendors the complete, unmodified crash-handler 0.7.0 release under vendor/crash-handler/, version string turned back to "0.6.3" so it still satisfies zccache's crash-handler = "0.6" requirement, wired in via a second [patch.crates-io] entry alongside the existing crash-context one.

Validated locally with cargo check --target riscv64gc-unknown-linux-gnu:

  • registry crash-handler 0.6.3 + 0002's patched crash-context (i.e. today's state) reproduces the CI failure byte-for-byte (same file:line, same error codes).
  • this patch's vendored crash-handler + 0002's patched crash-context together compiles cleanly for riscv64gc.

Pushed to fbuild as 100f547821c.

… protoc

Fixes PR #3235's riscv64 build failure: zccache-protocol's build.rs
calls protoc_bin_vendored::protoc_bin_path().expect(...) unconditionally,
which errors on riscv64 (upstream ships no riscv64 binary, for any
version) before prost_build gets a chance to fall back to $PROTOC/$PATH.
Vendors a same-name shim crate implementing that one function via a
third [patch.crates-io] entry (alongside 0002/0003's crash-context/
crash-handler ones), and installs protobuf-compiler/protobuf-devel in
the build container so the shim's $PATH fallback resolves to something.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant