Skip to content

cmeel-gklib: Add version 0.0.1 - #4823

Merged
luhenry merged 3 commits into
mainfrom
cmeel-gklib
Nov 11, 2026
Merged

luhenry merged 3 commits into
mainfrom
cmeel-gklib

Conversation

@luhenry

@luhenry luhenry commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Wraps GKlib (a leaf dependency of cmeel-metis) through the cmeel build-backend, producing a py3-none wheel holding only the shared library and headers. Upstream publishes no riscv64 wheel.

Mirrors upstream's release.yml, manylinux leg only.

Differs from upstream

  • Nothing beyond the riscv64 image. GKlib's own CMakeLists.txt already keys NO_X86 off CMAKE_SYSTEM_PROCESSOR, and that flag only gates one optional helper app (apps/gkuniq.c), not the library itself — confirmed against the real upstream source, so no patch was needed.

Testing

  • same as upstream

License: Apache-2.0.

Built on cp312; smoke-tests loading libGKlib.so and resolving GKDecodeBase64.

GKlib is a leaf dependency of cmeel-metis (cmeel's own GKlib/METIS
distribution for the robotics stack), wrapped through the cmeel
build-backend same shape already proven here by cmeel-fmt/cmeel-gmp/
cmeel-qpoases: one has-sitelib=false py3-none wheel holding only the
shared library and headers, no Python extension to build per interpreter.

cmeel-GKlib's own CMakeLists.txt already keys NO_X86 off
CMAKE_SYSTEM_PROCESSOR (anything not matching x86/X86/amd64/AMD64 gets
NO_X86=ON); confirmed against the real upstream GKlib source at the pinned
commit that NO_X86 gates exactly one optional helper app
(apps/gkuniq.c's x86-only byte-reversal routine), not the library itself,
so riscv64 needs no patch here. Verified against the real published
x86_64 wheel (cmeel_gklib-0.0.1-0-py3-none-manylinux_2_28_x86_64.whl)
that the actual lib filename is libGKlib.so (no soname suffix, unlike
cmeel-gmp's libgmp.so.10.5.0) and that GKDecodeBase64 is a real exported
symbol, rather than guessing either.
luhenry added a commit that referenced this pull request Nov 11, 2026
cmeel-gklib: ci-running, PR #4823.
cmeel-metis: blocked-on-dependency (needs cmeel-gklib to publish).
cmeel-m4, cmeel-glpk: parked, GPL-3.0-only, needs a dedicated
GPL-sources-aware pass rather than a disk-constrained mining cycle.
cmeel-mimalloc: parked, direct repo-local evidence of riscv64 trouble
(bustapi's own --no-default-features workaround, PR #4811).
cmeel-eigen: not-applicable, true py3-none-any header-only wheel,
already installable on riscv64 as-is, no port needed.
GKlib's own CMakeLists.txt declares cmake_minimum_required(VERSION 2.8)
with no <max>; confirmed directly against the real upstream source at the
pinned commit (8bd6bad750b2b0d90800c632cf18e8ee93ad72d7). cmeel[build]
resolves CMake >= 4, which refuses anything below 3.5 outright:

  CMake Error at CMakeLists.txt:1 (cmake_minimum_required):
    Compatibility with CMake < 3.5 has been removed from CMake.

The cmeel backend owns the configure invocation, so the floor has to go
in the environment rather than a patch to GKlib's CMakeLists.txt itself
-- same shape as cmeel-yaml-cpp's build (gotcha 257).
…ects it

GKlib's own CMakeLists.txt keys NO_X86 off CMAKE_SYSTEM_PROCESSOR (anything
not x86/amd64 gets NO_X86=ON), but confirmed against the real upstream
source that this flag only gates one optional helper app (apps/gkuniq.c),
not the library itself. The library's own -march=native (GKlibSystem.cmake,
gated only by a PPC-specific regex, unrelated to NO_X86 at all) is what
actually broke the build: cc: error: '-march=native': ISA string must
begin with rv32 or rv64, failing blas.c/b64.c/cache.c/csr.c - every core
library file, not the one app NO_X86 disables.

GKlib is fetched fresh by this wrapper's own ExternalProject_Add (not
vendored in this repo), so the fix is a PATCH_COMMAND confirmed line-for-
line against the real GKlibSystem.cmake at the pinned commit
(8bd6bad750b2): scope -march=native to real x86 the same way the PPC
branch is already scoped, instead of leaving it as the unconditional
"everything else" fallback that riscv64 fell into.
@luhenry
luhenry merged commit 78b038d into main Nov 11, 2026
6 checks passed
@luhenry
luhenry deleted the cmeel-gklib branch November 11, 2026 15:14
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