Fossil Forum

Update MINIMUM_SQLITE_VERSION to 3.37.0
Login

Update MINIMUM_SQLITE_VERSION to 3.37.0

Update MINIMUM_SQLITE_VERSION to 3.37.0

(1) By anonymous on 2021-12-04 08:05:19 [source]

Hi all,
I was trying to compile Fossil 2.17 from source using
the system provided SQLite library
(./configure --disable-internal-sqlite). At the time
of writing, my system is using version 3.36.0.
As a result, Fossil compiles without any problem
whatsoever but while linking it complains about
some missing functions that were introduced in SQLite
3.37.0 and that Fossil is using. 
This is caused by MINIMUM_SQLITE_VERSION
not being up to date with the current Fossil trunk.
Here is a patch to fix this compilation issue
to be applied against current trunk [c128f930]:


Index: auto.def
==================================================================
--- auto.def
+++ auto.def
@@ -32,11 +32,11 @@
 }
 
 # Update the minimum required SQLite version number here, and also
 # in src/main.c near the sqlite3_libversion_number() call.  Take care
 # that both places agree!
-define MINIMUM_SQLITE_VERSION "3.35.0"
+define MINIMUM_SQLITE_VERSION "3.37.0"
 
 # This is useful for people wanting Fossil to use an external SQLite library
 # to compare the one they have against the minimum required
 if {[opt-bool print-minimum-sqlite-version]} {
     puts [get-define MINIMUM_SQLITE_VERSION]

Index: src/main.c
==================================================================
--- src/main.c
+++ src/main.c
@@ -698,12 +698,12 @@
   fossil_limit_memory(1);
 
   /* When updating the minimum SQLite version, change the number here,
   ** and also MINIMUM_SQLITE_VERSION value set in ../auto.def.  Take
   ** care that both places agree! */
-  if( sqlite3_libversion_number()<3035000 ){
-    fossil_panic("Unsuitable SQLite version %s, must be at least 3.35.0",
+  if( sqlite3_libversion_number()<3037000 ){
+    fossil_panic("Unsuitable SQLite version %s, must be at least 3.37.0",
                  sqlite3_libversion());
   }
 
   sqlite3_config(SQLITE_CONFIG_MULTITHREAD);
   sqlite3_config(SQLITE_CONFIG_LOG, fossil_sqlite_log, 0);


Have a nice day.

(2) By Stephan Beal (stephan) on 2021-12-04 08:23:30 in reply to 1 [link] [source]

This is caused by MINIMUM_SQLITE_VERSION ...

Fixed, thank you for the report!