[tracker] build: Mandate that sqlite3 >= 3.20.0 has fts5 builtin
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [tracker] build: Mandate that sqlite3 >= 3.20.0 has fts5 builtin
- Date: Tue, 22 Aug 2017 11:59:30 +0000 (UTC)
commit 84c8cc2590f18bfd6c1b3e633b84622d193061a1
Author: Carlos Garnacho <carlosg gnome org>
Date: Mon Aug 21 22:04:28 2017 +0200
build: Mandate that sqlite3 >= 3.20.0 has fts5 builtin
That sqlite3 version brought incompatibilities in the fts5 interface,
fts5 modules generated from < 3.20.0 trees won't work with sqlite3
>= 3.20.0, and viceversa.
Since it's not feasible nor desirable to include an additional fts5
module copy nor an embedded sqlite3 amalgamation copy, mandate that
SQLite was compiled with --enable-fts5 if >= 3.20.0 is found.
The current copy of the fts5 module is kept around for sqlite3 < 3.20.0,
so we don't make this a mandatory requirement for earlier versions.
https://bugzilla.gnome.org/show_bug.cgi?id=785883
configure.ac | 7 +++++++
meson.build | 4 ++++
2 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 1478313..8761d19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -621,6 +621,13 @@ if test "x$have_tracker_fts" = "xyes"; then
else
have_builtin_fts5="no"
+ # Sqlite 3.20 broke compatibility of the fts5 module both ways, demand
+ # that it's builtin into sqlite from that version on.
+ PKG_CHECK_EXISTS([sqlite3 >= 3.20.0], sqlite_builtin_fts5_forced=yes, sqlite_builtin_fts5_forced=no)
+ if test "x$sqlite_builtin_fts5_forced" == "xyes"; then
+ AC_MSG_ERROR([sqlite3 >= 3.20.0 must be compiled with --enable-fts5])
+ fi
+
# Make sure SQLite has extension loading enabled
AX_SQLITE_AUTO_EXTENSION
if test "x$ax_cv_sqlite_auto_extension" != "xyes"; then
diff --git a/meson.build b/meson.build
index 60e14eb..8f66e72 100644
--- a/meson.build
+++ b/meson.build
@@ -115,6 +115,10 @@ if enable_fts
sqlite3_has_builtin_fts5 = cc.compiles(sqlite3_builtin_fts5_test,
name: 'sqlite3 has builtin FTS5 module')
+
+ if not sqlite3_has_builtin_fts5 and sqlite.version() >= '3.20.0'
+ error('sqlite3 >= 3.20.0 must be compiled with --enable-fts5')
+ endif
endif
##################################################################
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]