Skip to content

FTS5 Unavailable in Termux Environment #18

@schmosbyy

Description

@schmosbyy

FTS5 Unavailable on Android (Termux)

Current Behavior

On Android using Termux, OpenClaw logs:

fts unavailable: no such module: fts5

This occurs on a standard openclaw-android installation, even though
SQLite is present and functioning.


What Works

  • sqlite-vec extension loads correctly
    (~/.openclaw-android/.../sqlite-vec-linux-arm64/vec0.so)
  • ✅ Embeddings fully operational (Gemini / OpenAI / local models)
  • ✅ Vector-only search works (graceful fallback)

What's Missing

  • ❌ FTS5 virtual tables cannot be created
  • ❌ BM25 keyword search unavailable
  • ❌ Hybrid search degrades to vector-only mode
    (no exact token matching for IDs, error codes, symbols)

Root Cause

Termux's bundled SQLite (libsqlite3 from Termux packages) is compiled
without --enable-fts5.

OpenClaw expects FTS5 support for hybrid search, but falls back
gracefully to vector-only search when unavailable.


Potential Solutions

Option A --- Recompile SQLite with FTS5

Termux's sqlite package build flags need --enable-fts5.

Current:

./configure --prefix=$PREFIX ...

Required:

./configure --prefix=$PREFIX --enable-fts5

Option B --- Bundle FTS5-Enabled SQLite

Ship a precompiled libsqlite3.so with FTS5 enabled alongside the
existing sqlite-vec extension.


Option C --- Document the Limitation

Add to troubleshooting documentation:

On Termux/Android, FTS5 may be unavailable. Hybrid search will
automatically fall back to vector-only mode.


Technical Details

  • Error source: better-sqlite3sqlite3_prepare_v2()
    no such module: fts5
  • Index tables affected: chunks_fts virtual table creation fails
  • User impact: Low
    • Semantic (vector) search works
    • Exact keyword matching is degraded

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions