https://sqlite.org/releaselog/3_22_0.html
Created attachment 190291 [details] patch Hello. This is a changed: 1. The port upgraded to version 3.22.0. 2. Added the new option OFFSET (off by default). http://www.sqlite.org/compile.html#enable_offset_sql_func 3. Deleted options: DBPAGE, DBSTAT, RTREE. 3.1 This options always 'enable' into original distributions. 3.2 This options enabled by default in this port. 3.3 This is allowed make more compatibles (with original distributions) port. 3.4 Removed 'path' phase (and path files) from port. Thanks.
Created attachment 190292 [details] poudriere log
Please, see also: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225646
Pavel, The current patch is rejected with the current tree. Could you please update it? Thanks, Yuri
(In reply to Yuri Victorovich from comment #4) Pavel, it's okay, don't bother, I will take it from here. Yuri
I think I would lean towards not retiring these 3 port options. The reason is that SQLite is a pretty strong upstream, and they do things for good reasons. I would prefer for port options to be in close correspondence with build options.
Removing DBSTAT would break gecko@ ports e.g., https://ptpb.pw/djj3 $ make clean configure BATCH= -C/usr/ports/www/firefox [...] checking for sqlite3 >= 3.20.1... yes checking SQLITE_CFLAGS... -I/usr/local/include checking SQLITE_LIBS... -L/usr/local/lib -lsqlite3 checking for SQLITE_SECURE_DELETE support in system SQLite... yes checking for SQLITE_THREADSAFE support in system SQLite... yes checking for SQLITE_ENABLE_FTS3 support in system SQLite... yes checking for SQLITE_ENABLE_UNLOCK_NOTIFY support in system SQLite... yes checking for SQLITE_ENABLE_DBSTAT_VTAB support in system SQLite... no configure: error: System SQLite library is not compiled with SQLITE_ENABLE_DBSTAT_VTAB.
(In reply to Jan Beich from comment #7) I'm not going to remove options.
Created attachment 190479 [details] new patch (one string was lost) Indeed, one line in the patch was lost. @@ -117,7 +112,7 @@
(In reply to Yuri Victorovich from comment #8) Hello. Please apply the patch using the following commands: rm -R /usr/ports/databases/sqlite3 && svnlite up /usr/ports/databases/sqlite3 patch -d /usr/ports -l -p0 -E -V none -i sqlite3-20180210.diff ; rmdir /usr/ports/databases/sqlite3/files this will give a clean directory. Removed options remain always on. You can check them using the command: sqlite3 "" "PRAGMA compile_options"
Hello. Interesting. The function sqlite_compileoption_used() gives a different result depending on where it is called from. 1. From sqlite3 shell: % sqlite3 "" "select sqlite_compileoption_used('SQLITE_ENABLE_DBSTAT_VTAB');" 1 It's true. % sqlite3 "" "PRAGMA compile_options" COMPILER=clang-5.0.0 ENABLE_COLUMN_METADATA ENABLE_DBSTAT_VTAB ENABLE_FTS3 ... 2. And from C program: % cat sqlite-test-vtab.c #include <stdio.h> #include "sqlite3.h" int main(int argc, char **argv) { int result = sqlite3_compileoption_used("SQLITE_ENABLE_DBSTAT_VTAB"); printf("SQLITE_ENABLE_DBSTAT_VTAB: %s (%i)\n", result ?"true":"false", result); return 0; } % cc `pkg-config sqlite3 --cflags --libs` -o sqlite-test-vtab sqlite-test-vtab.c && ./sqlite-test-vtab SQLITE_ENABLE_DBSTAT_VTAB: false (0) It's false.
(In reply to Pavel Volkov from comment #11) Pavel, You should as this on their mailing list: sqlite-users@mailinglists.sqlite.org Yuri
ping. Can we commit it with the following workaround in Makefile and investigate it later? # Workaround for removed DBPAGE, DBSTAT and RTREE options CPPFLAGS+= -DSQLITE_ENABLE_DBPAGE_VTAB=1 -DSQLITE_ENABLE_DBSTAT_VTAB=1 -DSQLITE_ENABLE_RTREE=1
Sunpoet, I will not delete these options, because they are described in the documentation. They should delete them first if this is what is what they want. I will look some more and will commit. Yuri
Now I think I understand this issue. :-) There are 2 sets of build options. One set is for the shared library, and another set is for the sqlite3 shell program. When you deleted these options, they are completely gone from the shared library, hence the build failure that Jan reported in comment#7. The options that are seemingly permanently enabled in Makefile.ac are only permanently enabled for the sqlite3 shell program, not for the shared library. So it appears that it's safest to just keep those options as they were.
(In reply to Sunpoet Po-Chuan Hsieh from comment #13) Hello. This workaround work correctly for parameters -DSQLITE_ENABLE_DBSTAT_VTAB=1, -DSQLITE_ENABLE_RTREE=1. And don't work for -DSQLITE_ENABLE_DBPAGE_VTAB=1, -DSQLITE_ENABLE_EXPLAIN_COMMENTS=1. At me it repeats in FreeBSD and in the Ubuntu (16.04.4 LTS).
(In reply to Yuri Victorovich from comment #15) Thanks for the investigation. I saw the enabled flags in Makefile.in and thought they are applied everywhere. It makes sense to keep those options.
Committed with changes. Thank you for the update!
A commit references this bug: Author: yuri Date: Wed Mar 14 08:50:25 UTC 2018 New revision: 464472 URL: https://svnweb.freebsd.org/changeset/ports/464472 Log: databases/sqlite: Update to 3.22.0 Changelog: https://www.sqlite.org/releaselog/3_22_0.html Port changes: * Added the OFFSET option for the new sqlite_offset() function * Added 'Optional extensions' and 'Optional functions' option groups for better options readability * Deleted patches from files/ because they were disabling certain options in the command-line utility that the upstream keeps always enabled there * Changed capitalization in some options according to common spelling rules PR: 225627 Submitted by: Charlie Li <ml+freebsd@vishwin.info> (original version) Submitted by: Pavel Volkov <pavelivolkov@gmail.com> (maintainer, later version) Approved by: Pavel Volkov <pavelivolkov@gmail.com> (maintainer) Differential Revision: https://reviews.freebsd.org/D14216 Changes: head/databases/sqlite3/Makefile head/databases/sqlite3/distinfo head/databases/sqlite3/files/