Fossil Forum

Version 2.9 requires SQLite w/ JSON1 extension
Login

Version 2.9 requires SQLite w/ JSON1 extension

(1) By Pietro Cerutti (gahr) on 2019-08-07 09:14:29 [source]

Version 2.9 - since 03cc33 - uses the JSON1 extension of SQLite for the ci-lock and ci-unlock pragmas.

When using the system SQLite (--disable-internal-sqlite), such support is not checked.

I've just committed this patch to the FreeBSD ports tree to fail at configure time in such a case.

Would you be willing to upstream it?

(2) By Richard Hipp (drh) on 2019-08-07 11:35:52 in reply to 1 [link] [source]

Does the changes at https://fossil-scm.org/fossil/info/350c627a52908458 works for you as an alternative to the patch you are currently using?

(3) By Pietro Cerutti (gahr) on 2019-08-07 12:25:30 in reply to 2 [link] [source]

You'll need to add LDFLAGS before LIBS, or it won't pick up -lsqlite3 in non-standard locations (usr/local/lib here).

Other than that, yes, it works fine, thanks!

(4) By Richard Hipp (drh) on 2019-08-07 12:30:15 in reply to 3 [link] [source]

LDFLAGS is now added.

(5.1) Originally by Pietro Cerutti (gahr) with edits by Richard Hipp (drh) on 2019-08-07 12:46:17 from 5.0 in reply to 3 [link] [source]

Now the issue is that sqlite3 (the autoconf distro we use in the ports tree) seems to define DSQLITE_ENABLE_STMTVTAB only when building the shell, not the library. Should we patch our tree to add the preprocessor macro when compiling the library too?

(6) By Richard Hipp (drh) on 2019-08-07 12:55:22 in reply to 5.1 [link] [source]

The sqlcompattest.c program was checking the wrong requirements. It has been updated.

The requirement is actually for -DSQLITE_ENABLE_DBPAGE_VTAB, which is needed by the ".recover" command in the "fossil sql" shell.

Fossil will build and work without -DSQLITE_ENABLE_DBPAGE_VTAB. It just won't support the ".recover" command in the "fossil sql" shell. That is a fairly obscure command, so I think it is reasonable to allow Fossil to build without it. I have removed the requirement from sqlcompattest.c.

(7) By Pietro Cerutti (gahr) on 2019-08-07 13:03:02 in reply to 6 [link] [source]

That works - thanks!