stephan [Thu, 29 May 2025 20:30:01 +0000 (20:30 +0000)]
Fix the missing -lm link flag for the sqlite3 shell when building the autoconf bundle with --disable-static-shell, as reported in [forum:5adf1c932a | forum post 5adf1c932a].
drh [Tue, 6 May 2025 18:04:04 +0000 (18:04 +0000)]
Fix a bug in the NOT NULL/IS NULL optimization
that can cause invalid data to be used for a column if that column has a
CHECK constraint that includes the NOT NULL or IS NULL operator.
Correctly handle the case of a multi-column UNIQUE constraint that contains
the ROWID as one of it columns, and then the columns of that UNIQUE are
used in a row-value IN operator as a WHERE clause constraint.
stephan [Fri, 4 Apr 2025 21:11:32 +0000 (21:11 +0000)]
Improve --all flag handling so that combinations of (--all --disable-FEATURE) and (--disable-all --FEATURE) work more intuitively. Add missing handling of the --fts3 flag (it was accepted but ignored before). Partial merge of [26ef0ff4bfbb], minus proj.tcl changes.
stephan [Fri, 28 Feb 2025 01:06:14 +0000 (01:06 +0000)]
Strive to make sorts stable in the mkpragmatab.tcl build script, so that
we get consistent amalgamations regardless of platform.
[forum:/forumpost/c9914addebf3da51|Forum thread c9914addebf3da51].
stephan [Tue, 25 Feb 2025 16:17:57 +0000 (16:17 +0000)]
Diverse configure tweaks to better support package maintainers on the unix-on-windows environments like msys2, cygwin, and mingw, based largely on feedback in forum posts [forum:e6cf2bbb70da2922|e6cf2bbb70da2922] and [forum:828fdfe9041fd725|828fdfe9041fd725].
stephan [Fri, 21 Feb 2025 03:22:57 +0000 (03:22 +0000)]
configure: in several places where support for -Wl,... linker flags are checked, ensure that the check invokes the linker (not just the compiler) to avoid false positives. This allows us to remove the AIX-specific handling and --disable-rpath bits added in [a15e0f680], as well as make several similar checks more robust.
stephan [Thu, 20 Feb 2025 17:15:37 +0000 (17:15 +0000)]
configure: automatically fail the check for rpath on AIX systems and provide a --disable-rpath flag as a fallback for use on platforms which pass the configure-time rpath check but then fail at link-time. Based on discussion in [forum:ae5bd8a84b|forum thread ae5bd8a84b].
stephan [Thu, 20 Feb 2025 16:47:12 +0000 (16:47 +0000)]
Fix autoconf bundle to honor the --disable-static and --disable-shared flags, as reported in [forum:ae5bd8a84b|forum post ae5bd8a84b]. Problem introduced in 3.49.0.
stephan [Sun, 16 Feb 2025 18:16:42 +0000 (18:16 +0000)]
Re-add the --disable-static-shell configure feature to the autoconf bundle. It got lost in the autoconf-to-autosetup port, as reported in [forum:cc219ee7044|forum post cc219ee7044].
stephan [Sat, 15 Feb 2025 16:24:52 +0000 (16:24 +0000)]
DLL installation rules no longer create versioned symlinks on platforms where the DLL extension is '.dll' (cygwin, msys2, etc.), as suggested in [forum:28bb79638844c328|forum post 28bb79638844c328].
stephan [Fri, 14 Feb 2025 16:43:41 +0000 (16:43 +0000)]
ICU config support: add more details to error messages and correct a typo which would cause a configure crash if --with-icu-config=X refered to a non-executable X.
stephan [Tue, 11 Feb 2025 17:13:24 +0000 (17:13 +0000)]
Move the configure flags definition and handling into autosetup/sqlite-config.tcl to avoid duplication between auto.def and autoconf/auto.def while still giving us a way to filter the canonical-tree-only flags out of the autoconf build.
stephan [Tue, 11 Feb 2025 13:18:01 +0000 (13:18 +0000)]
Adapt [https://fossil-scm.org/home/info/3bff7b92d6d|Fossil SCM patch 3bff7b92d6d], applying -lrt for platforms which need it for one of {fdatasync, nanosleep}.
stephan [Tue, 11 Feb 2025 13:15:28 +0000 (13:15 +0000)]
Make the --out-implib support ([6092b0b86bf93a3d]) specifically opt-in because the feature check for it passes on some platforms where it is not recognized at link-time.
stephan [Mon, 10 Feb 2025 15:02:35 +0000 (15:02 +0000)]
configure: when dlopen() is not found, only fail fatally if --enable-loadable-module is explicitly provided, else warn instead. Based on discussion around [forum:2efe9c33bd9021ca|forum post 2efe9c33bd9021ca]. Update proj-indented-notice to behave like its docs say it should when the -error flag is used.
stephan [Sun, 9 Feb 2025 04:40:54 +0000 (04:40 +0000)]
configure: if the linker supports --out-implib, generate libsqlite3.X.a, where X is the platform's DLL file extension. Discussion in/around [forum:0c7fc097b2|forum post 0c7fc097b2].
stephan [Sun, 9 Feb 2025 01:50:41 +0000 (01:50 +0000)]
wasm: add some build-time validation to ensure that the problem fixed in [65798c09a00662a3] does not recur. Ensure that files generated via mkwasmbuilds.c have the generated makefile as a dependency.
stephan [Sun, 9 Feb 2025 01:30:47 +0000 (01:30 +0000)]
configure: when transfering ENABLE/OMIT flags from CFLAGS to OPT_FEATURE_FLAGS, also do the same for CPPFLAGS and remove those ENABLE/OMIT flags from CFLAGS/CPPFLAGS to mimic legacy build behavior. Strip ENABLE/OMIT flags from BUILD_CFLAGS but do not transfer those to OPT_FEATURE_FLAGS, also to mimic legacy behavior. This is the second part of a fix discussed at [forum:9801e54665afd728|forum post 9801e54665afd728].
stephan [Fri, 7 Feb 2025 12:59:03 +0000 (12:59 +0000)]
configure: change extension of static libraries from .lib to .a on msys/cygwin, as per discussion in [forum:02db2d4240|forum post 02db2d4240]. Replace unidiomatic JS-style use of inner procs in autosetup/proj.tcl with TCL lambdas.
stephan [Fri, 7 Feb 2025 12:36:25 +0000 (12:36 +0000)]
Reorder a piece of ext/wasm/GNUmakefile to correct the timing of various var accesses. Fixes a problem [https://github.com/sqlite/sqlite-wasm/pull/99|reported in the downstream npm subproject] and explains the confusion in [4aa025a943a4024094b9] (which has been reverted).
stephan [Thu, 6 Feb 2025 13:35:35 +0000 (13:35 +0000)]
Fix a dependencies/order-of-operations bug in ext/wasm/GNUmakefile which causes creation of files filtered via c-pp to fail if the ext/wasm/jswasm dir did not exist beforehand.
stephan [Mon, 3 Feb 2025 17:34:12 +0000 (17:34 +0000)]
Rework [76c8435a] to eliminate automatic JS-to-WASM function conversions of sqlite3_set_auxdata() destructors because it can leads to leaks on every call of a UDF. This feature never worked before [76c8435a] but fixing it was ill-conceived because of the memory leakage it introduces. WASM function pointers can still be used as destructors in this context.
stephan [Mon, 3 Feb 2025 14:55:56 +0000 (14:55 +0000)]
Add a more complete test for [76c8435a] and add some commentary about (A) the inability to automatically clean up automatically-generated WASM proxy functions for sqlite3_set_auxdata() destructors and (B) how to deal with (A) to avoid leaking WASM proxy functions.
drh [Mon, 3 Feb 2025 14:44:16 +0000 (14:44 +0000)]
Fix the build process on Windows so that it generates identical sqlite3.c,
sqlite3.h, and shell.c files on Windows and Unix. This patch also includes
a change to JS bindings that got caught up in the branch.
stephan [Mon, 3 Feb 2025 14:04:27 +0000 (14:04 +0000)]
Correct the FuncPtrAdapter signature for the JS binding of sqlite3_set_auxdata(). Reported in [https://github.com/sqlite/sqlite-wasm/issues/92|the npm subproject, ticket #92].
stephan [Fri, 31 Jan 2025 11:45:55 +0000 (11:45 +0000)]
Correct a typo in tool/emcc.sh.in which could cause all of the configure-time work to locate the emcc binary to go unused. Reported in [forum:feb325cdde5b6f37|forum post feb325cdde5b6f37].