You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FTS3/4, GEOPOLY, RTREE extension support missing from 2.6.0+ native gem compile options #653
@reidab Have you looked at the upstream amalgamation at all to see if it changed there? 3.49 was a pretty big change in the upstream packaging and it may have been inadvertently removed, or we may have missed it.
Because 2.6.0 is a relatively old version of this gem (nearly a year) and this related to functionality from three minor releases of sqlite3 ago (3.48 to 3.51) I'm hesitant to invest time in tracking this down right now without knowing more about how this is impacting you and what legwork you've done to try to track down what happened. I'd appreciate your help and input. I'd also welcome a pull request if that's going to solve your problem. Thanks!
@flavorjones sure thing — my use case is that I'm using this gem to generate SQLite databases that are used in an offline mobile app. I'm pre-building an FTS4 full-text search index, so I need that extension available. I'm currently just pinning to 2.5 of this gem, as it's easier than building against an external sqlite library.
I'd verified that the code for these extensions was present in the amalgamation both prior to and after the 3.49 release. They're gated behind ifdef and are enabled with compile-time options. Binary releases of this gem prior to 2.6 included these flags, but they were dropped with that release.
Building the current version of sqlite from source, with just ./configure and make, I end up with a binary where these flags are enabled, so I think it's reasonable to accept them as defaults even if the standalone library compilation flow isn't including them.
PRAGMA compile_options; from fresh-compiled SQLite version 3.51.1
SQLite version 3.51.1 2025-11-28 17:28:25
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> PRAGMA compile_options;
ATOMIC_INTRINSICS=1
COMPILER=clang-17.0.0
DEFAULT_AUTOVACUUM
DEFAULT_CACHE_SIZE=-2000
DEFAULT_FILE_FORMAT=4
DEFAULT_JOURNAL_SIZE_LIMIT=-1
DEFAULT_MMAP_SIZE=0
DEFAULT_PAGE_SIZE=4096
DEFAULT_PCACHE_INITSZ=20
DEFAULT_RECURSIVE_TRIGGERS
DEFAULT_SECTOR_SIZE=4096
DEFAULT_SYNCHRONOUS=2
DEFAULT_WAL_AUTOCHECKPOINT=1000
DEFAULT_WAL_SYNCHRONOUS=2
DEFAULT_WORKER_THREADS=0
DIRECT_OVERFLOW_READ
DQS=0
ENABLE_BYTECODE_VTAB
ENABLE_DBPAGE_VTAB
ENABLE_DBSTAT_VTAB
ENABLE_EXPLAIN_COMMENTS
ENABLE_FTS3
ENABLE_FTS4
ENABLE_MATH_FUNCTIONS
ENABLE_OFFSET_SQL_FUNC
ENABLE_PERCENTILE
ENABLE_RTREE
ENABLE_STMTVTAB
ENABLE_UNKNOWN_SQL_FUNCTION
HAVE_ISNAN
MALLOC_SOFT_LIMIT=1024
MAX_ATTACHED=10
MAX_COLUMN=2000
MAX_COMPOUND_SELECT=500
MAX_DEFAULT_PAGE_SIZE=8192
MAX_EXPR_DEPTH=1000
MAX_FUNCTION_ARG=1000
MAX_LENGTH=1000000000
MAX_LIKE_PATTERN_LENGTH=50000
MAX_MMAP_SIZE=0x7fff0000
MAX_PAGE_COUNT=0xfffffffe
MAX_PAGE_SIZE=65536
MAX_SQL_LENGTH=1000000000
MAX_TRIGGER_DEPTH=1000
MAX_VARIABLE_NUMBER=32766
MAX_VDBE_OP=250000000
MAX_WORKER_THREADS=8
MUTEX_PTHREADS
SYSTEM_MALLOC
TEMP_STORE=1
THREADSAFE=1
PRAGMA compile_options; from sqlite3 installed by native sqlite3-ruby 2.8.1
The list of pragmas is helpful, thanks. I have a draft PR that I created earlier in the year to shift from the autoconf package to the alagamation, and pulled the list of flags used by debian into the extconf.rb:
And notably that PR (and debian the autoconf package) have these specific flags enabled. Maybe I'll just pull that list of flags out of the PR and merge it separately. I'll plan to do that once I'm past the Ruby 4 release window (the next few days).
Activity
flavorjones commentedon Dec 23, 2025
@reidab Have you looked at the upstream amalgamation at all to see if it changed there? 3.49 was a pretty big change in the upstream packaging and it may have been inadvertently removed, or we may have missed it.
Because 2.6.0 is a relatively old version of this gem (nearly a year) and this related to functionality from three minor releases of sqlite3 ago (3.48 to 3.51) I'm hesitant to invest time in tracking this down right now without knowing more about how this is impacting you and what legwork you've done to try to track down what happened. I'd appreciate your help and input. I'd also welcome a pull request if that's going to solve your problem. Thanks!
reidab commentedon Dec 24, 2025
@flavorjones sure thing — my use case is that I'm using this gem to generate SQLite databases that are used in an offline mobile app. I'm pre-building an FTS4 full-text search index, so I need that extension available. I'm currently just pinning to 2.5 of this gem, as it's easier than building against an external sqlite library.
I'd verified that the code for these extensions was present in the amalgamation both prior to and after the 3.49 release. They're gated behind
ifdefand are enabled with compile-time options. Binary releases of this gem prior to 2.6 included these flags, but they were dropped with that release.I think this comes down to the sqlite shift away from autoconf. As you mentioned in your draft PR for #636, these flags were previously being added by the autoconf amalgamation's configure script:
https://github.com/sparklemotion/sqlite3-ruby/pull/636/changes#diff-bd08eecf2a8519d8fd0dab9cbbc37b9f2bf123e3a75beb7247045a82fa98fa82R86-R94
Building the current version of sqlite from source, with just
./configureandmake, I end up with a binary where these flags are enabled, so I think it's reasonable to accept them as defaults even if the standalone library compilation flow isn't including them.PRAGMA compile_options; from fresh-compiled SQLite version 3.51.1
PRAGMA compile_options; from sqlite3 installed by native sqlite3-ruby 2.8.1
flavorjones commentedon Dec 24, 2025
You can build sqlite3-ruby and the vendored sqlite from source -- including setting the CFLAGS. If that's useful. See https://github.com/sparklemotion/sqlite3-ruby/blob/main/INSTALLATION.md#compiling-the-source-gem
The list of pragmas is helpful, thanks. I have a draft PR that I created earlier in the year to shift from the autoconf package to the alagamation, and pulled the list of flags used by debian into the extconf.rb:
https://github.com/sparklemotion/sqlite3-ruby/pull/636/changes#diff-bd08eecf2a8519d8fd0dab9cbbc37b9f2bf123e3a75beb7247045a82fa98fa82R60-R100
And notably that PR (and
debianthe autoconf package) have these specific flags enabled. Maybe I'll just pull that list of flags out of the PR and merge it separately. I'll plan to do that once I'm past the Ruby 4 release window (the next few days).