8.16. SQLite 3.53.0
Build and install SQLite in the final target environment to provide an embedded SQL database engine.
Input assumption: sqlite-autoconf-3530000.tar.gz is already present in /sources from the chapter 4 source staging step.
Source URL: https://sqlite.org/2026/sqlite-autoconf-3530000.tar.gz
Upstream build note: SQLite's autoconf bundle contains the prebuilt amalgamation, generated headers, the sqlite3 shell source, and an autosetup-based configure script. The upstream README documents the POSIX build flow as ./configure followed by make.
Feature note: this build enables column metadata, unlock notification, the dbstat virtual table, and secure delete through CPPFLAGS.
Licenses:
- Public domain
Dependencies:
- musl (libc)
- zlib-ng (libz)
- make
SQLite is a self-contained SQL database engine. we need it to provide the sqlite3 shell, libsqlite3, and SQLite headers for packages and system components that store structured data in local database files.
Extract and Enter the Source Tree
cd /sources
tar -xf sqlite-autoconf-3530000.tar.gz
cd sqlite-autoconf-3530000
Configure SQLite
lbi_configure.
CPPFLAGS="-D SQLITE_ENABLE_COLUMN_METADATA=1 \
-D SQLITE_ENABLE_UNLOCK_NOTIFY=1 \
-D SQLITE_ENABLE_DBSTAT_VTAB=1 \
-D SQLITE_SECURE_DELETE=1" \
lbi_configure \
--disable-static \
--enable-shared \
--disable-readline \
--soname=legacy
Build SQLite
make $LWI_MAKE_FLAGS
Install SQLite
make install
/sources if you do not plan to rebuild SQLite again.
Command Explanations
cd /sources,tar -xf, andcd sqlite-...: Enter the staged SQLite source tree.CPPFLAGS="-D SQLITE_ENABLE_...": Enables selected SQLite features at compile time.lbi_configure: Applies the book's/systeminstall layout.--disable-staticand--enable-shared: Build shared SQLite libraries without static archives.--disable-readline: Avoids a readline dependency.make $LWI_MAKE_FLAGSandmake install: Build and install SQLite.