Skip to content

aimrocks: Add version 0.5.2 - #3060

Draft
luhenry wants to merge 2 commits into
mainfrom
aimrocks
Draft

luhenry wants to merge 2 commits into
mainfrom
aimrocks

Conversation

@luhenry

@luhenry luhenry commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Cython RocksDB binding; compiles RocksDB 6.29.fb and its zlib/bzip2/lz4/zstd/snappy dependencies from source. Upstream publishes no riscv64 wheel.

Mirrors the deps/rocksdb/wheels stages of upstream's Dockerfile and the docker/build-*.sh scripts they run.

Differs from upstream

  • cibuildwheel instead of Docker multi-stage - no custom riscv64 manylinux image to build
  • Runs upstream's tests/ suite - upstream's packaging pipeline only builds wheels, never tests them
  • Added license files for zlib/bzip2/lz4/zstd/snappy/rocksdb - upstream's own wheels carry none

Testing

  • same as upstream, plus the tests/ suite (see above)

License: Wheel bundles rocksdb (Apache-2.0), zlib, bzip2, lz4, zstd and snappy (all permissive, none GPL); upstream ships no license text for them, so the build adds it.

Built on cp312; CI pending.

RocksDB 6.29.fb and its zlib/bzip2/lz4/zstd/snappy dependencies are built
from source with PORTABLE=1, mirroring upstream's own docker/build-*.sh.
PORTABLE=1 disables every x86-only compiler probe in rocksdb's
build_detect_platform, and util/crc32c.cc's hardware CRC32 paths are all
gated on HAVE_SSE42/HAVE_ARM64_CRC/HAVE_POWER8, none of which get defined
on riscv64, so it falls back to the portable table-based implementation
upstream already ships non-x86 (aarch64) wheels with.
@luhenry
luhenry marked this pull request as draft October 14, 2026 11:34
All four manylinux_riscv64 matrix legs failed identically at the same
step: rocksdb 6.29.fb's db/db_impl/db_impl.cc fails to compile under
manylinux_2_39_riscv64's GCC 14.3.1 with
`error: redundant move in return statement [-Werror=redundant-move]`
on `return std::move(io_s);`. The code predates this diagnostic;
upstream's own (older) build image never hits it.

rocksdb's Makefile already gates -Werror behind
`ifndef DISABLE_WARNING_AS_ERROR`, so pass DISABLE_WARNING_AS_ERROR=1
to the shared_lib build instead of patching or disabling warnings
project-wide.

luhenry commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

All four matrix legs (cp312/cp313/cp314/cp314t) failed identically, in the same build step, at the same source line — confirming a single shared root cause rather than per-interpreter issues.

Root cause: CIBW_BEFORE_ALL_LINUX builds rocksdb 6.29.fb from source via its own make shared_lib. On manylinux_2_39_riscv64 (GCC 14.3.1), db/db_impl/db_impl.cc fails to compile:

db/db_impl/db_impl.cc:1329:23: error: redundant move in return statement [-Werror=redundant-move]
      return std::move(io_s);

rocksdb 6.29.fb (2021-era code) wasn't written against a GCC strict enough to flag this NRVO-eligible std::move, and upstream's own build image is older than GCC 14, so they never hit it. zlib/bzip2/lz4/zstd/snappy all built fine beforehand — this is specific to rocksdb's own sources, not the riscv64 toolchain or any SIMD/arch-detection path (PORTABLE=1 already disables those correctly).

Fix: rocksdb's Makefile already has a purpose-built escape hatch for exactly this (ifndef DISABLE_WARNING_AS_ERROR around its -Werror), so I added DISABLE_WARNING_AS_ERROR=1 to the shared_lib make invocation rather than patching rocksdb sources or disabling warnings more broadly. Pushed as aadc6e773d8 on this 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