Skip to content

Add pixeltable-pgserver riscv64 wheel build - #3100

Draft
luhenry wants to merge 3 commits into
mainfrom
pixeltable-pgserver
Draft

luhenry wants to merge 3 commits into
mainfrom
pixeltable-pgserver

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Compiles PostgreSQL 16.14 and 18.4 and the pgvector 0.8.5 extension from source and bundles them as an embedded server. Upstream publishes no riscv64 wheel.

Mirrors upstream's build-and-test.yml.

Differs from upstream

  • -Ttext-segment linker flag - non-PIE postgres binaries otherwise crash after auditwheel repair on riscv64.
  • Readline/ncurses licence texts staged before build - auditwheel grafts both libraries.
  • Readline source RPM published with the release.

Matrix: cp312, cp313, cp314 - upstream skips cp314t.

Testing

  • same as upstream

License: Wheel bundles PostgreSQL and pgvector (PostgreSQL License), readline (GPL-3.0-or-later) and ncurses (MIT); upstream ships no licence text for them, so the build adds it.

Patches

  • 0001-Add-LICENSE.postgresql-and-LICENSE.pgvector-matching.patch - To upstream [not submitted yet]. Without it the PostgreSQL/pgvector licences are missing from the wheel. Not riscv64-specific.

pixeltable-pgserver compiles PostgreSQL 16.14 and 18.4 plus pgvector
0.8.5 from source in its own before-all and bundles them into each
wheel. Build from the upstream v0.6.0 tag with cibuildwheel, add the
PostgreSQL/pgvector licence texts (patch), stage the licence texts of
the grafted image readline/ncurses libraries, and publish the readline
source RPM alongside the wheels.
luhenry added a commit that referenced this pull request Oct 13, 2026
…i-running (PR #3100), pythran-openblas -> parked (OpenBLAS 0.3.6 predates RISC-V support)
The PostgreSQL 18.4 release tarball no longer ships the generated
catalog headers, so the build runs genbki.pl, which needs FindBin. The
riscv64 manylinux image only carries the minimal perl-interpreter, and
every cp312/cp313/cp314 job died with "Can't locate FindBin.pm in
@inc" right after PostgreSQL 16.14 had built. Override upstream's
before-all with the same yum line plus perl.
Upstream's pyproject.toml pins setuptools==73.0.1, which predates PEP
639 entirely -- it has no dist-info/licenses/ directory at all, so the
default LICENSE*/COPYING* glob that LICENSE.postgresql,
LICENSE.pgvector, LICENSE.readline and LICENSE.ncurses rely on
(gotcha 44) is a no-op. Every cp312/cp313/cp314 leg failed identically
on the "Verify the wheel ships ... licences" step with
AssertionError: set() -- the wheel shipped no licence files whatsoever.

setuptools 77.0.3 is the earliest release with that default glob
(verified locally: 76.0.0 produces no dist-info/licenses/ entries,
77.0.3 does, for the same root LICENSE files). Preinstall it via
CIBW_BEFORE_BUILD and switch to the pip build frontend with
--no-build-isolation (gotcha 76) so the preinstalled version is
actually used instead of the isolated build env re-resolving
upstream's exact pin.

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