Hi "László,

On Sun, Nov 1, 2026 at 1:24 AM László Böszörményi (GCS) <[email protected]> wrote:
>
> Hi all,
>
> On Sat, Oct 31, 2026 at 2:37 PM Gregor Ebbing <[email protected]> wrote:
> > Still present in 3.53.4-2. Two additional points:
> >
> > Also affects tcl9.1 (tclsh9.1 from unstable).
> > /usr/lib/tcltk/sqlite3/pkgIndex.tcl registers the 8.6 library for every
> > Tcl version. Under Tcl 9 this not only fails to load, it also hides a
> > working sqlite3 build elsewhere on auto_path, because 3.53.4 is usually
> > the higher version.
>  I've updated packaging [1], mostly on the work of Sergei Golovan. I
> need to check how pkgIndex.tcl works. You may double check packaging
> if you have time.

I've looked into the package, and found that the Gregor's assessment is correct.

1) A minor bug with dependencies (on libtcl9.0). I intend to drop
Tcl/Tk 9.0 for forky
leaving only Tcl/Tk 9.1 (and 8.6 still as a default), so replacing
libtcl9.0 by libtcl9.1 will do.

2) Missing -L. when linking the Tcl extension makes the package FTBFS
when it's built in
a clean environment (e.g. in pbuilder chroot).

3) My bug in debian/rules with $$dir inside a string in double quotes.

Please, find the attached patch, which fixes these bugs.

Cheers!
-- 
Sergei Golovan
diff -Nru sqlite3-3.54.1/debian/control sqlite3-3.54.1/debian/control
--- sqlite3-3.54.1/debian/control	2026-10-31 18:28:17.000000000 +0300
+++ sqlite3-3.54.1/debian/control	2026-11-01 18:04:30.000000000 +0300
@@ -76,7 +76,7 @@
 Suggests: sqlite3-doc
 Section: interpreters
 Architecture: any
-Depends: libtcl8.6 | libtcl9.0, ${shlibs:Depends}, ${misc:Depends}
+Depends: libtcl8.6 | libtcl9.1, ${shlibs:Depends}, ${misc:Depends}
 Multi-Arch: same
 Description: SQLite 3 Tcl bindings
  SQLite is a C library that implements an SQL database engine.
diff -Nru sqlite3-3.54.1/debian/patches/dynamic-tcl-library.patch sqlite3-3.54.1/debian/patches/dynamic-tcl-library.patch
--- sqlite3-3.54.1/debian/patches/dynamic-tcl-library.patch	2026-10-31 18:28:17.000000000 +0300
+++ sqlite3-3.54.1/debian/patches/dynamic-tcl-library.patch	2026-11-01 17:59:43.000000000 +0300
@@ -14,7 +14,7 @@
  	$(T.link.shared) -o $@ tclsqlite.o \
  		$$TCL_INCLUDE_SPEC $$TCL_STUB_LIB_SPEC $(LDFLAGS.libsqlite3) \
 -		$(LIBOBJ) $(libtclsqlite3.rpath-$(ENABLE_RPATH))
-+		-lsqlite3 $(libtclsqlite3.rpath-$(ENABLE_RPATH))
++		-L. -lsqlite3 $(libtclsqlite3.rpath-$(ENABLE_RPATH))
  $(libtclsqlite3.DLL)-1: $(libtclsqlite3.DLL)
  $(libtclsqlite3.DLL)-0 $(libtclsqlite3.DLL)-:
  libtcl: $(libtclsqlite3.DLL)-$(HAVE_TCL)
diff -Nru sqlite3-3.54.1/debian/rules sqlite3-3.54.1/debian/rules
--- sqlite3-3.54.1/debian/rules	2026-10-31 18:28:17.000000000 +0300
+++ sqlite3-3.54.1/debian/rules	2026-11-01 18:03:25.000000000 +0300
@@ -156,9 +156,9 @@
 	PKGINDEX="$(DESTDIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/sqlite3/pkgIndex.tcl" ; \
 	VER=$$(cat VERSION) ; \
 	echo "if {[package vsatisfies [package provide Tcl] 9]} {" > $$PKGINDEX ; \
-	echo "    package ifneeded sqlite3 $$VER [list load [file join $$dir libtcl9sqlite$$VER.so] Sqlite3]" >> $$PKGINDEX ; \
+	echo "    package ifneeded sqlite3 $$VER [list load [file join \$$dir libtcl9sqlite$$VER.so] Sqlite3]" >> $$PKGINDEX ; \
 	echo "} {" >> $$PKGINDEX ; \
-	echo "    package ifneeded sqlite3 $$VER [list load [file join $$dir libsqlite$$VER.so] Sqlite3]" >> $$PKGINDEX ; \
+	echo "    package ifneeded sqlite3 $$VER [list load [file join \$$dir libsqlite$$VER.so] Sqlite3]" >> $$PKGINDEX ; \
 	echo "}" >> $$PKGINDEX
 else
 	echo "" > $(DESTDIR)/usr/lib/tcltk/$(DEB_HOST_MULTIARCH)/sqlite3/pkgIndex.tcl

Reply via email to