In Gentoo, we give users the option to disable TOFU/sqlite. Unfortunately, the configure script doesn't completely disable use of sqlite:
wget https://gnupg.org/ftp/gcrypt/gnupg/gnupg-2.3.2.tar.bz2 && tar -xjf gnupg-2.3.2.tar.bz2 && cd gnupg-2.3.2 && ./configure --disable-tofu --disable-sqlite && make
which eventually fails in linking:
/usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: keyboxd-backend-sqlite.o: in function `show_sqlstmt': /home/dseifert/Downloads/gnupg-2.3.2/kbx/backend-sqlite.c:235: undefined reference to `sqlite3_expanded_sql' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: keyboxd-backend-sqlite.o: in function `run_sql_prepare': /home/dseifert/Downloads/gnupg-2.3.2/kbx/backend-sqlite.c:337: undefined reference to `sqlite3_prepare_v2' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: keyboxd-backend-sqlite.o: in function `diag_prepare_err': /home/dseifert/Downloads/gnupg-2.3.2/kbx/backend-sqlite.c:249: undefined reference to `sqlite3_errstr' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: keyboxd-backend-sqlite.o: in function `diag_bind_err': /home/dseifert/Downloads/gnupg-2.3.2/kbx/backend-sqlite.c:260: undefined reference to `sqlite3_errstr' /usr/lib/gcc/x86_64-pc-linux-gnu/11.2.0/../../../../x86_64-pc-linux-gnu/bin/ld: keyboxd-backend-sqlite.o: in function `show_sqlstmt': /home/dseifert/Downloads/gnupg-2.3.2/kbx/backend-sqlite.c:235: undefined reference to `sqlite3_expanded_sql' [...]