Skip to content

fix(deps): require sqlite-vec 0.1.7+ for 64-bit linux/arm64 wheels - #334

Open
hatemadi15 wants to merge 1 commit into
cocoindex-io:mainfrom
hatemadi15:fix/sqlite-vec-arm64-65
Open

hatemadi15 wants to merge 1 commit into
cocoindex-io:mainfrom
hatemadi15:fix/sqlite-vec-arm64-65

Conversation

@hatemadi15

Copy link
Copy Markdown

Fixes #65.

#67 switched the project's SQLite connection from load_vec="auto" to load_vec=True. Under "auto", cocoindex swallows a failed extension load, so the failure only showed up later as the misleading sqlite-vec extension must be loaded for vec0 virtual tables. Since #67 the real load error surfaces instead.

The cause behind the report was still there. The linux aarch64 wheels of sqlite-vec 0.1.5 and 0.1.6 ship a 32-bit ARM vec0.so, which a 64-bit Python cannot load:

sqlite3.OperationalError: .../sqlite_vec/vec0.so: wrong ELF class: ELFCLASS32

uv.lock still pins 0.1.6 and pyproject.toml allows >=0.1.0, so uv sync on linux/arm64 still installs the broken binary, and pip install -U cocoindex-code keeps a 0.1.6 that is already installed. 0.1.7 is the first stable release with a 64-bit aarch64 build; it came out on 2026-03-17, four days after this issue was filed. The reporter was inside a Docker Sandbox, which is linux/arm64 on an arm64 host such as Apple Silicon.

This raises the floor to sqlite-vec>=0.1.7 and runs uv lock --upgrade-package sqlite-vec, which moves only sqlite-vec (0.1.6 to 0.1.9). Nothing else pins sqlite-vec. The Docker images, including the linux/arm64 ones the release job publishes, install with uv pip install from the source tree rather than from the lockfile. They have resolved a good wheel since 0.1.7 came out, and the floor keeps it that way.

Validation

CI has no linux/arm64 runner (ubuntu x86_64, macOS arm64, Windows x86_64), so the arm64 evidence comes from inspecting and cross-installing the PyPI wheels. The inspected 0.1.6 aarch64 wheel and the five 0.1.9 wheels have the same sha256 as their entries in main's uv.lock and in this branch's.

vec0.so in the manylinux_2_17_aarch64 wheel (file, readelf -h):

sqlite-vec vec0.so
0.1.5, 0.1.6 ELF 32-bit, ARM, EABI5
0.1.7, 0.1.8, 0.1.9 ELF 64-bit, AArch64

Versions before 0.1.5 publish no linux aarch64 wheel. The other 0.1.7 and 0.1.9 wheels are correct as well: manylinux x86_64 is ELF 64-bit x86-64, macOS is Mach-O 64-bit x86_64 and arm64, and win_amd64 is PE32+ x86-64. The 0.1.7 and 0.1.9 Linux builds need at most GLIBC_2.17 (aarch64) and GLIBC_2.14 (x86_64), as their manylinux2014 tag promises.

  • What linux/arm64 uv sync installs. I ran uv sync --frozen --no-dev --no-install-project --python-platform aarch64-unknown-linux-gnu into a scratch env. From main's lock it installs sqlite-vec==0.1.6, whose vec0.so is ELF 32-bit LSB shared object, ARM, EABI5. Loading that into a 64-bit Python fails with wrong ELF class: ELFCLASS32; the ELF class check comes before the machine check, so an aarch64 host fails the same way. From this branch's lock it installs sqlite-vec==0.1.9, whose vec0.so is ELF 64-bit LSB shared object, ARM aarch64.
  • Slim install round trip. uv sync --locked --no-dev into a fresh env installs sqlite-vec 0.1.9 without sentence-transformers or torch. I then ran ccc init --litellm-model openai/text-embedding-3-small, ccc index, ccc status and ccc search (plain, --lang, --path, --json). After editing one file and deleting another, I re-indexed (1 deleted, 1 reprocessed, 1 unchanged), searched again and ran ccc daemon stop. Embeddings came from LiteLLM against a local fake OpenAI endpoint, with a throwaway HOME and COCOINDEX_CODE_DIR. Every command exited 0, the deleted file dropped out of the results, and daemon.log had no ERROR lines.
  • Upgrade path. In a venv that already has sqlite-vec 0.1.6, pip install -U of a package that requires sqlite-vec>=0.1.0 keeps 0.1.6; requiring >=0.1.7 upgrades it to 0.1.9 (pip 26.2.2).
  • Tests. uv run pytest tests/ (x86_64, Python 3.13) gives 350 passed, 8 deselected on 0.1.9 (this branch's lock), on 0.1.7 (installed by hand, the new floor) and on main with 0.1.6. tests/test_query_filters.py runs the KNN, partition-key and full-scan query shapes against a real vec0 table, including the hidden-distance contract, and passes on all three versions.
  • uv run prek run --all-files passes, including the pinned uv-lock hook and the pytest hook (350 passed). uv run ruff check ., uv run ruff format --check . and uv run mypy src/ tests/ pass. uv run mypy . reports 2 errors in scripts/find_best_models.py, which main reports too.

@hatemadi15
hatemadi15 marked this pull request as ready for review November 9, 2026 19:42

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.

Error when attempting to use MCP search tool from Claude

1 participant