#1128611 libsqlite3-tcl: not compatible with tcl9.0

Package:
libsqlite3-tcl
Source:
libsqlite3-tcl
Description:
SQLite 3 Tcl bindings
Submitter:
Jose Lombera
Date:
2026-05-31 17:23:01 UTC
Severity:
normal
#1128611#5
Date:
2026-02-21 21:20:36 UTC
From:
To:
Dear Maintainer,

Package libsqlite3-tcl is not compatible with tcl9.0:
-------------------8<-------------------
$ tclsh9.0
% package require sqlite3
this extension is compiled for Tcl 8.6
%
------------------->8-------------------

And since no tdbc-sqlite3 driver is provided for tcl9.0 either (only for
tcl8.6), there is no way to use libsqlite3 with tcl9.0.

#1128611#10
Date:
2026-05-29 12:42:31 UTC
From:
To:
Hi Jose,

libsqlite-tcl 3.46.1 does not have Tcl 9 support, so in order to make it
compatible with Tcl 9 one has to upgrade it at least to 3.47.0, which is
not easy given the number of the sqlite3 dependencies.

tdbc-sqlite3 is a thin wrapper around libsqlite3-tcl, so it will
immediately get support for Tcl 9 after libsqlite3-tcl does.

Cheers!

#1128611#15
Date:
2026-05-29 16:15:09 UTC
From:
To:
That is, dependent packages should and are built against this version.
 Maybe an even newer version. I'm going to retest it this weekend,
with the most recent sqlite3 version.
 Please see above. We need to wait for the Tcl / Tk transition first.
I do not know if it's scheduled or not. While even the 9.1 version of
Tcl and Tk are in the archives, tcltk-defaults to 9.0.1 only even in
experimental [1].

Regards,
Laszlo/GCS
[1] https://tracker.debian.org/pkg/tcltk-defaults

#1128611#20
Date:
2026-05-29 17:34:57 UTC
From:
To:
Hi László,

Mostly, the software which uses Tcl/Tk is not updated for Tcl 9 as for now,
so I will not make Tcl/Tk 9 the default for Debian 14 (forky). There will
be tcl8.6 and tcl9.0 with tcl8.6 the default.

If a library can be used with Tcl 9, usually I build two versions of it, both
for Tcl 8.6 and Tcl 9.0 an put them into a single package (for example,
https://tracker.debian.org/pkg/tcltls), you can try to do the same for the
newer libsqlite3-tcl. The common practice for the Tcl/Tk developers is
to build libraries with different names (e.g. libtls2.0.so for Tcl 8.6 and
libtcl9tls2.0.so for Tcl 9) and let pkgIndex.tcl decide which to load based
on the current Tcl version).

Cheers!

#1128611#25
Date:
2026-05-31 17:21:20 UTC
From:
To:
Hi László,

I've looked into the new sqlite3 3.53.1 and here's the first attempt to update
it and to build two Tcl libraries: one for Tcl 8.6 and the other for Tcl 9.0.

The package definitely need polishing and even completing:

1. Since upstream totally redid the build system switching from autotools to
some in-house written tool, one has to rewrite the clean target in debian/rules
(I've only commented out deleting the configure script at the moment)
2. As for now I've just dropped patches which did not apply cleanly,
one has to review them to understand if they are still relevant
3. In the view of changed build system, I have no idea on how
cross-build of sqlite3 will work now
4. Currently, all the library is built twice, which might be not
desirable, as only
for the Tcl related package it is absolutely necessary. I don't know how to fix
this cleanly
5. I didn't touch the www component, it should be updated to the current
documentation I suppose

There is one unnecessary but desired change in addition to updating to 3.53.1
and porting to Tcl 9: making the libsqlite3-tcl package multi-arch same.


Here are the comments on most changes in the debian/ directory along the
diff (I've attached the compressed debian directory as well):

Just a dummy changelog entry:
--- sqlite3-3.46.1/debian/changelog 2026-01-24 11:48:16.000000000 +0300 +++ sqlite3-3.53.1/debian/changelog 2026-05-31 12:13:25.279526579 +0300 @@ -1,3 +1,9 @@ +sqlite3 (3.53.1-1) unstable; urgency=medium + + * New upstream release. + + -- Sergei Golovan <sgolovan@debian.org> Sun, 31 May 2026 12:13:22 +0300 + sqlite3 (3.46.1-9) unstable; urgency=medium * Add pkgconf build dependency to fix link problem with ICU extension A few changes in debian/control
--- sqlite3-3.46.1/debian/control 2026-01-24 11:48:16.000000000 +0300 +++ sqlite3-3.53.1/debian/control 2026-05-31 19:22:54.716534584 +0300 @@ -2,7 +2,7 @@ Section: devel Priority: optional Maintainer: Laszlo Boszormenyi (GCS) <gcs@debian.org> Added tcl9.0-dev to build dependencies.
--- sqlite3-3.46.1/debian/libsqlite3-0.symbols 2025-05-28 08:02:22.000000000 +0300 +++ sqlite3-3.53.1/debian/libsqlite3-0.symbols 2026-05-31 14:10:02.183210627 +0300 Probably I've messed up somewhere since libsqlite3-0 is changed by libsqlite3 @@ -1,4 +1,4 @@ -libsqlite3.so.0 libsqlite3-0 #MINVER# +libsqlite3.so.0 libsqlite3 #MINVER# sqlite3AbsInt32@Base 3.37.0 sqlite3AddCheckConstraint@Base 3.37.0 sqlite3AddCollateType@Base 3.37.0 Delete a bunch of added symbols. Here are the missing ones: @@ -470,7 +481,8 @@ sqlite3JournalModename@Base 3.37.0 sqlite3JournalOpen@Base 3.37.0 sqlite3JournalSize@Base 3.37.0 - sqlite3JsonTableFunctions@Base 3.38.0 +#MISSING: 3.53.1# sqlite3JsonTableFunctions@Base 3.38.0 + sqlite3JsonVtabRegister@Base 3.53.1 sqlite3KeyInfoAlloc@Base 3.37.0 sqlite3KeyInfoFromExprList@Base 3.37.0 sqlite3KeyInfoOfIndex@Base 3.37.0 @@ -804,7 +822,7 @@ sqlite3TriggerInsertStep@Base 3.37.0 sqlite3TriggerList@Base 3.37.0 sqlite3TriggerSelectStep@Base 3.37.0 - sqlite3TriggerStepSrc@Base 3.37.0 +#MISSING: 3.53.1# sqlite3TriggerStepSrc@Base 3.37.0 sqlite3TriggerUpdateStep@Base 3.37.0 sqlite3TriggersExist@Base 3.37.0 sqlite3TwoPartName@Base 3.37.0 @@ -862,7 +880,9 @@ sqlite3VdbeChangeP4@Base 3.37.0 sqlite3VdbeChangeP5@Base 3.37.0 sqlite3VdbeChangeToNoop@Base 3.37.0 - sqlite3VdbeCheckFk@Base 3.37.0 +#MISSING: 3.53.1# sqlite3VdbeCheckFk@Base 3.37.0 + sqlite3VdbeCheckFkDeferred@Base 3.53.1 + sqlite3VdbeCheckFkImmediate@Base 3.53.1 sqlite3VdbeCloseStatement@Base 3.37.0 sqlite3VdbeCountChanges@Base 3.37.0 sqlite3VdbeCreate@Base 3.37.0 I've moved the Tcl library to /usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/sqlite3 to make the package multi-arch same.
--- sqlite3-3.46.1/debian/libsqlite3-tcl.install 2011-03-27 14:09:20.000000000 +0400 +++ sqlite3-3.53.1/debian/libsqlite3-tcl.install 2026-05-31 15:40:16.694026200 +0300 @@ -1 +1 @@ -usr/lib/tcltk/sqlite3 usr/lib/tcltk/ +usr/lib/tcltk/* usr/lib/tcltk/ Upstream links libsqlite3.so into the Tcl library statically, I took the liberty of patching main.mk to do that dynamically. I think it's better that way, if you don't agree you may drop the patch
--- sqlite3-3.46.1/debian/patches/60-dynamic-libtclsqlite.patch 1970-01-01 03:00:00.000000000 +0300 +++ sqlite3-3.53.1/debian/patches/60-dynamic-libtclsqlite.patch 2026-05-31 15:27:46.210009655 +0300 @@ -0,0 +1,11 @@ +--- a/main.mk ++++ b/main.mk +@@ -1641,7 +1643,7 @@ + $(T.tcl.env.source); \ + $(T.link.shared) -o $@ tclsqlite.o \ + $$TCL_INCLUDE_SPEC $$TCL_STUB_LIB_SPEC $(LDFLAGS.libsqlite3) \ +- $(LIBOBJ) -Wl,-rpath,$$TCLLIBDIR ++ -L. -lsqlite3 -Wl,-rpath,$$TCLLIBDIR + # ^^^ that rpath bit is defined as TCL_LD_SEARCH_FLAGS in + # tclConfig.sh, but it's defined in such a way as to be useless for a + # _static_ makefile. Quite a few patches did not apply cleanly. For now I've disabled them:
--- sqlite3-3.46.1/debian/patches/series 2025-09-09 19:47:18.000000000 +0300 +++ sqlite3-3.53.1/debian/patches/series 2026-05-31 14:16:51.245956685 +0300 @@ -1,14 +1,15 @@ -10-520466-libsqlite3-depends-on-libdl.patch -10-520478-squash-bad-deps.patch +#10-520466-libsqlite3-depends-on-libdl.patch +#10-520478-squash-bad-deps.patch 20-hurd-locking-style.patch -30-cross.patch -10-665363-disable-malloc-usable-size.patch +#30-cross.patch +#10-665363-disable-malloc-usable-size.patch 31-increase_SQLITE_MAX_DEFAULT_PAGE_SIZE_to_32k.patch -32-dynamic_link.patch +#32-dynamic_link.patch 02-use-packaged-lempar.c.patch -40-amalgamation_configure.patch -41-fix_a_bug_in_the_NOT_NULL-IS_NULL_optimization.patch -50-CVE-2025-29087.patch -51-CVE-2025-29088.patch -52-CVE-2025-6965.patch -53-CVE-2025-7709.patch +#40-amalgamation_configure.patch +#41-fix_a_bug_in_the_NOT_NULL-IS_NULL_optimization.patch +#50-CVE-2025-29087.patch +#51-CVE-2025-29088.patch +#52-CVE-2025-6965.patch +#53-CVE-2025-7709.patch +60-dynamic-libtclsqlite.patch And now massive changes in debian/rules
--- sqlite3-3.46.1/debian/rules 2025-09-09 19:47:18.000000000 +0300 +++ sqlite3-3.53.1/debian/rules 2026-05-31 19:25:39.967186317 +0300 @@ -24,12 +24,15 @@ export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) We build two versions: for 8.6 and 9.0 +TCLV_PRIMARY = 8.6 +TCLV_SECONDARY = 9.0 + export LDFLAGS += -Wl,--as-needed ifeq ($(DEB_BUILD_GNU_TYPE), $(DEB_HOST_GNU_TYPE)) Move --with-tcl to the actual list of configure options. The custom configure script does not support "--build whatever" it needs "--build=whatever" with = - confflags += --build $(DEB_HOST_GNU_TYPE) --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl8.6 + confflags += --build=$(DEB_HOST_GNU_TYPE) export CROSS_BUILDING=no else - confflags += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl8.6 + confflags += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) LDFLAGS += -L/usr/lib/$(DEB_HOST_MULTIARCH) export CROSS_BUILDING=yes endif @@ -64,23 +67,34 @@ configure: configure-stamp configure-stamp: dh_testdir - dh_autoreconf --as-needed - dh_update_autotools_config - ./configure --prefix=/usr --mandir="/usr/share/man" \ - $(confflags) --enable-threadsafe \ - --enable-load-extension \ - --enable-json \ - --enable-fts4 \ - --enable-fts5 \ - --disable-amalgamation \ - --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH) \ - --libexecdir=\$${libdir}/sqlite3 \ - TCLLIBDIR=/usr/lib/tcltk/sqlite3 \ - SHELL=/bin/sh \ - $(DDEBUG) Drop autoreconf and updating autotools config since autoconf is not used + #dh_autoreconf --as-needed + #dh_update_autotools_config A loop for the Tcl versions, building the library not in the root of the package, but in debian/8.6 and debian/9.0 (this also makes cleanup easier). + for v in $(TCLV_PRIMARY) $(TCLV_SECONDARY) ; do \ + mkdir -p $(CURDIR)/debian/$$v && \ + cd $(CURDIR)/debian/$$v && \ + ../../configure \ + $(confflags) \ + --prefix=/usr \ + --mandir=/usr/share/man \ + --with-tcl=/usr/lib/$(DEB_HOST_MULTIARCH)/tcl$$v \ + --enable-threadsafe \ + --enable-load-extension \ + --enable-json \ + --enable-fts4 \ + --enable-fts5 \ + --disable-amalgamation \ New options