Repository navigation
Conversation
Yahoo Japan's NGT (a nearest-neighbor graph index distinct from the already -published faiss-cpu/hnswlib/annoy/usearch/voyager) publishes manylinux wheels for x86_64/aarch64 but none for riscv64. Mirror the portable NGT_AVX_DISABLED/NGT_MARCH_NATIVE_DISABLED baseline build documented in upstream's own python/pyproject.toml cibuildwheel config, narrowed to riscv64, with a small patch dropping an ARM-only -mno-neon flag that its generic "other architecture" branch wrongly applies to riscv64 too.
cibuildwheel's before_all step runs with cwd set to the cibuildwheel
project root (the whole checkout), not package-dir. The staged
ngt-src/ checkout lives under python/ngt-src (package-dir), so the
cmake invocation in CIBW_BEFORE_ALL_LINUX couldn't find it there and
failed with 'CMake Error: The source directory "/project/ngt-src"
does not exist.' on cp312/cp313/cp314t.
cd into {package} first, matching the pattern already used in
build-libuuu.yml, so the before_all commands operate in the same
directory where ngt-src was staged and where NGT_STATIC_LIBRARY_PATH/
NGT_INCLUDE_DIR are later resolved during the actual wheel build.
The folded >- CIBW_TEST_COMMAND put `python3 -c "` on its own line, so the fold left a leading space before `import ngtpy`. CPython 3.12 and 3.13 reject that with "IndentationError: unexpected indent", while 3.14 tolerates it, which is why only the cp312/cp313 legs failed. Start the script on the same line as the opening quote.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ngt2.8.1Compiles Yahoo Japan's NGT nearest-neighbor graph index (a pybind11/CMake C++ library, distinct from the already-published faiss-cpu/hnswlib/annoy/usearch/voyager) into
ngtpy*.so. Upstream publishes no riscv64 wheel.Mirrors the riscv64-portable baseline recipe already documented in upstream's own
python/pyproject.toml[tool.cibuildwheel.linux](no GitHub Actions wheel-building workflow exists upstream; this is what their own PyPI wheels are built from).Differs from upstream
ngt-src/checkout the recipe expects next to the Python package - not committed upstream, built by their own release tooling instead-mno-neonflag their generic non-x86/non-ARM CMake branch wrongly applies on riscv64 (patch, build fails without it)Testing
License: Apache-2.0, nothing third-party vendored.
-fopenmplinks libgomp (GPL), so agpl_sourcesjob collects gcc's sources.Patches
0001-cmake-drop-the-arm-only-mno-neon-flag-on-non-arm-no.patch- Inappropriate [riscv64 is neither ARM nor x86; GCC rejects-mno-neonoutright on this target]. Build fails to configure without it; reproduces on any non-x86/non-ARM target, not riscv64-only.CI pending; no local build check (no docker/riscv64 in this environment).