Skip to content

pyboolector: Add version 3.2.4.19342042739 - #3055

Draft
luhenry wants to merge 2 commits into
mainfrom
pyboolector
Draft

luhenry wants to merge 2 commits into
mainfrom
pyboolector

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Cython bindings around the Boolector SMT solver, statically linking the bundled CaDiCaL and Lingeling SAT backends (both MIT, plain portable C/C++, GMP off by default). Upstream publishes no riscv64 wheel.

Mirrors the PyPi_Linux_x86_64 job of upstream's own pypi/azure-pipelines-pypi.yml, which drives pypi/build.sh inside a manylinux container, swapped to the riscv64 image.

Differs from upstream

  • Patched pypi/build.sh - its /opt/python/${py}-* glob is ambiguous once a free-threaded interpreter shares the cp314 prefix on this image.

Matrix: cp312/cp313/cp314, no cp314t - the patched script needs an exact cp314-cp314t directory it has no slot for; upstream itself has never shipped a Linux cp314 wheel either.

Testing

  • Added a smoke test (none upstream for the Python binding): installs the wheel and runs upstream's own examples/api/python/quickstart.py, which asserts, calls Sat() and prints a model.

License: OK, all MIT (boolector, CaDiCaL, Lingeling, Btor2Tools); no GPL anywhere in the build.

Patches

  • 0001-exact-match-interpreter-dir.patch - Inappropriate [riscv64 image's split cp314/cp314t layout]. Without it, ls returns two paths for cp314 and the build aborts; reproduces on any arch with both interpreters under one manylinux prefix.

Not locally build-validated (sandboxed dev environment has no native toolchain/docker to rehearse the compile); only patch format and dependency resolution checked locally.

Ports pyboolector 3.2.4.19342042739, Cython bindings around the Boolector
SMT solver (MIT), statically linking the bundled CaDiCaL and Lingeling SAT
backends (both MIT, both plain portable C/C++ with no SIMD/ASM; GMP is off
by default). Drives upstream's own pypi/build.sh (the PyPi_Linux_x86_64
job's recipe) inside the riscv64 manylinux image instead of x86_64's.

One patch: pypi/build.sh resolves /opt/python/${py}-* by globbing, which
is ambiguous on this image once a free-threaded interpreter shares the
cp314 prefix; match the exact directory instead (cp314t is dropped from
the matrix for the same reason).
luhenry added a commit that referenced this pull request Oct 13, 2026
@luhenry
luhenry marked this pull request as draft October 14, 2026 11:34
…mum_required

btor2tools (fetched fresh by boolector's contrib/setup-btor2tools.sh
during the build) declares cmake_minimum_required(VERSION 3.3), which
CMake 4 (shipped in manylinux_2_39_riscv64) refuses outright:
"Compatibility with CMake < 3.5 has been removed". This failed cp312
and cp313 identically, a few minutes into the "Build wheel" step.

Since the failing cmake invocation is inside btor2tools' own
configure.sh, not a line we control to add -DCMAKE_POLICY_VERSION_MINIMUM
to, set it as an environment variable on the docker run instead
(gotcha 257) so it reaches that cmake call anyway.

luhenry commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

cp312/cp313 riscv64 build failure: root cause + fix

Root cause: Both cp312 and cp313 failed identically, a few minutes into the "Build wheel" step, with:

CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.
-- Configuring incomplete, errors occurred!

Traced this to btor2tools (boolector's vendored SMT bitvector tooling, pinned by commit in contrib/setup-btor2tools.sh and downloaded fresh during the container build, not part of our patched boolector checkout). Its CMakeLists.txt declares cmake_minimum_required(VERSION 3.3), which CMake 4 — shipped in manylinux_2_39_riscv64 — refuses outright rather than warning.

Fix: Set CMAKE_POLICY_VERSION_MINIMUM=3.5 as an environment variable on the docker run invocation in build-pyboolector.yml, rather than as a -D flag, because the failing cmake .. call lives inside btor2tools/configure.sh (fetched at build time), a line we don't control to add flags to. CMake reads that variable from the process environment with the same effect, reaching the vendored call without patching it. This is gotcha 257 (refining gotcha 207).

cp314 remains cancelled — a runner-pool starvation issue unrelated to this fix, handled separately.

Pushed to the pyboolector branch.

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